How to reset odom?

I am looking for solution to change map.
However, one part of that may need to reset the odom without shut down the whole unit as:

sudo shutdown -h now

How to reset magni without restart the whole unit.

Hello Jerry. Do you have a version 5.2 or later MCB board? If so and you have updated motor node then you have the pieces do do as you request but Im not sure I have an automated way to do that. There is a small black MCB reset switch and when pressed it is likely do do what you request although that was not it’s intent. See if it works. This is the only small pushbutton on the MCB and it is about 2cm below the place where the two large white connectors meet at the top of the board. The system detects a reset of the MCB (that is what that switch is) and in our current motor node as of several months back I then re-initialze the motor node.

Thanks for your prompt reply.

Actually, I want to have a way to reset the odom to zero position with software when there is a need of changing the map.

Is any way to achieve with software ?

I figured as much. I have to look into this to answer that question, it has not come up before.
I do want to point out that this is a very good thought and I try hard to respond to real needs that other people may someday want as well. Thanks for the feedback!

Well it’s unclear if it’s possible to actually reset it as-is, but you could kill the ubiquity_velocity_controller and start it up again, that may do it. It’s usually spawned in the core.launch file in magni_bringup.

if I just kill the node with:
rosnode kill /motor_node

and start the node again, it results in following error.



  • /frequency: 10.0
  • /rosdistro: kinetic
  • /rosversion: 1.12.17
  • /use_sime_time: True

motor_node (ubiquity_motor/motor_node)


process[motor_node-1]: started with pid [10953]
[ERROR] [1637048395.491614910]: setting deadzone enable to 1
[ERROR] [1637048395.500375163]: GOT error from Firm 0x00

It do not start the motor node successfully. any advise ?
Thanks and Best Regards,

Note that I didn’t say motor node, but ubiquity_velocity_controller. The motor node isn’t what’s handling the odometry, it just sends commands to the MCB.

Thanks for your advice.

I tested as below:

rosrun controller_manager controller_manager kill ubiquity_velocity_controller

then start it again:

rosrun controller_manager controller_manager load ubiquity_velocity_controller

however, there is no /odom output I check also the /ubiquity_velocity_controller/odom.
It do not have any output either.
any advise?

Sorry, I should use “spawn” instead of “load”:
rosrun controller_manager controller_manager spawn ubiquity_velocity_controller

The topic /odom will stop when kill the “ubiquity_velocity_controller” and start again when spawn the “ubiquity_velocity_controller”.

However, the odom data do not reset to zero. It still contain the previous odom data.
any advice ?

Ah I thought that would do it, perhaps there’s some kind of working data stored on the MCB. I would try this one last thing if it does anything but I’m not hopeful:

  • turn off motors with the switchboard
  • kill motor node and velocity controller
  • turn motors back on
  • relaunch nodes

I think that still won’t completely reboot the MCB, but it may do something to help it reset. @mjstn2011 I suppose you might know?

Anyway if that doesn’t work then I’m really not sure where it could be stored. Another more elaborate option would be to remap the topic at the start, to something like /odom_raw and then make a node that republishes it to /odom and can reset the data by subtracting the values recorded at the reset. Not sure how that would play with the tf frames though.

Perhaps a better question is: why does changing a map require resetting the odometry? Any standard ROS SLAM stack is fully capable of working with that initial offset without issues.

Thanks for your advice.
Will try to use software to resolve it as your comments.