ROS自主导航机器人

ROS机器人底盘(16)-move_base(4)-planne

2018-01-24  本文已影响173人  PIBOT导航机器人

global_planner

GlobalPlanner:                                  # Also see: http://wiki.ros.org/global_planner
  old_navfn_behavior: false                     # Exactly mirror behavior of navfn, use defaults for other boolean parameters, default false
  use_quadratic: true                           # Use the quadratic approximation of the potential. Otherwise, use a simpler calculation, default true
  use_dijkstra: true                            # Use dijkstra's algorithm. Otherwise, A*, default true
  use_grid_path: false                          # Create a path that follows the grid boundaries. Otherwise, use a gradient descent method, default false
  allow_unknown: true                           # Allow planner to plan through unknown space, default true
                                                #Needs to have track_unknown_space: true in the obstacle / voxel layer (in costmap_commons_param) to work
  planner_window_x: 0.0                         # default 0.0
  planner_window_y: 0.0                         # default 0.0
  default_tolerance: 0.5                        # If goal in obstacle, plan to the closest point in radius default_tolerance, default 0.0
  
  publish_scale: 100                            # Scale by which the published potential gets multiplied, default 100
  planner_costmap_publish_frequency: 0.0        # default 0.0
  
  lethal_cost: 253                              # default 253
  neutral_cost: 66                              # default 50
  cost_factor: 0.55                              # Factor to multiply each cost from costmap by, default 3.0
  publish_potential: true                       # Publish Potential Costmap (this is not like the navfn pointcloud2 potential), default true

move_base 中的base_global_planner配置为
base_global_planner: global_planner/GlobalPlanner

先看下global_planner的接口定义(前面讲过所有的实际的都是该接口的实现)

global_planner
接口很简单,总共只有三个还有个重载函数,看名字就知道,一个初始化,还有个是规划路径,可以的话你也可以实现这些接口完成你自己的global_planner,目前可以使用的有三种

-allow unknown(true)

摘自【ROS Navigation Tuning Guide】

local_planner

DWAPlannerROS:

# Robot Configuration Parameters - Kobuki
  max_vel_x: 0.25
  min_vel_x: 0.05

  max_vel_y: 0
  min_vel_y: 0

  max_trans_vel: 0.35 # choose slightly less than the base's capability
  min_trans_vel: 0.001  # this is the min trans velocity when there is negligible rotational velocity
  trans_stopped_vel: 0.05

  # Warning!
  #   do not set min_trans_vel to 0.0 otherwise dwa will always think translational velocities
  #   are non-negligible and small in place rotational velocities will be created.

  max_rot_vel: 0.6  # choose slightly less than the base's capability
  min_rot_vel: 0.4  # this is the min angular velocity when there is negligible translational velocity
  rot_stopped_vel: 0.1
  
  acc_lim_x: 1 # maximum is theoretically 2.0, but we 
  acc_lim_theta: 1.5 
  acc_lim_y: 0      # diff drive robot

# Goal Tolerance Parameters
  yaw_goal_tolerance: 0.2 
  xy_goal_tolerance: 0.15  
  latch_xy_goal_tolerance: true

# Forward Simulation Parameters
  sim_time: 2.0       # 1.7
  vx_samples: 10       # 3
  vy_samples: 1
  vtheta_samples: 20  # 20

# Trajectory Scoring Parameters
  path_distance_bias: 32.0      # 32.0   - weighting for how much it should stick to the global path plan
  goal_distance_bias: 24.0      # 24.0   - wighting for how much it should attempt to reach its goal
  occdist_scale: 0.4            # 0.01   - weighting for how much the controller should avoid obstacles
  forward_point_distance: 0.325 # 0.325  - how far along to place an additional scoring point
  stop_time_buffer: 0.2         # 0.2    - amount of time a robot must stop in before colliding for a valid traj.
  scaling_speed: 0.25           # 0.25   - absolute velocity at which to start scaling the robot's footprint
  max_scaling_factor: 0.2       # 0.2    - how much to scale the robot's footprint when at speed.

# Oscillation Prevention Parameters
  oscillation_reset_dist: 0.05  # 0.05   - how far to travel before resetting oscillation flags

# Debugging
  publish_traj_pc : true
  publish_cost_grid_pc: true
  global_frame_id: odom


# Differential-drive robot configuration - necessary?
#  holonomic_robot: false

move_base 中的base_local_planner配置为
base_local_planner: "dwa_local_planner/DWAPlannerROS"

DWAPlannerROS

同样该类实现了base_local_planner的接口,我们看下接口

base_local_planner
接口也不算复杂,字面理解分别为:

另外还有

上一篇下一篇

猜你喜欢

热点阅读