Przeglądaj źródła

更新小车进行amcl定位自动导航参数,使导航更流畅

corvin_zhang 5 lat temu
rodzic
commit
f926c12013

+ 4 - 4
src/robot_navigation/config/dwa_local_planner_params.yaml

@@ -5,8 +5,8 @@ DWAPlannerROS:
   acc_lim_y: 0.5
   acc_lim_th: 1.0
 
-  max_trans_vel: 0.3
-  min_trans_vel: 0.15
+  max_vel_trans: 0.3
+  min_vel_trans: 0.15
 
   max_vel_x: 0.2
   min_vel_x: -0.2
@@ -14,8 +14,8 @@ DWAPlannerROS:
   max_vel_y: 0.2
   min_vel_y: -0.2
 
-  max_rot_vel: 2.0
-  min_rot_vel: 0.4
+  max_vel_theta: 2.0
+  min_vel_theta: 0.4
 
 # Goal Tolerance Parametes
   xy_goal_tolerance: 0.10

+ 5 - 6
src/robot_navigation/config/local_costmap_params.yaml

@@ -1,10 +1,10 @@
-#Copyright(c):2016-2018 ROS小课堂
-#Author: www.corvin.cn
+#Copyright(c):2016-2020 www.corvin.cn ROS小课堂
+#Author: corvin
 #Description:
 #  本地代价地图配置文件,各参数意义如下:
 #  global_frame:指定本地代价地图参考系为odom
 #  robot_base_frame:指定机器人的base_frame
-#  update_frequency:指定地图更新频率
+#  update_frequency:指定local代价地图更新频率
 #  publish_frequency: 代价地图发布可视化信息的频率
 #  static_map: 本地代价地图不会更新地图,设置false
 #  rolling_window: 设置滚动窗口,使机器人始终在窗体中心位置
@@ -15,12 +15,11 @@
 #History:
 #  20180410: init this file.
 #
-
 local_costmap:
    global_frame: odom_combined
    robot_base_frame: base_footprint
-   update_frequency: 3.0
-   publish_frequency: 2.0
+   update_frequency: 1.0
+   publish_frequency: 1.0
 
    static_map: false
    rolling_window: true

+ 9 - 3
src/robot_navigation/launch/amcl_ydlidar_X2L.launch

@@ -1,14 +1,21 @@
+<!--
+  Copyright: 2016-2020 www.corvin.cn ROS小课堂
+  Description:使用EAI的X2L雷达进行amcl定位,加载地图进行路径规划,自动导航
+  Author: corvin
+  History:
+    20200326: init this file.
+-->
 <launch>
   <!-- Run the map server with a map -->
   <node name="map_server" pkg="map_server" type="map_server" args="$(find robot_navigation)/maps/mymap.yaml" />
 
-  <!-- startup ydlidar node -->
+  <!-- startup ydlidar X2L node -->
   <include file="$(find robot_navigation)/launch/ydlidar_X2L.launch" />
 
   <!-- startup move_base node -->
   <include file="$(find robot_navigation)/launch/move_base.launch" />
 
-  <!-- Run amcl -->
+  <!-- Run amcl node -->
   <node pkg="amcl" type="amcl" name="robot_amcl">
     <param name="odom_model_type" value="omni"/>
 
@@ -49,6 +56,5 @@
     <param name="recovery_alpha_slow" value="0.0"/>
     <param name="recovery_alpha_fast" value="0.0"/>
   </node>
-
 </launch>
 

+ 4 - 2
src/robot_navigation/launch/gmapping_ydlidar_X2L.launch

@@ -3,7 +3,8 @@
   Description:使用EAI的X2L雷达进行gamapping建图,整个过程如下:
     首先启动x2l雷达,然后启动move_base节点,最后启动gmapping节点.
     所有节点启动成功后,即可开始gmapping建图,在rviz中可以查看整个
-    建图过程.
+    建图过程.下面来解释一下gmapping操作的重点参数:
+    1):delta:调节生成地图的分辨率,单位米.
   Author: corvin
   History:
     20200325:init this file.
@@ -36,6 +37,7 @@
     <param name="srt" value="0.2"/>
     <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="temporalUpdate" value="3.0"/>
@@ -46,7 +48,7 @@
     <param name="ymin" value="-5.0"/>
     <param name="xmax" value="5.0"/>
     <param name="ymax" value="5.0"/>
-    <param name="delta" value="0.05"/>
+    <param name="delta" value="0.02"/> <!--resolution of the map -->
 
     <param name="llsamplerange" value="0.01"/>
     <param name="llsamplestep" value="0.01"/>

+ 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="4" />
-    <param name="controller_patiente"  value="10" />
+    <param name="controller_frequency" value="2" />
+    <param name="controller_patiente"  value="5" />
 
     <param name="planner_patience"  value="5.0" />
     <param name="planner_frequency" value="1.0" />

Plik diff jest za duży
+ 2 - 1
src/robot_navigation/maps/mymap.pgm


+ 2 - 2
src/robot_navigation/maps/mymap.yaml

@@ -1,6 +1,6 @@
 image: mymap.pgm
-resolution: 0.050000
-origin: [-27.400000, -19.400000, 0.000000]
+resolution: 0.020000
+origin: [-5.000000, -5.000000, 0.000000]
 negate: 0
 occupied_thresh: 0.65
 free_thresh: 0.196

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików