Ask Your Question

How is the base_local_planner using the odom message

asked 2015-06-11 10:21:32 -0600

Naman gravatar image

updated 2015-06-11 10:40:07 -0600

Hi all,

I am just getting familiar with move_base, specifically with the working of the base_local_planner. I went through the code and the documentation on the ros wiki but I have a small doubt regarding how is the odom (nav_msgs/Odometry) message used by the base_local_planner to give a better estimate of the command velocity (/cmd_vel) ? Is there any kind of a controller (maybe only P Control) which is present which reads the current robot velocity and accordingly generates the command velocity which is sent to the mobile base?
Sorry If I am being really naive, but it would be great if someone can clear my doubt or point me in the right direction?

Thanks in advance.
Naman Kumar

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-06-11 13:03:28 -0600

The base_local_planner , for example the DWA planner uses

  • The dwa sampling control to compute the velocity commands if the robot is not near the goal.
  • The "stop and rotate control" If the robot is near the goal.

Refer to this function: bool DWAPlannerROS::dwaComputeVelocityCommands(...) in dwa_planner_ros.cpp.

The bool DWAPlannerROS::dwaComputeVelocityCommands(...) function calls DWAPlanner::findBestPath(...) function (src) which uses the odom (nav_msgs/Odometry) to initialize a base_local_planner::SimpleTrajectoryGenerator and prepare the cost function. Then it calls the SimpleScoredSamplingPlanner::findBestTrajectory(...) function computes the trajectory for the robot from which the velocities are calculated. I guess this is what you call to be the "better estimate of the command velocity".

Refer to simple_scored_sampling_planner for the trajectory generation. The "trajectory planner" takes care of generating the "path" in addition to planning how to move based on the kinematics of the robot, velocity and the time. This can be seen analogous to P/PID controllers.

Hope it helps! Post back if you are still unclear. Thanks.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2015-06-11 10:21:32 -0600

Seen: 368 times

Last updated: Jun 11 '15