I'm trying to use nav2 with a real self-driving golf cart. The architecture of the cart is not complex: The rear wheels respond to twist.linear.x commands The steering instead with the twist.angular.z command moves the front wheels (dimensions are those of a standard golf cart)

The cart receives cmd_vel commands correctly. Trying with a joystick I can move the cart and I can see from rviz2 that everything works correctly.

The problem arises when with nav2 I give a goal to follow to the cart.

Sometimes nav2 turns the steering to the maximum right/left. as mentioned before the steering receives the twist.angular.z commands

As long as I tell it to move forward 2 meters there are no problems, but if the distance increases every time the controller updates the local path to follow the steering commands seem to go crazy. I'm carrying out these tests with nav2 with the cart raised on stands,

Would anyone know how to setup or choose a simple controller and planner in my case? I'm definitely configuring something wrong, I'm new to this. for now I was trying to use the Regulated Pure Pursuit as a planner, and the Smac Hybrid-A* Planner as a controller

If anyone has any example configurations to start from it would help me a lot Many thanks in advance


1 Answer 1


as mentioned before the steering receives the twist.angular.z commands

angular.z are body-fixed frame angular velocity. You need to convert them to your steering angle / rates as you would for any other type of vehicle (ie legged, omni, diff drive) using your robot's kinematics.

  • $\begingroup$ So nav2 with "angular.z" moves my entire robot frame right? in fact I was wondering how the movement of a steering wheel was managed by the nav2 controllers. How should the conversion you mean be done? should I create a node that subscribes to the cmd_vel topic and then converts the value of "angular.z"? Thanks for your help $\endgroup$ Feb 17 at 15:49
  • $\begingroup$ Look up your vehicle's equations of motion - its no different than for a differential drive or omni directional robot: Nav2 provides you the body motion to achieve, its up to your kinematics to convert that into motor efforts of the wheels/turning/etc. The equations are different for each robot type, but ROS 2 Control or your own controller should be able to handle this conversion. Its simple kinematics I'm sure you can find code for online for Ackermann. $\endgroup$ Feb 17 at 20:02

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.