Presice movement mission difficulties - rover + encoders

Hi everyone.
I’m having difficulties programming the rover to fit the purpose of the mission.
I need the robot to move in a straight line and stop after every meter it passes for a few seconds.
the movement has to be as precise as possible.
I have tried to use the mavlink message - set_position_target_local_ned_encode.
and then telling it to move at 1 meter per second for 1 second.
I’m using encoders to estimate the location instead of GPS.
when I run the code, I believe it relies on the accelerometer to estimate speed, as a result, I get weird movements that are far from being just a straight line.
do you have any ideas as to how to make the code so that it relies solely on the encoders?
thanks in advance!

1 Like

I’ll be doing some experimentation with encoders this week and will follow this thread closely, since I’m sure the responses will apply to my Rover as well.

Have you followed the documentation closely for initial setup/parameters?

To clarify on this:
There’s no way to disable the IMU, it’s always used (in conjunction with any other fitted sensors) in the EKF to determine position/velocity.

ArduPilot can use the wheel encoders as a velocity input into the EKF, the setting for which are in the link @Yuri_Rage posted.

I’ve used pure IMU+Encoders before and found there was yaw drift after 60 seconds or so. Without additional sensors (visual navigation, gps, etc) you may not get great results.

If you’re running outside, a compass will help

Thanks for the replay!
I have followed it but I used only 1 encoder.
I think connecting the second one will help.
nevertheless, I need a method for the velocity and position in the x-axis to be measured only via the encoders.
is there a mavlink message that I could use to do this?
or alternatively, how do I set the parameters to allow this?