Ver Fonte

更新costmap参数

corvin há 4 anos atrás
pai
commit
190754b18e

+ 27 - 9
src/robot_navigation/config/costmap_common_params.yaml

@@ -1,20 +1,38 @@
-#Copyright(c):2016-2020 ROS小课堂 www.corvin.cn
-#Author: corvin
-#Description:
+# Copyright(c):2016-2020 ROS小课堂 www.corvin.cn
+# Description:
 # 代价地图通用配置文件,各参数意义如下:
 #   obstacle_range: 最大障碍物检测范围,超过该范围不认为是障碍物
 #   raytrace_range: 检测自由空间的最大范围
-#   robot_radius: 机器人本体的半径大小,单位:米
+#   robot_radius: 机器人本体的半径大小,单位:米,圆形机器人使用.
+#   footprint: 对于非圆形机器人可以设置该参数,机器人中心[0,0]
+#     参数可以顺时针填写,也可以逆时针填写.
 #   inflation_radius: 与障碍物的安全半径距离,如果机器人经常撞到
 #     障碍物就需要增大该值,若无法通过狭窄地方就减小该值
+#   cost_scaling_factor:用于将inflation计算cost的比例因数,该参数
+#     越大,越不把这个inflating看着移动的cost.
+#   map_type:如果想要3D视图的就用voxel,2D视图的就用costmap参数.
 #   observation_sources: 观察源是激光雷达
+# Author: corvin
 # History:
-#  20180410: init this file.
-
+#   20180410:init this file.
+#   20200413:更新参数并更新注释信息.
+#
 obstacle_range: 1.0
-raytrace_range: 2.0
-robot_radius: 0.175
-inflation_radius: 0.2
+raytrace_range: 1.5
+
+#圆形机器人的参数
+#robot_radius: 0.175
+
+#圆形机器人前面带上下移动夹爪的参数
+footprint: [[ 0.00,  0.22],[-0.04,  0.22],[-0.04,  0.10],
+            [-0.71,  0.71],[-0.10,  0.00],[-0.71, -0.71],
+            [ 0.00, -0.10],[ 0.71, -0.71],[ 0.10,  0.00],
+            [ 0.71,  0.71],[ 0.04,  0.10],[ 0.04,  0.22]]
+
+inflation_radius: 0.15
+cost_scaling_factor: 10
+
+map_type: costmap
 
 observation_sources: scan
 scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true}

+ 6 - 6
src/robot_navigation/launch/gmapping_ydlidar_X2L.launch

@@ -29,8 +29,8 @@
     <param name="astep" value="0.05"/>
     <param name="iterations" value="5"/>
     <param name="lsigma" value="0.075"/>
-    <param name="ogain" value="3.0"/>
-    <param name="lskip" value="0"/>
+    <param name="ogain"  value="3.0"/>
+    <param name="lskip"  value="0"/>
     <param name="minimumScore" value="50"/>
 
     <param name="srr" value="0.1"/>
@@ -38,8 +38,8 @@
     <param name="str" value="0.1"/>
     <param name="stt" value="0.2"/>
 
-    <param name="linearUpdate" value="1.0"/>
-    <param name="angularUpdate" value="0.5"/>
+    <param name="linearUpdate"   value="1.0"/>
+    <param name="angularUpdate"  value="0.5"/>
     <param name="temporalUpdate" value="3.0"/>
     <param name="resampleThreshold" value="0.5"/>
     <param name="particles" value="30"/>
@@ -51,9 +51,9 @@
     <param name="delta" value="0.02"/> <!--resolution of the map -->
 
     <param name="llsamplerange" value="0.01"/>
-    <param name="llsamplestep" value="0.01"/>
+    <param name="llsamplestep"  value="0.01"/>
     <param name="lasamplerange" value="0.005"/>
-    <param name="lasamplestep" value="0.005"/>
+    <param name="lasamplestep"  value="0.005"/>
   </node>
 </launch>
 

+ 2 - 2
src/robot_navigation/launch/move_base.launch

@@ -16,8 +16,8 @@
     <param name="base_global_planner" value="navfn/NavfnROS" />
     <param name="base_local_planner"  value="dwa_local_planner/DWAPlannerROS" />
 
-    <param name="controller_frequency" value="2" />
-    <param name="controller_patiente"  value="5" />
+    <param name="controller_frequency" value="1.5" />
+    <param name="controller_patiente"  value="4.0" />
 
     <param name="planner_patience"  value="5.0" />
     <param name="planner_frequency" value="1.0" />