Browse Source

优化hector mapping

corvin 5 years ago
parent
commit
72afd3aad9

+ 4 - 8
src/robot_description/config/urdf.rviz

@@ -88,8 +88,6 @@ Visualization Manager:
           Value: true
         base_link:
           Value: true
-        laser_frame:
-          Value: true
         lidar:
           Value: true
         odom:
@@ -105,8 +103,6 @@ Visualization Manager:
             base_link:
               lidar:
                 {}
-            laser_frame:
-              {}
       Update Interval: 0
       Value: true
     - Alpha: 1
@@ -143,7 +139,7 @@ Visualization Manager:
   Global Options:
     Background Color: 48; 48; 48
     Default Light: true
-    Fixed Frame: odom
+    Fixed Frame: base_footprint
     Frame Rate: 30
   Name: root
   Tools:
@@ -164,7 +160,7 @@ Visualization Manager:
   Views:
     Current:
       Class: rviz/Orbit
-      Distance: 3.88172865
+      Distance: 2.92006087
       Enable Stereo Rendering:
         Stereo Eye Separation: 0.0599999987
         Stereo Focal Distance: 1
@@ -179,10 +175,10 @@ Visualization Manager:
       Invert Z Axis: false
       Name: Current View
       Near Clip Distance: 0.00999999978
-      Pitch: 0.864796042
+      Pitch: 1.00479591
       Target Frame: <Fixed Frame>
       Value: Orbit (rviz)
-      Yaw: 2.53411651
+      Yaw: 2.79911852
     Saved: ~
 Window Geometry:
   Displays:

+ 76 - 58
src/robot_navigation/rviz/hector_view.rviz

@@ -5,7 +5,7 @@ Panels:
     Property Tree Widget:
       Expanded: ~
       Splitter Ratio: 0.5
-    Tree Height: 359
+    Tree Height: 595
   - Class: rviz/Selection
     Name: Selection
   - Class: rviz/Tool Properties
@@ -14,7 +14,7 @@ Panels:
       - /2D Nav Goal1
       - /Publish Point1
     Name: Tool Properties
-    Splitter Ratio: 0.588679
+    Splitter Ratio: 0.588679016
   - Class: rviz/Views
     Expanded:
       - /Current View1
@@ -24,7 +24,9 @@ Panels:
     Experimental: false
     Name: Time
     SyncMode: 0
-    SyncSource: LaserScan
+    SyncSource: ""
+Toolbars:
+  toolButtonStyle: 2
 Visualization Manager:
   Class: ""
   Displays:
@@ -34,7 +36,7 @@ Visualization Manager:
       Color: 160; 160; 164
       Enabled: true
       Line Style:
-        Line Width: 0.03
+        Line Width: 0.0299999993
         Value: Lines
       Name: Grid
       Normal Cell Count: 0
@@ -46,26 +48,27 @@ Visualization Manager:
       Plane Cell Count: 30
       Reference Frame: <Fixed Frame>
       Value: true
-    - Alpha: 0.7
+    - Alpha: 0.699999988
       Class: rviz/Map
       Color Scheme: costmap
       Draw Behind: false
       Enabled: true
       Name: Map
-      Topic: /hector_map
+      Topic: /map
       Unreliable: false
+      Use Timestamp: false
       Value: true
     - Alpha: 1
-      Axes Length: 0.3
-      Axes Radius: 0.1
+      Axes Length: 0.0299999993
+      Axes Radius: 0.0500000007
       Class: rviz/Pose
       Color: 255; 25; 0
       Enabled: true
-      Head Length: 0.3
-      Head Radius: 0.1
+      Head Length: 0.300000012
+      Head Radius: 0.100000001
       Name: Pose
       Shaft Length: 1
-      Shaft Radius: 0.05
+      Shaft Radius: 0.0500000007
       Shape: Axes
       Topic: /slam_out_pose
       Unreliable: false
@@ -93,7 +96,7 @@ Visualization Manager:
       Queue Size: 10
       Selectable: true
       Size (Pixels): 3
-      Size (m): 0.01
+      Size (m): 0.00999999978
       Style: Flat Squares
       Topic: /robot0/laser_0
       Unreliable: false
@@ -105,58 +108,70 @@ Visualization Manager:
       Frame Timeout: 15
       Frames:
         All Enabled: false
-        map:
+        base_footprint:
           Value: true
-        map_static:
+        base_link:
           Value: true
-        robot0:
+        lidar:
+          Value: true
+        map_link:
+          Value: true
+        odom:
           Value: true
-        robot0_laser_0:
-          Value: false
-        robot0_sonar_0:
-          Value: false
-        robot0_sonar_1:
-          Value: false
-        robot0_sonar_2:
-          Value: false
-        robot0_sonar_3:
-          Value: false
-        robot0_sonar_4:
-          Value: false
         scanmatcher_frame:
           Value: true
-        world:
-          Value: false
       Marker Scale: 1
       Name: TF
       Show Arrows: false
       Show Axes: true
       Show Names: true
       Tree:
-        world:
-          map:
-            map_static:
-              robot0:
-                robot0_laser_0:
-                  {}
-                robot0_sonar_0:
-                  {}
-                robot0_sonar_1:
-                  {}
-                robot0_sonar_2:
-                  {}
-                robot0_sonar_3:
-                  {}
-                robot0_sonar_4:
+        map_link:
+          odom:
+            base_footprint:
+              base_link:
+                lidar:
                   {}
-            scanmatcher_frame:
-              {}
+          scanmatcher_frame:
+            {}
+      Update Interval: 0
+      Value: true
+    - Alpha: 1
+      Class: rviz/RobotModel
+      Collision Enabled: false
+      Enabled: true
+      Links:
+        All Links Enabled: true
+        Expand Joint Details: false
+        Expand Link Details: false
+        Expand Tree: false
+        Link Tree Style: Links in Alphabetic Order
+        base_footprint:
+          Alpha: 1
+          Show Axes: false
+          Show Trail: false
+          Value: true
+        base_link:
+          Alpha: 1
+          Show Axes: false
+          Show Trail: false
+          Value: true
+        lidar:
+          Alpha: 1
+          Show Axes: false
+          Show Trail: false
+          Value: true
+      Name: RobotModel
+      Robot Description: robot_description
+      TF Prefix: ""
       Update Interval: 0
       Value: true
+      Visual Enabled: true
   Enabled: true
   Global Options:
     Background Color: 48; 48; 48
-    Fixed Frame: map
+    Default Light: true
+    Fixed Frame: map_link
     Frame Rate: 30
   Name: root
   Tools:
@@ -177,30 +192,33 @@ Visualization Manager:
   Views:
     Current:
       Class: rviz/Orbit
-      Distance: 18.6196
+      Distance: 10.780015
       Enable Stereo Rendering:
-        Stereo Eye Separation: 0.06
+        Stereo Eye Separation: 0.0599999987
         Stereo Focal Distance: 1
         Swap Stereo Eyes: false
         Value: false
       Focal Point:
-        X: 7.77633
-        Y: 6.49206
-        Z: -0.394941
+        X: 4.02420664
+        Y: -0.984699249
+        Z: -4.72999859
+      Focal Shape Fixed Size: true
+      Focal Shape Size: 0.0500000007
+      Invert Z Axis: false
       Name: Current View
-      Near Clip Distance: 0.01
-      Pitch: 1.28976
+      Near Clip Distance: 0.00999999978
+      Pitch: 0.904760242
       Target Frame: <Fixed Frame>
       Value: Orbit (rviz)
-      Yaw: 4.69359
+      Yaw: 3.01358628
     Saved: ~
 Window Geometry:
   Displays:
     collapsed: true
-  Height: 1056
+  Height: 876
   Hide Left Dock: true
   Hide Right Dock: true
-  QMainWindow State: 000000ff00000000fd00000004000000000000016a00000396fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073000000002800000396000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f00000396fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000002800000396000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000003efc0100000002fb0000000800540069006d0065010000000000000780000002f600fffffffb0000000800540069006d00650100000000000004500000000000000000000007800000039600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
+  QMainWindow State: 000000ff00000000fd00000004000000000000016a000002e2fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730000000028000002e2000000d700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f00000396fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000002800000396000000ad00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006400000003efc0100000002fb0000000800540069006d00650100000000000006400000030000fffffffb0000000800540069006d0065010000000000000450000000000000000000000640000002e200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
   Selection:
     collapsed: false
   Time:
@@ -209,6 +227,6 @@ Window Geometry:
     collapsed: false
   Views:
     collapsed: true
-  Width: 1920
+  Width: 1600
   X: 0
   Y: 24

+ 2 - 2
src/teleop_twist_keyboard/teleop_twist_keyboard.py

@@ -82,8 +82,8 @@ if __name__=="__main__":
     pub = rospy.Publisher('cmd_vel', Twist, queue_size = 1)
     rospy.init_node('teleop_twist_keyboard')
 
-    speed = rospy.get_param("~speed", 0.5)
-    turn = rospy.get_param("~turn", 1.0)
+    speed = rospy.get_param("~speed", 0.3)
+    turn = rospy.get_param("~turn", 0.5)
     x = 0
     y = 0
     z = 0

+ 2 - 2
src/ydlidar/launch/lidar.launch

@@ -1,6 +1,6 @@
 <launch>
   <node name="ydlidar_node"  pkg="ydlidar"  type="ydlidar_node" output="screen" respawn="false" >
-    <param name="port"         type="string" value="/dev/ydlidar"/>  
+    <param name="port"         type="string" value="/dev/ydlidar"/>
     <param name="frame_id"     type="string" value="lidar"/>
     <param name="resolution_fixed"    type="bool"   value="true"/>
     <param name="auto_reconnect"    type="bool"   value="true"/>
@@ -10,7 +10,7 @@
     <param name="angle_min"    type="double" value="-180" />
     <param name="angle_max"    type="double" value="180" />
     <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="10.0" />
     <param name="ignore_array" type="string" value="" />
     <param name="max_abnormal_check_count"    type="int" value="2"/>
   </node>