I have a tricycle drive robot with propulsion and steering in the front wheel, and the rear wheels are fixed. I want to calculate the robot's steering angle and front wheel velocity from the twist message. I couldn't find anything related to this on Google. However, ChatGPT provided the following equations:

Steering angle:

theta = atan2(L * w, |V|)

Front-wheel velocity:

Vf = V / cos(theta)
  • ​V is the linear velocity of the robot
  • w is the angular velocity of the robot
  • L is the distance between front-wheel and rear wheels

Can anyone please confirm whether the above equations are correct?


1 Answer 1


Seems to be ok, there is a similar implementation with ros2_controllers

  • $\begingroup$ Thank you for your response. I will test it on my AGV and post the result here. $\endgroup$ Commented Dec 30, 2023 at 12:05
  • $\begingroup$ When linear.x is zero and angular.z is non-zero, how can I calculate front wheel velocity and steering angle? The equations given in github.com/ros-controls/ros2_controllers/blob/master/… for the same do not calculate the steering angle and linear velocity accurately. $\endgroup$ Commented Apr 17 at 8:13
  • $\begingroup$ how should that work with your robot with propulsion? $\endgroup$ Commented Apr 17 at 8:59
  • $\begingroup$ the robot should take in place rotations. the steering wheel can be turned from -90 to 90 degrees. but with V=0, the Vf becomes zero. $\endgroup$ Commented Apr 17 at 9:03
  • $\begingroup$ should i consider Vf = W* L? Vf=W*L/wheel_radius is giving very small value. $\endgroup$ Commented Apr 17 at 9:08

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.