利用turtlebot 的导航配置文件
由于movbase发的速度太不友好了所以使用了ros自带的滤波安装相应的包
apt-get install ros-indigo-yocs-velocity-smoother
我的配置文件 standalone.yaml
# Example configuration:# - velocity limits are around a 10% above the physical limits# - acceleration limits are just low enough to avoid jerking# Mandatory parametersspeed_lim_v: 0.8speed_lim_w: 5.4accel_lim_v: 0.3accel_lim_w: 3.5# Optional parametersfrequency: 20.0decel_factor: 1.0# Robot velocity feedback type:# 0 - none# 1 - odometry# 2 - end robot commandsrobot_feedback: 2
我机器人的启动文件
建图的启动文件:gmapping.launch
//laser的topic名称,与自己的激光的topic相对应 //世界坐标 //启动slam的节点 //optimize机器人移动的初始值(距离) //optimize机器人移动的初始值(角度) //icp的迭代次数 //为0,表示所有的激光都处理,尽可能为零,如果计算压力过大,可以改成1 //以下四个参数是运动模型的噪声参数 //机器人移动linearUpdate距离,进行scanmatch //机器人选装angularUpdate角度,进行scanmatch //很重要,粒子个数 //map初始化的大小
导航启动文件:tb_demo_amcl.launch
tb_move_base.launch
tb_amcl.launch
base_local_planner_params.yaml
controller_frequency: 3.0recovery_behavior_enabled: falseclearing_rotation_allowed: falseTrajectoryPlannerROS: max_vel_x: 0.3 min_vel_x: 0.05 max_vel_y: 0.0 # zero for a differential drive robot min_vel_y: 0.0 min_in_place_vel_theta: 0.5 escape_vel: -0.1 acc_lim_x: 2.5 acc_lim_y: 0.0 # zero for a differential drive robot acc_lim_theta: 3.2 holonomic_robot: false yaw_goal_tolerance: 0.1 # about 6 degrees xy_goal_tolerance: 0.15 # 10 cm latch_xy_goal_tolerance: false pdist_scale: 0.8 gdist_scale: 0.6 meter_scoring: true heading_lookahead: 0.325 heading_scoring: false heading_scoring_timestep: 0.8 occdist_scale: 0.1 oscillation_reset_dist: 0.05 publish_cost_grid_pc: false prune_plan: true sim_time: 1.0 sim_granularity: 0.025 angular_sim_granularity: 0.025 vx_samples: 8 vy_samples: 0 # zero for a differential drive robot vtheta_samples: 20 dwa: true simple_attractor: false
costmap_common_params.yaml
obstacle_range: 2.5raytrace_range: 3.0robot_radius: 0.165inflation_radius: 0.3max_obstacle_height: 0.6min_obstacle_height: 0.0observation_sources: scanscan: {data_type: LaserScan, topic: /scan, marking: true, clearing: true, expected_update_rate: 0}
global_costmap_params.yaml
global_costmap: global_frame: /map robot_base_frame: /base_footprint update_frequency: 1.0 publish_frequency: 0 static_map: true rolling_window: false resolution: 0.01 transform_tolerance: 1.0 map_type: costmap
local_costmap_params.yaml
local_costmap: global_frame: /odom robot_base_frame: /base_footprint update_frequency: 5.0 publish_frequency: 1.0 static_map: false rolling_window: true width: 6.0 height: 6.0 resolution: 0.01 transform_tolerance: 1.0 map_type: costmap
把原先建好的图map.pgm map.yaml 放在功能包/maps/下
roslaunch odom_tf_package start.launch 机器人启动文件roscat navigation_tutorials tb_demo_amcl.launch 导航文件roslaunch navigation_tutorials rviz.launc rviz启动文件