ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Steering angle from Regulated Pure Pursuit in Nav 2

asked 2022-10-25 18:52:49 -0500

alexanderyuen gravatar image

Regulated pure pursuit calculates the linear and angular velocity based on the curvature. It seems this works great for a differential drive robot. However are there steps in ROS2 to convert this into steering angle for an Ackermann vehicle?

In my current setup I have Navigation 2 writing cmd_vel over the ROS bridge where I have ackermann_steering_controller running. The steering command is equivalent to the desired angular velocity which, based upon the literature I've looked it, is not necessarily correct.

Is there best practices to do this conversion without having to modify the regulated pure pursuit code?

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-10-26 07:08:41 -0500

updated 2022-10-26 07:16:16 -0500

As convention, the cmd_vel topic is producing commands in body-fixed frame, not as steering commands for the ackermann angular rates. Simple kinematics can be done below RPP to convert body-fixed angular velocities into steering angle velocities based on the kinematics of your particular vehicle.

Because cmd_vel has to be general for all types of robot systems, this is a long standing convention. It is convenient that differential drive and (most) omni platforms share the same frame of reference for control, but that’s not a limitation of the cmd_vel topic or a problem for supporting other vehicles. Diff/omni are just especially simple cases.

At the end of the day, a robot developer has to convert a Twist into motor commands (true of diff/omni as well) based on the particulars of your vehicle, so ackermann is actually not treated any differently. You’d like to move at some velocity with some turning rate, the way you interpret that is linked to where your motors are located, in what configuration, and with what wheel radii. Every type of robot model has different kinematics and parameters, but all can take in a linear and angular velocity vector to do.

I can’t speak to the particulars of the controller you mention however, that’s outside of the navigation project. I will admit, an open-source node to shim Body-fixed Twists to some Ackermann-steering-centric Twists given the relevant kinematic parameters would be valuable (or other controller frame input parameters). This is not the first time the question has been brought up.

edit flag offensive delete link more

Comments

Thanks for your answer Steve

To expand on your comments, is there an accepted convention that ROS and ROS2 users go from cmd_vel to their vehicle kinematic of choice (independent of an available open source node)? Or is it more or less ad-hoc at this point? I'd like to stick to whatever convention the community has accepted

Barring that, are there any ongoing discussions about an opensource node to do what is discussed? I have some work done on my end and would like to see if I can make any contributions back to the ROS community

alexanderyuen gravatar image alexanderyuen  ( 2022-10-26 10:39:42 -0500 )edit

Many of the ROS Control plugins have examples for this that can be used (ex diff drive base takes in the wheel radius and separation to backout the motor velocities to match the body-fixed frame velocities to send to the controllers). The gazebo plugins as well for simulating that style of base. I'm not sure what the inputs of the Ackermann controllers / simulation plugins are though. If they're not the way we're sending them, then yes, a new project to act as a "shim" could be helpful -- if the ROS Control folks don't want to change their APIs / offer that option natively.

stevemacenski gravatar image stevemacenski  ( 2022-10-31 10:23:53 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-10-25 18:52:49 -0500

Seen: 403 times

Last updated: Oct 26 '22