Browse Source

更新使用ydlidar进行gmapping时的参数

corvin_zhang 5 years ago
parent
commit
a18b0e82dc

+ 2 - 2
src/robot_navigation/config/base_local_planner_params.yaml

@@ -1,5 +1,5 @@
-# Copyright(c): 2016-2018 ROS小课堂
-# Author: www.corvin.cn
+# Copyright(c): 2016-2020 ROS小课堂 www.corvin.cn
+# Author: corvin
 # Description:
 # Description:
 #  本地规划配置文件,各参数意义如下:
 #  本地规划配置文件,各参数意义如下:
 #   max_vel_x:最大前进速度.
 #   max_vel_x:最大前进速度.

+ 5 - 5
src/robot_navigation/config/costmap_common_params.yaml

@@ -1,5 +1,5 @@
-#Copyright(c):2016-2018 ROS小课堂
-#Author: www.corvin.cn
+#Copyright(c):2016-2020 ROS小课堂 www.corvin.cn
+#Author: corvin
 #Description:
 #Description:
 # 代价地图通用配置文件,各参数意义如下:
 # 代价地图通用配置文件,各参数意义如下:
 #   obstacle_range: 最大障碍物检测范围,超过该范围不认为是障碍物
 #   obstacle_range: 最大障碍物检测范围,超过该范围不认为是障碍物
@@ -11,9 +11,9 @@
 # History:
 # History:
 #  20180410: init this file.
 #  20180410: init this file.
 
 
-obstacle_range: 2.0
-raytrace_range: 3.0
-robot_radius: 0.126
+obstacle_range: 1.0
+raytrace_range: 2.0
+robot_radius: 0.175
 inflation_radius: 0.2
 inflation_radius: 0.2
 
 
 observation_sources: scan
 observation_sources: scan

+ 2 - 1
src/robot_navigation/config/local_costmap_params.yaml

@@ -21,10 +21,11 @@ local_costmap:
    robot_base_frame: base_footprint
    robot_base_frame: base_footprint
    update_frequency: 3.0
    update_frequency: 3.0
    publish_frequency: 2.0
    publish_frequency: 2.0
+
    static_map: false
    static_map: false
    rolling_window: true
    rolling_window: true
    width: 2.0
    width: 2.0
    height: 2.0
    height: 2.0
-   resolution: 0.05   #should same as map.yaml file
+   resolution: 0.02   #should same as map.yaml file
    transform_tolerance: 2.0
    transform_tolerance: 2.0
 
 

+ 0 - 0
src/robot_navigation/launch/amcl_ydlidar.launch → src/robot_navigation/launch/amcl_ydlidar_X2L.launch


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

@@ -1,7 +1,17 @@
+<!--
+  Copyright: 2016-2020 www.corvin.cn ROS小课堂
+  Description:使用EAI的X2L雷达进行gamapping建图,整个过程如下:
+    首先启动x2l雷达,然后启动move_base节点,最后启动gmapping节点.
+    所有节点启动成功后,即可开始gmapping建图,在rviz中可以查看整个
+    建图过程.
+  Author: corvin
+  History:
+    20200325:init this file.
+-->
 <launch>
 <launch>
-  <param name="use_sim_time" value="false"/>  
+  <param name="use_sim_time" value="false"/>
 
 
-  <!-- startup rplidar node -->
+  <!-- startup EAI X2L lidar node -->
   <include file="$(find robot_navigation)/launch/ydlidar_X2L.launch" />
   <include file="$(find robot_navigation)/launch/ydlidar_X2L.launch" />
 
 
   <!-- startup move_base node -->
   <!-- startup move_base node -->
@@ -21,6 +31,7 @@
     <param name="ogain" value="3.0"/>
     <param name="ogain" value="3.0"/>
     <param name="lskip" value="0"/>
     <param name="lskip" value="0"/>
     <param name="minimumScore" value="50"/>
     <param name="minimumScore" value="50"/>
+
     <param name="srr" value="0.1"/>
     <param name="srr" value="0.1"/>
     <param name="srt" value="0.2"/>
     <param name="srt" value="0.2"/>
     <param name="str" value="0.1"/>
     <param name="str" value="0.1"/>
@@ -30,14 +41,17 @@
     <param name="temporalUpdate" value="3.0"/>
     <param name="temporalUpdate" value="3.0"/>
     <param name="resampleThreshold" value="0.5"/>
     <param name="resampleThreshold" value="0.5"/>
     <param name="particles" value="30"/>
     <param name="particles" value="30"/>
+
     <param name="xmin" value="-5.0"/>
     <param name="xmin" value="-5.0"/>
     <param name="ymin" value="-5.0"/>
     <param name="ymin" value="-5.0"/>
     <param name="xmax" value="5.0"/>
     <param name="xmax" value="5.0"/>
     <param name="ymax" value="5.0"/>
     <param name="ymax" value="5.0"/>
     <param name="delta" value="0.05"/>
     <param name="delta" value="0.05"/>
+
     <param name="llsamplerange" value="0.01"/>
     <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="lasamplerange" value="0.005"/>
     <param name="lasamplestep" value="0.005"/>
     <param name="lasamplestep" value="0.005"/>
   </node>
   </node>
 </launch>
 </launch>
+

+ 4 - 3
src/robot_navigation/launch/move_base.launch

@@ -1,5 +1,5 @@
 <!--
 <!--
-  Copyright(c): 2016-2019 ROS小课堂 www.corvin.cn
+  Copyright(c): 2016-2020 ROS小课堂 www.corvin.cn
   Description:
   Description:
     move base package launch file, load config file for slam,config file list below:
     move base package launch file, load config file for slam,config file list below:
     (1)costmap_common_params.yaml -global_costmap
     (1)costmap_common_params.yaml -global_costmap
@@ -7,17 +7,18 @@
     (3)local_costmap_params.yaml
     (3)local_costmap_params.yaml
     (4)global_costmap_params.yaml
     (4)global_costmap_params.yaml
     (5)base_local_planner_params.yaml
     (5)base_local_planner_params.yaml
+  Author: corvin
   History:
   History:
     20190728:init this file.
     20190728:init this file.
 -->
 -->
 <launch>
 <launch>
   <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">
   <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">
     <param name="controller_frequency" value="4" />
     <param name="controller_frequency" value="4" />
-    <param name="controller_patiente" value="10" />
+    <param name="controller_patiente"  value="10" />
 
 
     <rosparam file="$(find robot_navigation)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
     <rosparam file="$(find robot_navigation)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
     <rosparam file="$(find robot_navigation)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
     <rosparam file="$(find robot_navigation)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
-    <rosparam file="$(find robot_navigation)/config/local_costmap_params.yaml" command="load" />
+    <rosparam file="$(find robot_navigation)/config/local_costmap_params.yaml"  command="load" />
     <rosparam file="$(find robot_navigation)/config/global_costmap_params.yaml" command="load" />
     <rosparam file="$(find robot_navigation)/config/global_costmap_params.yaml" command="load" />
     <rosparam file="$(find robot_navigation)/config/base_local_planner_params.yaml" command="load" />
     <rosparam file="$(find robot_navigation)/config/base_local_planner_params.yaml" command="load" />
 
 

+ 19 - 9
src/robot_navigation/launch/ydlidar_X2L.launch

@@ -1,18 +1,28 @@
+<!--
+  Copyright: 2016-2020 www.corvin.cn ROS小课堂
+  Description:加载启动EAI的X2L雷达.
+  Author: corvin
+  History:
+    20200325: init this file.
+-->
 <launch>
 <launch>
-  <node name="ydlidar_node"  pkg="ydlidar_ros"  type="ydlidar_node" output="screen" respawn="false" >
-    <param name="port"         type="string" value="/dev/ydlidar"/>  
-    <param name="baudrate"         type="int" value="115200"/>  
-    <param name="frame_id"     type="string" value="lidar"/>
-    <param name="resolution_fixed"    type="bool"   value="true"/>
-    <param name="auto_reconnect"    type="bool"   value="true"/>
+  <node name="ydlidar_X2L_node" pkg="ydlidar_ros" type="ydlidar_node" output="screen" respawn="false" >
+    <param name="port"      type="string" value="/dev/ydlidar"/>
+    <param name="baudrate"  type="int"    value="115200"/>
+    <param name="frame_id"  type="string" value="lidar"/>
+
+    <param name="resolution_fixed" type="bool"  value="true"/>
+    <param name="auto_reconnect"   type="bool"  value="true"/>
+
     <param name="reversion"    type="bool"   value="false"/>
     <param name="reversion"    type="bool"   value="false"/>
     <param name="angle_min"    type="double" value="-180" />
     <param name="angle_min"    type="double" value="-180" />
     <param name="angle_max"    type="double" value="180" />
     <param name="angle_max"    type="double" value="180" />
     <param name="range_min"    type="double" value="0.1" />
     <param name="range_min"    type="double" value="0.1" />
-    <param name="range_max"    type="double" value="12.0" />
+    <param name="range_max"    type="double" value="8.0" />
     <param name="ignore_array" type="string" value="" />
     <param name="ignore_array" type="string" value="" />
-    <param name="frequency"    type="double" value="8"/>
+
+    <param name="frequency"    type="double" value="7"/>
     <param name="samp_rate"    type="int"    value="3"/>
     <param name="samp_rate"    type="int"    value="3"/>
-    <param name="isSingleChannel"    type="bool"   value="true"/>
+    <param name="isSingleChannel" type="bool"  value="true"/>
   </node>
   </node>
 </launch>
 </launch>

+ 1 - 1
src/ros_arduino_bridge/ros_arduino_python/launch/arduino.launch

@@ -7,7 +7,7 @@
     20190722: init this file.
     20190722: init this file.
 -->
 -->
 <launch>
 <launch>
-   <node name="mobilebase_arduino" pkg="ros_arduino_python" type="arduino_node.py" output="screen">
+   <node name="mobilebase_arduino" pkg="ros_arduino_python" type="arduino_node.py" output="screen" required="true">
       <rosparam file="$(find ros_arduino_python)/config/my_arduino_params.yaml" command="load" />
       <rosparam file="$(find ros_arduino_python)/config/my_arduino_params.yaml" command="load" />
    </node>
    </node>
 </launch>
 </launch>

+ 2 - 2
src/voice_system/control_move/launch/control_move.launch

@@ -9,9 +9,9 @@
   <arg name="namespace" default="voice_system" />
   <arg name="namespace" default="voice_system" />
   <arg name="SUB_TOPIC" default="/voice_system/wakeup_topic" />
   <arg name="SUB_TOPIC" default="/voice_system/wakeup_topic" />
   <arg name="PUB_TOPIC" default="/cmd_vel" />
   <arg name="PUB_TOPIC" default="/cmd_vel" />
-  <arg name="SPEED_X"   default="0.5" />
+  <arg name="SPEED_X"   default="0.2" />
   <arg name="SPEED_Y"   default="0.1" />
   <arg name="SPEED_Y"   default="0.1" />
-  <arg name="TURN"      default="1.0" />
+  <arg name="TURN"      default="0.5" />
   <arg name="CONF"      default="20" />
   <arg name="CONF"      default="20" />
 
 
   <group ns="$(arg namespace)">
   <group ns="$(arg namespace)">