建造属于你的无人驾驶车!
本专栏持续更新中…
程序源码:https://github.com/kkmd66/ZZX_RUN
Solidworks模型文件:https://github.com/kkmd66/ZZX_RUN/releases/tag/ZZX_RUN_Solidworks
第一步,源码安装导航算法
源码地址:https://github.com/kkmd66/ZZX_RUN/tree/main/navigation
下载后,放入工作空间,catkin_make进行编译,时间较长,骚等片刻…
第二步,创建Move_base导航参数文件
虚拟导航:
base_local_planner_params.yaml:
文件位置:zzx_run_navigation/config/fake/base_local_planner_params.yaml
controller_frequency: 3.0
recovery_behavior_enabled: false
clearing_rotation_allowed: false
TrajectoryPlannerROS:
max_vel_x: 2.0
min_vel_x: 0.1
max_vel_y: 0.0 # zero for a differential drive robot
min_vel_y: 0.0
max_vel_theta: 2.0
min_vel_theta: -2.0
min_in_place_vel_theta: 0.4
escape_vel: -0.1
acc_lim_x: 1.0
acc_lim_y: 0.0 # zero for a differential drive robot
acc_lim_theta: 1.2
holonomic_robot: false
yaw_goal_tolerance: 0.1 # about 6 degrees
xy_goal_tolerance: 0.05 # 5 cm
latch_xy_goal_tolerance: false
pdist_scale: 0.4
gdist_scale: 0.8
meter_scoring: true
heading_lookahead: 0.325
heading_scoring: false
heading_scoring_timestep: 0.8
occdist_scale: 0.05
oscillation_reset_dist: 0.05
publish_cost_grid_pc: false
prune_plan: true
sim_time: 1.0
sim_granularity: 0.05
angular_sim_granularity: 0.1
vx_samples: 8
vy_samples: 0 # zero for a differential drive robot
vtheta_samples: 20
dwa: true
simple_attractor: false
costmap_common_params.yaml:
文件位置:zzx_run_navigation/config/fake/costmap_common_params.yaml
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.557155, 0.415605], [0.557155, -0.415605], [-0.557155, -0.415605], [-0.557155, 0.415605]]
#footprint_inflation: 0.01
# robot_radius: 0.175
inflation_radius: 0.415605
max_obstacle_height: 2.0
min_obstacle_height: 0.0
observation_sources: scan
scan: {data_type: LaserScan, topic: /scan, marking: true, clearing: true, expected_update_rate: 0}
global_costmap_params.yaml:
文件位置:zzx_run_navigation/config/fake/global_costmap_params.yaml
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 1.0
publish_frequency: 1.0
static_map: true
rolling_window: false
resolution: 0.01
transform_tolerance: 1.0
map_type: costmap
lobal_costmap_params.yaml:
文件位置:zzx_run_navigation/config/fake/lobal_costmap_params.yaml
local_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 3.0
publish_frequency: 1.0
static_map: true
rolling_window: false
width: 6.0
height: 6.0
resolution: 0.01
transform_tolerance: 1.0
仿真导航:
base_local_planner_params.yaml:
文件位置:zzx_run_navigation/config/real/base_local_planner_params.yaml
controller_frequency: 3.0
recovery_behavior_enabled: false
clearing_rotation_allowed: false
TrajectoryPlannerROS:
max_vel_x: 1.5
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: 1.0
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.1 # 10 cm
latch_xy_goal_tolerance: false
pdist_scale: 0.9
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:
文件位置:zzx_run_navigation/config/real/costmap_common_params.yaml
obstacle_range: 5.0
raytrace_range: 5.0
footprint: [[0.557155, 0.415605], [0.557155, -0.415605], [-0.557155, -0.415605], [-0.557155, 0.415605]]
footprint_inflation: 0.01
# robot_radius: 0.175
inflation_radius: 0.415605
max_obstacle_height: 2.0
min_obstacle_height: 0.0
observation_sources: scan
scan: {data_type: LaserScan, topic: /scan, marking: true, clearing: true, expected_update_rate: 0}
global_costmap_params.yaml:
文件位置:zzx_run_navigation/config/real/global_costmap_params.yaml
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 1.0
publish_frequency: 0.5
static_map: true
rolling_window: false
resolution: 0.01
transform_tolerance: 1.0
map_type: costmap
lobal_costmap_params.yaml:
文件位置:zzx_run_navigation/config/real/lobal_costmap_params.yaml
local_costmap:
global_frame: odom
robot_base_frame: base_footprint
update_frequency: 3.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.01
transform_tolerance: 1.0
map_type: costmap
最后
有问题可以找我交流~