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

Revision history [back]

click to hide/show revision 1
initial version

If you are interested in where the robot planes to go, then /move_base/TrajectoryPlannerROS/global_plan is correct. If the robot is moving, which I assume is the case because you say the trajectory changes in rViz, then this should be continually updating as the robot plans a new path from its current position. You should look carefully at the data in the messages to see if it is changing or not; I suspect it is, although possibly slowly.

If There are three topics that are particularly involved in carrying paths that the robot will follow:

  • plan, published by the global planner (NavfnROS is the default). This is the plan all the way to the goal (or to the edge of a map window, if that parameter is set). It is built based on the costmap, but because the costmap only includes sensor data where sensors are present (most often, this is sensors on the robot) it won't plan around obstacles that are not in the static map and are outside the robot's sensor visibility.
  • global_plan caries the portion of the global plan that the local planner is currently attempting to follow. It is published by the local planner, TrajectoryPlannerROS.
  • local_plan carries the path produced by the local planner, TrajectoryPlannerROS. This is also based on the costmap, but because it is only up to a short distance away it will include navigating around any visible obstacles as well. It also takes into account movement of the robot away from the global plan. This is why it often deviates from exactly matching the global path. Keep in mind that depending on how far ahead the local planner is working, there may not be much to show in the visualisation.

To see where the robot intends to go all the way to the goal, you are interested in where the robot planes to go, then /move_base/TrajectoryPlannerROS/global_plan is correct. If the robot is moving, which I assume is the case because you say the trajectory changes in rViz, then this should be continually updating as the robot plans a new path from its current position. You should look carefully at the data in the messages to plan. To see if it is changing or not; I suspect it is, although possibly slowly.where it plans to go in the short-term future, look at global_plan. To see where it will go immediately, including manoeuvering around obstacles, look at local_plan.