Robotics StackExchange | Archived questions

Reset odom from Python Code

Hello, I am working on an autonomous robot operation and I would need to reset the odometry while the ros is running. This is because I need a clean odom starting with position 0,0,0 to run my python code for segmentation. I am not using a Kobuki base, and I just need to clear the robot odom sometime in the middle of the run. How can I do so?

The diff drive controller code is written here: https://github.com/smd-ros-devel/diff_drive_controller

Asked by tony6 on 2021-08-13 03:23:52 UTC

Comments

Answers

Hello @tony6,

You can reset Odom, by publishing an Empty message of std_msgs.msg.

You can have a look at this question, Link 1 and Link 2

Asked by Ranjit Kathiriya on 2021-08-13 04:26:01 UTC

Comments

That's very specific to the Kobuki drivers. The node the OP links to does not support that.

There is no generic "reset odometry" message, topic or action. It'll always be specific to the node(s) used.

Asked by gvdhoorn on 2021-08-13 04:49:49 UTC