0
$\begingroup$

Rosanswers logo

Hi,

I am new to ros and robotics, I went through the ros tutorials and is still confused about odometry. I am thinking about a differential drive bot, I get that I can get the ticks from a rotary encoder but how do I convert it to the odometry message? do I need a gyro to generate odometry data? and what is the use of the covariance?

what I get from google is that I can use ros-serial to communicate with the MCU and retrieve data from MCU publish it.

Thanks


Originally posted by Viv6429 on ROS Answers with karma: 1 on 2020-06-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I wrote a pretty detailed description of this in this blog. It also includes a description of covariance (and whether you should bother to set it)

In ROS speak, odometry means an estimate of a) how fast your robot is going and b) an estimate of where it is relative to where it started, based on the estimate in a). Wheel odometry is the most commonly used one, but you can have various sources of odometry (an IMU, or successive laser scans, and so on) which you can combine. There's a covariance matrices associated with each estimate a) and b) and those basically express how confident the robot is in its estimate.

So now that you know that odometry is just an estimate of velocity, you can see how you can convert encoder ticks to a speed. If you are using a motor controller or motor shield instead of doing this yourself as @billy describes in his answer, that device will tell you how fast the wheel is spinning. If you're rolling your own, you measure the number of encoder ticks per second (and how many ticks there are for one motor revolution) to find the angular velocity of the wheel. How that the speeds of each wheel then gets converted to robot velocity depends on the type of robot you're using.


Originally posted by achille with karma: 464 on 2020-06-15

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.