Skip to content

Commit 611cd0c

Browse files
committed
update ROS1_NAV1
1 parent 2996f2e commit 611cd0c

File tree

6 files changed

+40
-14
lines changed

6 files changed

+40
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<launch>
2+
<!-- 启动SLAM节点 -->
3+
<include file="$(find nav_demo)/launch/nav01_slam.launch" />
4+
<!-- 运行move_base节点 -->
5+
<include file="$(find nav_demo)/launch/nav07_path.launch" />
6+
<!-- 运行rviz(slam已经包含) -->
7+
<!-- <node pkg="rviz" type="rviz" name="rviz" args="-d $(find mycar_nav)/rviz/nav.rviz" /> -->
8+
</launch>

ROS1_WS/WS05_simulations/src/nav_demo/param/base_local_planner_params.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ TrajectoryPlannerROS:
33
# Robot Configuration Parameters
44
max_vel_x: 0.5 # X 方向最大速度
55
min_vel_x: 0.1 # X 方向最小速速
6+
max_vel_y: 0.0 # Y 方向最大速度
7+
min_vel_y: 0.0 # Y 方向最小速速
68

7-
max_vel_theta: 1.0 #
9+
max_vel_theta: 1.0
810
min_vel_theta: -1.0
11+
# 原地旋转最小角速度
912
min_in_place_vel_theta: 1.0
1013

1114
acc_lim_x: 1.0 # X 加速限制
1215
acc_lim_y: 0.0 # Y 加速限制
13-
acc_lim_theta: 0.6 # 角速度加速限制
16+
acc_lim_theta: 0.6 # 角速度加速限制(rad)
1417

1518
# Goal Tolerance Parameters,目标公差
1619
xy_goal_tolerance: 0.10
@@ -21,7 +24,7 @@ TrajectoryPlannerROS:
2124
holonomic_robot: false
2225

2326
# Forward Simulation Parameters,前进模拟参数
24-
sim_time: 0.8
27+
sim_time: 0.8 # 数值越大,本地路径规划会越贴近于全局路径规划;如果说机器人被困住,可以调这个参数
2528
vx_samples: 18
2629
vtheta_samples: 20
2730
sim_granularity: 0.05

ROS1_WS/WS05_simulations/src/nav_demo/param/costmap_common_params.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
# 全局代价地图可以将膨胀半径和障碍物系数设置的偏大一些;
2+
# 本地代价地图可以将膨胀半径和障碍物系数设置的偏小一些。
3+
# 这样,在全局路径规划时,规划的路径会尽量远离障碍物,而本地路径规划时,机器人即便偏离全局路径也会和障碍物之间保留更大的自由空间,从而避免了陷入“假死”的情形。
4+
5+
16
#机器人几何参,如果机器人是圆形,设置 robot_radius,如果是其他形状设置 footprint
27
robot_radius: 0.12 #圆形
38
# footprint: [[-0.12, -0.12], [-0.12, 0.12], [0.12, 0.12], [0.12, -0.12]] #其他形状
49

510
obstacle_range: 3.0 # 用于障碍物探测,比如: 值为 3.0,意味着检测到距离小于 3 米的障碍物时,就会引入代价地图
611
raytrace_range: 3.5 # 用于清除障碍物,比如:值为 3.5,意味着清除代价地图中 3.5 米以外的障碍物
712

8-
913
#膨胀半径,扩展在碰撞区域以外的代价区域,使得机器人规划路径避开障碍物
1014
inflation_radius: 0.2
1115
#代价比例系数,越大则代价值越小
1216
cost_scaling_factor: 3.0
1317

14-
#地图类型
18+
#地图类型(代价地图类型)
1519
map_type: costmap
1620
#导航包所需要的传感器
1721
observation_sources: scan

ROS1_WS/WS05_simulations/src/nav_demo/param/global_costmap_params.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@ global_costmap:
77
publish_frequency: 1.0 #代价地图的发布频率
88
transform_tolerance: 0.5 #等待坐标变换发布信息的超时时间
99

10+
#膨胀半径,扩展在碰撞区域以外的代价区域,使得机器人规划路径避开障碍物
11+
inflation_radius: 0.2
12+
#代价比例系数,越大则代价值越小
13+
cost_scaling_factor: 3.0
14+
15+
1016
static_map: true # 是否使用一个地图或者地图服务器来初始化全局代价地图,如果不使用静态地图,这个参数为false.

ROS1_WS/WS05_simulations/src/nav_demo/param/local_costmap_params.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ local_costmap:
33
robot_base_frame: base_footprint #机器人坐标系
44

55
update_frequency: 10.0 #代价地图更新频率
6-
publish_frequency: 10.0 #代价地图的发布频率
6+
publish_frequency: 10.0 #代价地图的发布频率(本地代价地图更新频率要高一点)
77
transform_tolerance: 0.5 #等待坐标变换发布信息的超时时间
88

9+
#膨胀半径,扩展在碰撞区域以外的代价区域,使得机器人规划路径避开障碍物
10+
inflation_radius: 0.3
11+
#代价比例系数,越大则代价值越小
12+
cost_scaling_factor: 3.0
13+
914
static_map: false #不需要静态地图,可以提升导航效果
1015
rolling_window: true #是否使用动态窗口,默认为false,在静态的全局地图中,地图不会变化
1116
width: 3 # 局部地图宽度 单位是 m

ROS1_WS/WS05_simulations/src/nav_demo/rviz/nav.rviz

+8-8
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Visualization Manager:
236236
Axes Radius: 0.009999999776482582
237237
Class: rviz/PoseArray
238238
Color: 255; 25; 0
239-
Enabled: false
239+
Enabled: true
240240
Head Length: 0.07000000029802322
241241
Head Radius: 0.029999999329447746
242242
Name: PoseArray
@@ -246,7 +246,7 @@ Visualization Manager:
246246
Shape: Arrow (Flat)
247247
Topic: /particlecloud
248248
Unreliable: false
249-
Value: false
249+
Value: true
250250
- Alpha: 0.699999988079071
251251
Class: rviz/Map
252252
Color Scheme: map
@@ -353,17 +353,17 @@ Visualization Manager:
353353
Views:
354354
Current:
355355
Class: rviz/Orbit
356-
Distance: 16.71426773071289
356+
Distance: 7.3384785652160645
357357
Enable Stereo Rendering:
358358
Stereo Eye Separation: 0.05999999865889549
359359
Stereo Focal Distance: 1
360360
Swap Stereo Eyes: false
361361
Value: false
362362
Field of View: 0.7853981852531433
363363
Focal Point:
364-
X: -1.5773818492889404
365-
Y: 0.7030596733093262
366-
Z: 0.6134076118469238
364+
X: 2.120615005493164
365+
Y: 1.4915504455566406
366+
Z: 0.6097334027290344
367367
Focal Shape Fixed Size: true
368368
Focal Shape Size: 0.05000000074505806
369369
Invert Z Axis: false
@@ -389,5 +389,5 @@ Window Geometry:
389389
Views:
390390
collapsed: true
391391
Width: 1200
392-
X: 270
393-
Y: 63
392+
X: 467
393+
Y: 32

0 commit comments

Comments
 (0)