Difference between revisions of "Turtlebot3 Burger SLAM 20210118"

From wikidb
Jump to: navigation, search
(Bring up Mapping)
(Notes and Logs)
 
(21 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
[https://emanual.robotis.com/docs/en/platform/turtlebot3/slam/ Robotis Turtlebot3 eManual SLAM]
 
[https://emanual.robotis.com/docs/en/platform/turtlebot3/slam/ Robotis Turtlebot3 eManual SLAM]
  
= Notes and Logs =
+
= Bring up Mapping =
  
* [[Turtlebot3 Burger ROS 2 Dashing SLAM 20210118 b Note and Log]]
+
== Option 1: Use the RC-100B Remote Control ==
* [[Turtlebot3 Burger ROS 2 Dashing SLAM 20210118 c Notes and Log]]
+
 
+
= Bring up Mapping =
+
  
 +
See [[Turtlebot3_Burger_Basic_Operations_20210115#RC-100]]
  
 
'''TERMINAL 1''' Run Bringup on the SBC
 
'''TERMINAL 1''' Run Bringup on the SBC
Line 20: Line 18:
 
         ...
 
         ...
 
         ...
 
         ...
 
+
 
<pre>
 
<pre>
 
$ ros2 launch turtlebot3_bringup robot.launch.py
 
$ ros2 launch turtlebot3_bringup robot.launch.py
Line 78: Line 76:
  
 
<pre>
 
<pre>
eepp@sisters:~$ ros2 launch turtlebot3_cartographer cartographer.launch.py
+
$ ros2 launch turtlebot3_cartographer cartographer.launch.py
 
[INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2021-01-18-17-47-38-514512-sisters-24010
 
[INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2021-01-18-17-47-38-514512-sisters-24010
 
[INFO] [launch]: Default logging verbosity is set to INFO
 
[INFO] [launch]: Default logging verbosity is set to INFO
Line 98: Line 96:
 
</pre>
 
</pre>
  
'''TBD''': Why is there a warning?
+
[[File:CartographerStaticTest.png | 250px]]
  
'''TERMINAL 3''' Run Keyboard Teleop on the Remote PC
+
* '''TBD''': Why is there a warning? (1/18/21)
 +
* '''TBD''': Today (2/1/21) I have a lot more errors
 +
 
 +
'''TELEOP''': Teleop using the RC-100B
 +
 
 +
''' TERMINAL 3''' Save the Map
 +
 
 +
  $ ros2 run nav2_map_server map_saver -f ~/map
 +
        [INFO] [map_saver]: Waiting for the map
 +
        [INFO] [map_saver]: Received a 147 X 146 map @ 0.050 m/pix
 +
        [INFO] [map_saver]: Writing map occupancy data to /home/eepp/map.pgm
 +
        [INFO] [map_saver]: Writing map metadata to /home/eepp/map.yaml
 +
        [INFO] [map_saver]: Map saved
 +
        Map saver succeeded
 +
 +
  $ ll map*
 +
        -rw-r--r-- 1 eepp eepp 21477 Jan 21 15:38 map.pgm
 +
        -rw-r--r-- 1 eepp eepp  131 Jan 21 15:38 map.yaml
 +
 +
  $ cat map.yaml
 +
        image: /home/eepp/map.pgm
 +
        mode: trinary
 +
        resolution: 0.05
 +
        origin: [-3.1, -1.75, 0]
 +
        negate: 0
 +
        occupied_thresh: 0.65
 +
 
 +
  $ eog map.pgm &
 +
 
 +
[[File:map.png | 250px]]
 +
 
 +
== Option 2: Use Keyboard Teleop ==
 +
 
 +
This is without the RC-100B for example.
 +
 
 +
'''TERMINAL n''' Run Keyboard Teleop on the Remote PC on some free terminal.
 +
 
 +
Make sure this terminal is in keyboard focus and teleop using the following key commands.
  
 
<pre>
 
<pre>
Line 126: Line 161:
 
...
 
...
 
</pre>
 
</pre>
 +
 +
This after pressing the "w" key 4 times.
 +
 +
= Notes and Logs =
 +
 +
* [[Turtlebot3 Burger ROS 2 Dashing SLAM 20210118 b Note and Log]]
 +
* [[Turtlebot3 Burger ROS 2 Dashing SLAM 20210118 c Notes and Log]]
 +
* [[Turtlebot3 Burger ROS 2 Dashing SLAM 20210201 Notes and Log]]  Cartographer giving me all these errors now???

Latest revision as of 17:07, 1 February 2021

References

Robotis Turtlebot3 eManual SLAM

Bring up Mapping

Option 1: Use the RC-100B Remote Control

See Turtlebot3_Burger_Basic_Operations_20210115#RC-100

TERMINAL 1 Run Bringup on the SBC

From the Remote PC ssh to SBC (RPi)

 $ ssh ubuntu@10.0.0.186
       ubuntu@10.0.0.186's password: 
       Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-1077-raspi2 aarch64)
       ...
       ...

$ ros2 launch turtlebot3_bringup robot.launch.py
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2021-01-18-19-42-34-371238-ubuntu-5529
[INFO] [launch]: Default logging verbosity is set to INFO
urdf_file_name : turtlebot3_burger.urdf
[INFO] [robot_state_publisher-1]: process started with pid [5540]
[INFO] [hlds_laser_publisher-2]: process started with pid [5541]
[INFO] [turtlebot3_ros-3]: process started with pid [5542]
[robot_state_publisher-1] Initialize urdf model from file: /home/ubuntu/turtlebot3_ws/install/turtlebot3_description/share/turtlebot3_description/urdf/turtlebot3_burger.urdf
[robot_state_publisher-1] Parsing robot urdf xml string.
[robot_state_publisher-1] Link base_link had 5 children
[robot_state_publisher-1] Link caster_back_link had 0 children
[robot_state_publisher-1] Link imu_link had 0 children
[robot_state_publisher-1] Link base_scan had 0 children
[robot_state_publisher-1] Link wheel_left_link had 0 children
[robot_state_publisher-1] Link wheel_right_link had 0 children
[robot_state_publisher-1] got segment base_footprint
[robot_state_publisher-1] got segment base_link
[robot_state_publisher-1] got segment base_scan
[robot_state_publisher-1] got segment caster_back_link
[robot_state_publisher-1] got segment imu_link
[robot_state_publisher-1] got segment wheel_left_link
[robot_state_publisher-1] got segment wheel_right_link
[hlds_laser_publisher-2] [INFO] [hlds_laser_publisher]: Init hlds_laser_publisher Node Main
[hlds_laser_publisher-2] [INFO] [hlds_laser_publisher]: port : /dev/ttyUSB0 frame_id : base_scan
[ERROR] [hlds_laser_publisher-2]: process has died [pid 5541, exit code 255, cmd '/opt/ros/dashing/lib/hls_lfcd_lds_driver/hlds_laser_publisher __node:=hlds_laser_publisher __params:=/tmp/launch_params__auv4bis'].
[robot_state_publisher-1] Adding fixed segment from base_footprint to base_link
[robot_state_publisher-1] Adding fixed segment from base_link to caster_back_link
[robot_state_publisher-1] Adding fixed segment from base_link to imu_link
[robot_state_publisher-1] Adding fixed segment from base_link to base_scan
[robot_state_publisher-1] Adding moving segment from base_link to wheel_left_link
[robot_state_publisher-1] Adding moving segment from base_link to wheel_right_link
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Init TurtleBot3 Node Main
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Init DynamixelSDKWrapper
[turtlebot3_ros-3] [INFO] [DynamixelSDKWrapper]: Succeeded to open the port(/dev/ttyACM0)!
[turtlebot3_ros-3] [INFO] [DynamixelSDKWrapper]: Succeeded to change the baudrate!
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Start Calibration of Gyro
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Calibration End
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Motors
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Wheels
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Sensors
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create battery state publisher
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create imu publisher
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create sensor state publisher
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create joint state publisher
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Devices
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create motor power server
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create reset server
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create sound server
[turtlebot3_ros-3] [INFO] [turtlebot3_node]: Run!
[turtlebot3_ros-3] [INFO] [diff_drive_controller]: Init Odometry
[turtlebot3_ros-3] [INFO] [diff_drive_controller]: Run!

TERMINAL 2 Run Cartographer on the Remote PC

$ ros2 launch turtlebot3_cartographer cartographer.launch.py
[INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2021-01-18-17-47-38-514512-sisters-24010
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [cartographer_node-1]: process started with pid [24023]
[INFO] [occupancy_grid_node-2]: process started with pid [24024]
[INFO] [rviz2-3]: process started with pid [24025]
[cartographer_node-1] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[rviz2-3] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[rviz2-3] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[cartographer_node-1] [WARN] [cartographer_ros]: W0118 17:47:39.000000 24023 tf_bridge.cc:67] "imu_link" passed to lookupTransform argument target_frame does not exist. 
[occupancy_grid_node-2] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty
[occupancy_grid_node-2] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty
[occupancy_grid_node-2] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty
[occupancy_grid_node-2] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty
[occupancy_grid_node-2] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty
[occupancy_grid_node-2] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty
...
...

CartographerStaticTest.png

  • TBD: Why is there a warning? (1/18/21)
  • TBD: Today (2/1/21) I have a lot more errors

TELEOP: Teleop using the RC-100B

TERMINAL 3 Save the Map

 $ ros2 run nav2_map_server map_saver -f ~/map
       [INFO] [map_saver]: Waiting for the map
       [INFO] [map_saver]: Received a 147 X 146 map @ 0.050 m/pix
       [INFO] [map_saver]: Writing map occupancy data to /home/eepp/map.pgm
       [INFO] [map_saver]: Writing map metadata to /home/eepp/map.yaml
       [INFO] [map_saver]: Map saved
       Map saver succeeded

 $ ll map*
       -rw-r--r-- 1 eepp eepp 21477 Jan 21 15:38 map.pgm
       -rw-r--r-- 1 eepp eepp   131 Jan 21 15:38 map.yaml

 $ cat map.yaml
       image: /home/eepp/map.pgm
       mode: trinary
       resolution: 0.05
       origin: [-3.1, -1.75, 0]
        negate: 0
        occupied_thresh: 0.65
 
 $ eog map.pgm &

Map.png

Option 2: Use Keyboard Teleop

This is without the RC-100B for example.

TERMINAL n Run Keyboard Teleop on the Remote PC on some free terminal.

Make sure this terminal is in keyboard focus and teleop using the following key commands.

$ ros2 run turtlebot3_teleop teleop_keyboard

Control Your TurtleBot3!
---------------------------
Moving around:
        w
   a    s    d
        x

w/x : increase/decrease linear velocity (Burger : ~ 0.22, Waffle and Waffle Pi : ~ 0.26)
a/d : increase/decrease angular velocity (Burger : ~ 2.84, Waffle and Waffle Pi : ~ 1.82)

space key, s : force stop

CTRL-C to quit

currently:	linear velocity 0.01	 angular velocity 0.0 
currently:	linear velocity 0.02	 angular velocity 0.0 
currently:	linear velocity 0.03	 angular velocity 0.0 
currently:	linear velocity 0.04	 angular velocity 0.0 
...
...

This after pressing the "w" key 4 times.

Notes and Logs