Robot in ROS_ Parameter configuration of param folder in navigation
Transfer from http://www.cnblogs.com/zjiaxing/p/5559382.html
Our robot uses two navigation algorithms to move in the map: global navigation and local navigation. These navigation algorithms process all kinds of information in the map through the cost map. One costmap is used for global planning and long-term planning in the whole environment, while the other is used for local planning and obstacle avoidance.
Global navigation:
Make a long-distance target path planning on the established map.
Local navigation:
Make short-range targets on the map being established, and plan the path to avoid obstacles in real time.
robot_ Analysis of param folder in navigation
Basic parameter configuration
The basic parameters are configured in the param folder costmap_common_params.yaml. The contents are as follows:
obstacle_range: 2.5 raytrace_range: 3.0 footprint: [[x0, y0], [x1, y1], ... [xn, yn]] #robot_radius: ir_of_robot inflation_radius: 0.55 observation_sources: laser_scan_sensor point_cloud_sensor laser_scan_sensor: {sensor_frame: frame_name, data_type: LaserScan, topic: topic_name, marking: true, clearing: true} point_cloud_sensor: {sensor_frame: frame_name, data_type: PointCloud, topic: topic_name, marking: true, clearing: true}
This file is mainly used to configure basic parameters, which will be used for local_costmap and global_costmap.
obstacle_range and raytrace_range: indicates the maximum detection distance of the sensor, and the obstacle detection information is introduced into the cost map. obstacle_range is used for obstacle detection. For example, if the robot detects an obstacle with a distance of less than 2.5m, it will introduce the obstacle into the cost map.
raytrace_range is used to remove obstacles in the cost map in real time during the movement of the robot. For example, the robot will remove obstacles with a distance of 3m in front (data obtained by the sensor). And update the movable free space data. In fact, we can't perceive the shape and size of objects with laser sensors, but this measurement result is enough for positioning.
footprint: tell the geometric parameters of the robot to the navigation function package. In this way, a reasonable distance is maintained between the robot and the obstacle, that is, for example, if there is a door ahead, it is necessary to find out whether the robot can pass through the door in advance.
inflation_radius: the minimum distance that must be maintained between a given robot and an obstacle. The obstacles are expanded according to the inscribed radius of the robot.
observation_sources: set the sensors used by the navigation package.
laser_scan_sensor and point_cloud_sensor: configure the coordinate system and data of the sensor. This will also be used to add and remove obstacles to the cost map. For example, you can use lidar sensors to add obstacles to the cost map, and then add kinect to navigate and remove obstacles.
Global cost map configuration
The global cost map is configured in the param folder_ costmap_ params. yaml. The contents are as follows:
global_costmap: global_frame: /map robot_base_frame: base_link update_frequency: 5.0 static_map: true
global_costmap and robot_base_frame: define the coordinate transformation between the robot and the map. This transformation must be used to establish the global cost map.
update_frequency: the frequency of map updates.
static_map: whether to use a map or map server to initialize the global cost map. If static map is not used, this parameter is false.
Configuration of local cost map:
The local cost map is configured in the param folder_ costmap_ params. yaml. The contents are as follows:
local_costmap: global_frame: odom robot_base_frame: base_link update_frequency: 5.0 publish_frequency: 2.0 static_map: false rolling_window: true width: 6.0 height: 6.0 resolution: 0.05
publish_frequency: the frequency of publishing information, that is, the frequency of publishing costmap visual information.
rolling_window: in the process of robot movement, the cost map always takes the robot as the center. This is an if function in the source code.
width, height, resolution: the size and resolution of the cost map, in m. Generally, the value of resolution is consistent with that of the static map.
Local planner configuration:
The local planner is configured in the param folder_ local_ planner_ params. yaml. The contents are as follows:
TrajectoryPlannerROS: max_vel_x: 0.45 min_vel_x: 0.1 max_vel_theta: 1.0 min_in_place_vel_theta: 0.4 acc_lim_theta: 3.2 acc_lim_x: 2.5 acc_lim_y: 2.5 holonomic_robot: false
This configuration file sets the maximum and minimum speed limits of the robot, as well as the acceleration limits.
holonomic_robot: if your robot is an omnidirectional mobile robot, this value is true, and the author's is differential.
Navigation feature pack set:
The navigation function package set is configured to move in the param folder_ base_ params. yaml. The contents are as follows:
controller_frequency: 2.0 controller_patience: 15.0 planner_frequency: 1.0 planner_patience: 5.0 conservative_reset_dist: 0.2 oscillation_timeout: 10.0 oscillation_distance: 0.2 clearing_rotation_allowed: false
Monte Carlo location (AMCL) algorithm:
The local planner is configured in the param folder_ local_ planner_ params. yaml. The contents are as follows:
use_map_topic: true odom_frame_id: "odom" base_frame_id: "base_footprint" global_frame_id: "map" ## Publish scans from best pose at a max of 10 Hz odom_model_type: "diff" odom_alpha5: 0.1 gui_publish_rate: 10.0 laser_max_beams: 60 laser_max_range: 12.0 min_particles: 500 max_particles: 2000 kld_err: 0.05 kld_z: 0.99 odom_alpha1: 0.2 odom_alpha2: 0.2 ## translation std dev, m odom_alpha3: 0.2 odom_alpha4: 0.2 laser_z_hit: 0.5 aser_z_short: 0.05 laser_z_max: 0.05 laser_z_rand: 0.5 laser_sigma_hit: 0.2 laser_lambda_short: 0.1 laser_model_type: "likelihood_field" # "likelihood_field" or "beam" laser_likelihood_max_dist: 2.0 update_min_d: 0.25 update_min_a: 0.2 resample_interval: 1 ## Increase tolerance because the computer can get quite busy transform_tolerance: 1.0 recovery_alpha_slow: 0.001 recovery_alpha_fast: 0.1
min_particles and max_particles: set the minimum and maximum number of particles allowed for the operation of the algorithm. If there are many particles, it will be more accurate. Of course, it will consume more cpu resources.
laser_model_type: configure the lidar type. beam radar can also be set.
laser_likelihood_max_dist: sets the maximum distance of obstacle expansion in the map.