I want to use nav2 with my model to navigate in a custom world simulated in gazebo. My robot is a legged model so cannot use differential drive, instead I use a custom controller to control and make the robot able to work. There two questions coming to my mind:

  1. How to set /odom topic?
  2. How to make nav2 be able to control the robot?

Please explain as if you talk to a beginner.

  • $\begingroup$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. $\endgroup$
    – Community Bot
    Sep 21, 2023 at 15:07

1 Answer 1


Typically, the odometry would be done by modeling where the center of the robot body is based on each leg movement and the forward kinematics. You may need to add some smoothing to this odometry estimate in order to avoid the controller in Nav2 from oscillating and producing jerky movement.

As for the control side - if you already have a custom controller you just need that controller to subscribe to a geometry_msgs/Twist topic and translate the commanded x/y/angular velocities into the leg commands.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.