move_base

move_base.launch

<launch>
  <!-- Arguments -->
  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
  <arg name="cmd_vel_topic" default="/cmd_vel" />
  <arg name="odom_topic" default="odom" />
  <arg name="move_forward_only" default="false"/>

  <!-- move_base -->
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
    <rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find turtlebot3_navigation)/param/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find turtlebot3_navigation)/param/move_base_params.yaml" command="load" />
    <rosparam file="$(find turtlebot3_navigation)/param/dwa_local_planner_params_$(arg model).yaml" command="load" />
    <remap from="cmd_vel" to="$(arg cmd_vel_topic)"/>
    <remap from="odom" to="$(arg odom_topic)"/>
    <param name="DWAPlannerROS/min_vel_x" value="0.0" if="$(arg move_forward_only)" />
  </node>
</launch>
dwa_local_planner

costmap_common_params_waffle.yaml

obstacle_range: 3.0
raytrace_range: 3.5

footprint: [[-0.205, -0.155], [-0.205, 0.155], [0.077, 0.155], [0.077, -0.155]]
#robot_radius: 0.17

: 1.0
cost_scaling_factor: 3.0

map_type: costmap
observation_sources: scan
scan: {sensor_frame: base_scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}
Explanation

The provided configuration snippet seems to be for a costmap used in robotics, particularly in robot navigation systems. Let's break down each parameter:

  1. obstacle_range: This parameter defines the range (in meters) up to which obstacles are considered by the costmap. In this case, it's set to 3.0 meters, meaning obstacles within this range are accounted for.

  2. raytrace_range: This parameter sets the range (in meters) for which rays are traced to detect obstacles. It's set to 3.5 meters, which means rays will be traced up to this distance to detect obstacles in the environment.

  3. footprint: Defines the shape of the robot's footprint on the ground. It's represented as a list of points in the robot's coordinate frame. Each point is specified as [x, y], where x and y are the coordinates of the point relative to the robot's center.

  4. inflation_radius: This parameter sets the radius (in meters) of inflation applied around obstacles. It's used to create a safety margin around obstacles to ensure the robot avoids collisions.

  5. cost_scaling_factor: This parameter scales the cost values assigned to cells in the costmap. Higher values will result in more conservative path planning, as it increases the cost of traversing through cells.

  6. map_type: Specifies the type of map being used. In this case, it's a "costmap".

  7. observation_sources: Specifies the sources of observations used to update the costmap.

  8. scan: Specifies parameters related to laser scan observations.

    • sensor_frame: The frame ID of the sensor publishing the laser scan data.

    • data_type: The type of data published by the sensor, in this case, "LaserScan".

    • topic: The ROS topic on which the laser scan data is published.

    • marking: A boolean value indicating whether the obstacles detected by the laser scan should be marked as obstacles in the costmap.

    • clearing: A boolean value indicating whether areas where no obstacles are detected should be marked as clear in the costmap.

This configuration is essential for setting up and tuning the costmap used for obstacle avoidance and path planning in robot navigation systems. Adjusting these parameters allows fine-tuning of the robot's behavior and navigation performance in different environments.

global_costmap_params

global_costmap:
  global_frame: map
  robot_base_frame: base_footprint

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5

  static_map: true
 

local_costmap_params.yaml

local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5  

  static_map: false  
  rolling_window: true
  width: 3
  height: 3
  resolution: 0.05
Explanation
  1. local_costmap: This is the section defining parameters for the local costmap.

  2. global_frame: Specifies the global coordinate frame in which the costmap operates. In this case, it's set to "odom", which typically represents the robot's odometry frame.

  3. robot_base_frame: Specifies the frame attached to the robot's base. This frame is usually the point of reference for the robot's position and orientation.

  4. update_frequency: Defines how frequently (in Hertz) the costmap is updated. Here, it's set to 10.0 Hz, meaning the costmap is updated ten times per second.

  5. publish_frequency: Specifies how frequently (in Hertz) the costmap is published. Similar to update_frequency, it's set to 10.0 Hz in this case.

  6. transform_tolerance: Specifies the time tolerance (in seconds) for transform validity. This parameter indicates how long the transform between coordinate frames remains valid. A value of 0.5 seconds means that a transform older than 0.5 seconds is considered invalid.

  7. static_map: A boolean parameter indicating whether to use a static map. If set to true, the local costmap will use a static map for navigation. Here, it's set to false, meaning the costmap will not rely on a static map.

  8. rolling_window: Specifies whether to use a rolling window approach for the local costmap. When set to true, only a portion of the map around the robot is updated, improving efficiency.

  9. width: Defines the width (in meters) of the local costmap. In this case, it's set to 3 meters.

  10. height: Defines the height (in meters) of the local costmap. Here, it's also set to 3 meters.

  11. resolution: Specifies the resolution (in meters per cell) of the costmap. A lower resolution means each cell represents a larger area of space. Here, it's set to 0.05 meters, indicating a relatively fine resolution.

move_base_params.yaml

shutdown_costmaps: false
controller_frequency: 10.0
planner_patience: 5.0
controller_patience: 15.0
conservative_reset_dist: 3.0
planner_frequency: 5.0
oscillation_timeout: 10.0
oscillation_distance: 0.2
Explanation
  1. shutdown_costmaps: This boolean parameter determines whether to shut down the costmaps when move_base is stopped. Costmaps are essential for local and global path planning and obstacle avoidance. When set to false, move_base will not automatically shut down the costmaps upon stopping.

  2. controller_frequency: Specifies the frequency (in Hertz) at which the local trajectory controller runs. The controller is responsible for executing the planned path and navigating the robot along it. In this case, it's set to 10.0 Hz, meaning the controller updates ten times per second.

  3. planner_patience: Indicates the maximum time (in seconds) move_base is willing to spend in finding a valid plan. If the planner exceeds this time, move_base will stop the planning process and attempt to recover. Here, it's set to 5.0 seconds.

  4. controller_patience: Specifies the maximum time (in seconds) move_base allows for executing a single control loop of the local trajectory controller. If the controller exceeds this time, move_base will attempt to recover. In this case, it's set to 15.0 seconds.

  5. conservative_reset_dist: Defines the distance threshold (in meters) used for conservative reset checks. Move_base monitors the robot's position and may reset its internal state if it detects significant deviations or errors. This parameter helps determine when such a reset is triggered. Here, it's set to 3.0 meters.

  6. planner_frequency: Specifies the frequency (in Hertz) at which the global planner runs. The global planner is responsible for generating a high-level path from the robot's current position to the goal. In this case, it's set to 5.0 Hz, meaning the planner updates five times per second.

  7. oscillation_timeout: Defines the maximum time (in seconds) move_base allows for detecting robot oscillation. Oscillation refers to the robot getting stuck in a loop without making progress. If the robot oscillates for longer than this timeout, move_base will attempt to recover. Here, it's set to 10.0 seconds.

  8. oscillation_distance: Specifies the minimum distance (in meters) the robot must travel to consider its movement as non-oscillatory. This parameter helps move_base distinguish between meaningful robot movements and oscillations. In this case, it's set to 0.2 meters.

dwa_local_planner_params_waffle.yaml

DWAPlannerROS:

# Robot Configuration Parameters
  max_vel_x: 0.26
  min_vel_x: -0.26

  max_vel_y: 0.0
  min_vel_y: 0.0

# The velocity when robot is moving in a straight line
  max_vel_trans:  0.26
  min_vel_trans:  0.13

  max_vel_theta: 1.82
  min_vel_theta: 0.9

  acc_lim_x: 2.5
  acc_lim_y: 0.0
  acc_lim_theta: 3.2 

# Goal Tolerance Parametes
  xy_goal_tolerance: 0.05
  yaw_goal_tolerance: 0.17
  latch_xy_goal_tolerance: false

# Forward Simulation Parameters
  sim_time: 2.0
  vx_samples: 20
  vy_samples: 0
  vth_samples: 40
  controller_frequency: 10.0

# Trajectory Scoring Parameters
  path_distance_bias: 32.0
  goal_distance_bias: 20.0
  occdist_scale: 0.02
  forward_point_distance: 0.325
  stop_time_buffer: 0.2
  scaling_speed: 0.25
  max_scaling_factor: 0.2

# Oscillation Prevention Parameters
  oscillation_reset_dist: 0.05

# Debugging
  publish_traj_pc : true
  publish_cost_grid_pc: true
Explanation
  1. max_vel_x: Maximum linear velocity in the x direction (forward/backward motion) that the robot can achieve. Here, it's set to 0.26 m/s.

  2. min_vel_x: Minimum linear velocity in the x direction. This is typically set to a negative value for the backward motion. Here, it's set to -0.26 m/s.

  3. max_vel_y and min_vel_y: Maximum and minimum linear velocity in the y direction (sideways motion). In this case, both are set to 0.0, indicating no sideways motion.

  4. max_vel_trans: Maximum translational velocity, typically used when the robot is moving in a straight line. Here, it's set to 0.26 m/s.

  5. min_vel_trans: Minimum translational velocity, used for slower movement when the robot needs to navigate with more precision. Here, it's set to 0.13 m/s.

  6. max_vel_theta: Maximum angular velocity (yaw rate) that the robot can achieve. Here, it's set to 1.82 radians/s.

  7. min_vel_theta: Minimum angular velocity. This is typically set to a lower value to allow the robot to turn more slowly. Here, it's set to 0.9 radians/s.

  8. acc_lim_x, acc_lim_y, acc_lim_theta: Acceleration limits in the x, y, and angular (theta) directions, respectively.

  9. xy_goal_tolerance: Tolerance for the Euclidean distance between the robot's position and the goal position in the x-y plane.

  10. yaw_goal_tolerance: Tolerance for the difference in orientation (yaw) between the robot's orientation and the goal orientation.

  11. latch_xy_goal_tolerance: If set to true, the xy_goal_tolerance will be used continuously once it's achieved.

  12. sim_time: The length of time (in seconds) over which to simulate trajectories for scoring.

  13. vx_samples, vy_samples, vth_samples: Number of samples to use for velocity in the x, y, and angular (theta) directions, respectively.

  14. controller_frequency: Frequency (in Hertz) at which the controller runs.

  15. path_distance_bias, goal_distance_bias, occdist_scale: Parameters for trajectory scoring. They adjust the importance of various factors in scoring trajectories.

  16. forward_point_distance: Distance (in meters) ahead of the robot to consider for scoring trajectories.

  17. stop_time_buffer: Buffer time (in seconds) added to the time taken for the robot to stop.

  18. scaling_speed: Speed factor used in scaling trajectory velocities.

  19. max_scaling_factor: Maximum scaling factor allowed for trajectory velocities.

  20. oscillation_reset_dist: Distance (in meters) the robot must travel before an oscillation check is reset.

  21. publish_traj_pc: Boolean indicating whether to publish the trajectory as a PointCloud.

  22. publish_cost_grid_pc: Boolean indicating whether to publish the cost grid as a PointCloud.

Last updated