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

Revision history [back]

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.