AutonomyLab / create_robot

ROS driver for iRobot Create 1 and 2.
http://www.autonomylab.org/create_autonomy
BSD 3-Clause "New" or "Revised" License
198 stars 165 forks source link

Odometry error is huge while rotate in place #84

Closed gloria-201 closed 3 years ago

gloria-201 commented 3 years ago

Hi, I am trying to use Create2 as a move base to implement navigation. while using AMCL to localize thre robot, it will fit the map when moving straightly. but when rotating, AMCL will not adjust at all. As a result, if rotating angle is larger, say 30 degree, only rotation no translation, AMCL will never find the localization. It may be caused by inaccurate rotating angle computed by odometry. when I turn 360 degree. in rviz, it's about 420 degree. I wonder whether I can increase the axle length value to relieve the huge error? And I cannot find how to do it.

jacobperron commented 3 years ago

In my experience, the odometry from the Create platforms are not that great, especially when it comes to measuring rotation. So, I don't think what you are experiencing is unusual.

Currently, the axle length is hard-coded to a value of here to a value of 0.235m. You could try changing the value and then build libcreate and create_robot from source.

If you would like a programmatic way of changing the value, I'd be happy to review a couple pull requests. First, I would suggest adding setter methods here, and then expose a ROS param in the ROS driver here.

I'm going to close ticket in the mean time since I don't think this is a bug in this driver. Please correct me if you think I'm wrong.