ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to obtain odometry for using it on navigation package?

asked 2022-05-09 07:46:53 -0500

lucasrebra gravatar image

I am working in a real project in ROS using an holonomic mobile robot. I have a lidar and an IMU and I don't know how to obtain the odometry just to use with the navigation package in a real unknown world application. I have almost implemented it on the simulated world but now I don't know how to integrate the sensors for calculate the odometry of the robot. I will be so pleased if someone could help me on that. I think that having a laser and an IMU that have to be so easy but in practice I don't know how to do it.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-05-09 08:39:33 -0500

Joe28965 gravatar image

For ROS1 ros_control is an interesting option. You have to use/configure the correct drive train. Then you have to write a hardware interface. In the hardware interface you basically get the speed commands per motor and you have to give it the speed that the encoders measure.

It will then calculate the odometry for you.

If you do not have encoders, you could use the IMU only, but I don't know how well that would work. Theoretically you might just be able to use something like localization and only have 1 input (only your IMU) but I'm not 100% how that would work.

edit flag offensive delete link more


What do you mean with drive train? Do you have some example on how to implement a hardware interface? I don't have so many info about it

lucasrebra gravatar image lucasrebra  ( 2022-05-09 09:47:52 -0500 )edit

Thinking again, I don't think it's the correct term, basically whether you have skid steer/diff drive/holonomic. In your case that would be holonomic.

ros_control also has tutorials and you might be able to find an example too, if you google 'ros_control example' or 'ros_control demo'.

I've only used ros2_control so that's not too useful for you, since it works quite a bit different.

Joe28965 gravatar image Joe28965  ( 2022-05-09 09:54:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-05-09 07:46:53 -0500

Seen: 33 times

Last updated: May 09 '22