# Odometry for ros melodic

Hi everyone. I am trying to create a good odometry for my robot, currently i calculate it with a cpp script from the speed, but the result is wery inaccurate, i wanted to know which pkg were more effective for a ros Melodic setup with lidar and two wheels without encoder, or if there existed a pkg similar to rf2o_laser_odometry compatible with ros melodic, that encodes the odometry bales readings of the lidar. Thanks everyone for the support

edit retag close merge delete

Sort by » oldest newest most voted

As I can see, you are only using wheel odometry to localize the robot. This is a good start but you will need more odometry sources to increase the precision of your localization. Since naturally, wheel odometry will end up having too much error due to several things like, wheel sliding, mechanicar issues, bad approximation in the computations etc. I will recommend you to check the robot_localization package which include EFK, UFK nodes ables to produce precisse localization from filtering with a Kalman Filter several odometry sources (GPS, IMU, Wheel_odometry, etc.).

Furthermore, since you have a LiDAR and, depending on your environment, you can localize yourself pretty well with the AMCL approach, a set of nodes that will perform a comparison between the LiDAR readings and an offline map to localize the platform within the map. Besides, this odometry is suitable also to be used with robot_localization together with your wheel odometry.

Antoher good package can be LOAM that is basically "Laser Odometry and Mapping [...] a realtime method for state estimation and mapping using a 3D lidar".

I am sure there are more solutions out there, I just wrote what I consider the most important ones. If anyone know more or better approaches I will glad to hear them.

Hope this helps.

Regards.

more

Hi @Weasfas Thanks for your help, my problem is exactly to make a good odometry for AMCL. I've read a lot about robot_localization it's an excellent pkg, but I have not found a tutorial or a guide to create a node that publishes odometry by a 2D lidar to be used by amcl, (I'm new on ros, but I'm studying it :) ) do you have any idea where I can find some tutorials, examples or how can i do it? Thanks again

( 2020-11-08 08:53:05 -0500 )edit

@reavers92 If your plan is to use AMCl, you will have to aggregate data from your sensor. AMCL takes as input a LaserScan msgs, you can convert your PointCloud msgs to LaserScan using the pointcloud_to_laserscan node, then AMCL will produce a estimated pose with covariance PoseWithCovarianceStamped which you can use to complete the Odometry msgs with your header, frame_id and TwistWithCovariance (You will have to compute the twist somehow, maybe from CAN, kinematics of your platform, etc) and then once you have that Odometry you will be good to use the robot_localization with your custom parameters. As to answer if there is any tutorial out there on the Internet, you can do a quick search about it, and you can find sites like this one. However is preferable to use the wiki and understand all of its concepts. Actually, github repo contains several examples.

( 2020-11-09 03:23:03 -0500 )edit