ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Wed, 15 Sep 2021 07:19:23 -0500How does the teb_local_planner calculate path points for ackermann steering vehicles?https://answers.ros.org/question/386426/how-does-the-teb_local_planner-calculate-path-points-for-ackermann-steering-vehicles/Hello all,
I am trying to understand whether the steering angle and vehicle velocity commands make sense from the teb_local_planner given the local path poses and orientation. Trying to get an intuitive understanding of what's going on with conventional bicycle model equations. I can't seem to get the calculations right or are the results just an approximation of the kinematic model from teb_local_planner? I am not quite certain which is the case. Appreciate any help you guys can offer!
pose0 from the local_path output should be the initial position of the vehicle.
(x,y,yaw) = (-21.87,11.4,-0.157), t_stamp=0.866s
pose1 from the local_path output should be the next position the vehicle is trying to reach.
(x,y,yaw) = (-21.78,11.39,-0.102),t_stamp=0.866s according to my understanding positive yaw is CCW
The command is applied at t_stamp=0.866s is
(cmd_vel,tire_wheel_angle) = (0.222,0.148) according to my understanding wheel_angle positive is CW
The bicycle model I am referring to is from pages 23 - 24. I would post the pictures here but my account is too new.
"Chapter 2, Lateral Vehicle Dynamics", R. Rajamani, Vehicle Dynamics and Control, Mechanical Engineering Series, https://www.springer.com/cda/content/document/cda_downloaddocument/9781461414322-c1.pdf?SGWID=0-0-45-1265143-p174267791. (2012)https://www.springer.com/cda/content/document/cda_downloaddocument/9781461414322-c1.pdf?SGWID=0-0-45-1265143-p174267791. (2012)
I am calculating the center of rotation from the rear axle
lf = 2.1685
lr = 0
delta_f = tire_wheel_angle from teb_local_planner
psi = yaw from teb_local_planner
From the calculations, I get the following
(d_x, d_y, d_psi) = (1.1e-2,-3.3e-3,-7.5e-4). These values are after multiplying dt =0.05
Adding these values to pose0, these don't seem to be close to pose1. If anyone could help offer any insight, I would greatly appreciate your help.
Thank you!
Mon, 13 Sep 2021 13:32:20 -0500https://answers.ros.org/question/386426/how-does-the-teb_local_planner-calculate-path-points-for-ackermann-steering-vehicles/Comment by osilva for <p>Hello all,</p>
<p>I am trying to understand whether the steering angle and vehicle velocity commands make sense from the teb_local_planner given the local path poses and orientation. Trying to get an intuitive understanding of what's going on with conventional bicycle model equations. I can't seem to get the calculations right or are the results just an approximation of the kinematic model from teb_local_planner? I am not quite certain which is the case. Appreciate any help you guys can offer!</p>
<p>pose0 from the local_path output should be the initial position of the vehicle.
(x,y,yaw) = (-21.87,11.4,-0.157), t_stamp=0.866s</p>
<p>pose1 from the local_path output should be the next position the vehicle is trying to reach.
(x,y,yaw) = (-21.78,11.39,-0.102),t_stamp=0.866s according to my understanding positive yaw is CCW</p>
<p>The command is applied at t_stamp=0.866s is
(cmd_vel,tire_wheel_angle) = (0.222,0.148) according to my understanding wheel_angle positive is CW</p>
<p>The bicycle model I am referring to is from pages 23 - 24. I would post the pictures here but my account is too new.
"Chapter 2, Lateral Vehicle Dynamics", R. Rajamani, Vehicle Dynamics and Control, Mechanical Engineering Series, <a href="https://www.springer.com/cda/content/document/cda_downloaddocument/9781461414322-c1.pdf?SGWID=0-0-45-1265143-p174267791">https://www.springer.com/cda/content/...</a>. (<a href="http://2012)https://www.springer.com/cda/content/document/cda_downloaddocument/9781461414322-c1.pdf?SGWID=0-0-45-1265143-p174267791">2012)https://www.springer.com/cda/con...</a>. (2012)</p>
<p>I am calculating the center of rotation from the rear axle
lf = 2.1685
lr = 0
delta_f = tire_wheel_angle from teb_local_planner
psi = yaw from teb_local_planner</p>
<p>From the calculations, I get the following
(d_x, d_y, d_psi) = (1.1e-2,-3.3e-3,-7.5e-4). These values are after multiplying dt =0.05</p>
<p>Adding these values to pose0, these don't seem to be close to pose1. If anyone could help offer any insight, I would greatly appreciate your help.</p>
<p>Thank you!</p>
https://answers.ros.org/question/386426/how-does-the-teb_local_planner-calculate-path-points-for-ackermann-steering-vehicles/?comment=386444#post-id-386444This is the code Ackermann drive to teb_local_planner to help your analysis: https://github.com/rst-tu-dortmund/teb_local_planner/blob/melodic-devel/scripts/cmd_vel_to_ackermann_drive.pyMon, 13 Sep 2021 19:04:36 -0500https://answers.ros.org/question/386426/how-does-the-teb_local_planner-calculate-path-points-for-ackermann-steering-vehicles/?comment=386444#post-id-386444Comment by osilva for <p>Hello all,</p>
<p>I am trying to understand whether the steering angle and vehicle velocity commands make sense from the teb_local_planner given the local path poses and orientation. Trying to get an intuitive understanding of what's going on with conventional bicycle model equations. I can't seem to get the calculations right or are the results just an approximation of the kinematic model from teb_local_planner? I am not quite certain which is the case. Appreciate any help you guys can offer!</p>
<p>pose0 from the local_path output should be the initial position of the vehicle.
(x,y,yaw) = (-21.87,11.4,-0.157), t_stamp=0.866s</p>
<p>pose1 from the local_path output should be the next position the vehicle is trying to reach.
(x,y,yaw) = (-21.78,11.39,-0.102),t_stamp=0.866s according to my understanding positive yaw is CCW</p>
<p>The command is applied at t_stamp=0.866s is
(cmd_vel,tire_wheel_angle) = (0.222,0.148) according to my understanding wheel_angle positive is CW</p>
<p>The bicycle model I am referring to is from pages 23 - 24. I would post the pictures here but my account is too new.
"Chapter 2, Lateral Vehicle Dynamics", R. Rajamani, Vehicle Dynamics and Control, Mechanical Engineering Series, <a href="https://www.springer.com/cda/content/document/cda_downloaddocument/9781461414322-c1.pdf?SGWID=0-0-45-1265143-p174267791">https://www.springer.com/cda/content/...</a>. (<a href="http://2012)https://www.springer.com/cda/content/document/cda_downloaddocument/9781461414322-c1.pdf?SGWID=0-0-45-1265143-p174267791">2012)https://www.springer.com/cda/con...</a>. (2012)</p>
<p>I am calculating the center of rotation from the rear axle
lf = 2.1685
lr = 0
delta_f = tire_wheel_angle from teb_local_planner
psi = yaw from teb_local_planner</p>
<p>From the calculations, I get the following
(d_x, d_y, d_psi) = (1.1e-2,-3.3e-3,-7.5e-4). These values are after multiplying dt =0.05</p>
<p>Adding these values to pose0, these don't seem to be close to pose1. If anyone could help offer any insight, I would greatly appreciate your help.</p>
<p>Thank you!</p>
https://answers.ros.org/question/386426/how-does-the-teb_local_planner-calculate-path-points-for-ackermann-steering-vehicles/?comment=386443#post-id-386443Very interesting question. What I am not clear is the connection to teb_local_planner calculation as you don’t show the output of such. I read in the documentation of how the Ackerman model is defined in this module so I’m not sure if you are referring to this or not.
http://wiki.ros.org/teb_local_planner/Tutorials/Planning%20for%20car-like%20robotsMon, 13 Sep 2021 18:54:17 -0500https://answers.ros.org/question/386426/how-does-the-teb_local_planner-calculate-path-points-for-ackermann-steering-vehicles/?comment=386443#post-id-386443Answer by osilva for <p>Hello all,</p>
<p>I am trying to understand whether the steering angle and vehicle velocity commands make sense from the teb_local_planner given the local path poses and orientation. Trying to get an intuitive understanding of what's going on with conventional bicycle model equations. I can't seem to get the calculations right or are the results just an approximation of the kinematic model from teb_local_planner? I am not quite certain which is the case. Appreciate any help you guys can offer!</p>
<p>pose0 from the local_path output should be the initial position of the vehicle.
(x,y,yaw) = (-21.87,11.4,-0.157), t_stamp=0.866s</p>
<p>pose1 from the local_path output should be the next position the vehicle is trying to reach.
(x,y,yaw) = (-21.78,11.39,-0.102),t_stamp=0.866s according to my understanding positive yaw is CCW</p>
<p>The command is applied at t_stamp=0.866s is
(cmd_vel,tire_wheel_angle) = (0.222,0.148) according to my understanding wheel_angle positive is CW</p>
<p>The bicycle model I am referring to is from pages 23 - 24. I would post the pictures here but my account is too new.
"Chapter 2, Lateral Vehicle Dynamics", R. Rajamani, Vehicle Dynamics and Control, Mechanical Engineering Series, <a href="https://www.springer.com/cda/content/document/cda_downloaddocument/9781461414322-c1.pdf?SGWID=0-0-45-1265143-p174267791">https://www.springer.com/cda/content/...</a>. (<a href="http://2012)https://www.springer.com/cda/content/document/cda_downloaddocument/9781461414322-c1.pdf?SGWID=0-0-45-1265143-p174267791">2012)https://www.springer.com/cda/con...</a>. (2012)</p>
<p>I am calculating the center of rotation from the rear axle
lf = 2.1685
lr = 0
delta_f = tire_wheel_angle from teb_local_planner
psi = yaw from teb_local_planner</p>
<p>From the calculations, I get the following
(d_x, d_y, d_psi) = (1.1e-2,-3.3e-3,-7.5e-4). These values are after multiplying dt =0.05</p>
<p>Adding these values to pose0, these don't seem to be close to pose1. If anyone could help offer any insight, I would greatly appreciate your help.</p>
<p>Thank you!</p>
https://answers.ros.org/question/386426/how-does-the-teb_local_planner-calculate-path-points-for-ackermann-steering-vehicles/?answer=386564#post-id-386564The following paper discusses that teb planner is optimizing based on "minimizing a cost function which capturing partially conflicting objectives" . The bicycle model may be an oversimplification unless you set parameters accordingly:
https://www.researchgate.net/profile/Franz-Albers/publication/326233414_Online_Trajectory_Optimization_and_Navigation_in_Dynamic_Environments_in_ROS/links/5f998357458515b7cfa44985/Online-Trajectory-Optimization-and-Navigation-in-Dynamic-Environments-in-ROS.pdf?origin=publication_detail
![image description](/upfiles/1631708343881072.png)
Source:
Online Trajectory Optimization and Navigation
in Dynamic Environments in ROS
Franz Albers??, Christoph R¨osmann, Frank Hoffmann and Torsten BertramWed, 15 Sep 2021 07:19:23 -0500https://answers.ros.org/question/386426/how-does-the-teb_local_planner-calculate-path-points-for-ackermann-steering-vehicles/?answer=386564#post-id-386564