Hood NUC Install, Test and Configure Cartographer 202006

From wikidb
Jump to: navigation, search

References

Install Catographer

 $ sudo apt install ros-dashing-cartographer

 $ sudo apt install ros-dashing-cartographer-ros

Initial Bringup Test - Signs of Life

See Signs of Life log below

TERMINAL 1 - Core bringup

 $ ros2 launch turtlebot3_bringup robot.launch.py

TERMINAL 2 - Keyboard Teleop

 $ 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 
       currently:	linear velocity 0.05	 angular velocity 0.0

TERMINAL 3 - Start up Cartographer (Mapping )

 $ ros2 launch turtlebot3_cartographer cartographer.launch.py

Capture screen as ScreenshotCartographer20200327.png.

ScreenshotCartographer20200327.png

Cartographer20201222.png

TERMINAL 4 - Save a map

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

 $ pwd
     /home/eepp/maps

 $ ll benchTest20201222.*
     -rw-r--r-- 1 eepp eepp 6819 Dec 22 13:18 benchTest20201222.pgm
     -rw-r--r-- 1 eepp eepp  152 Dec 22 13:18 benchTest20201222.yaml

 $ cat benchTest20201222.yaml 
     image: /home/eepp/maps/benchTest20201222.pgm
     mode: trinary
     resolution: 0.05
     origin: [-0.697, -1.94, 0]
     negate: 0
     occupied_thresh: 0.65

Export maps/benchTest20201222.pgm from gimp as png

BenchTest20201222.png

First Floor Example

Found in ~/maps/map2

 $ cat map2.yaml 
     image: /home/eepp/maps/map2.pgm
     mode: trinary
     resolution: 0.05
     origin: [-6.21, -2.02, 0]
     negate: 0
     occupied_thresh: 0.65

~/maps/map2.pgm was loaded into gimp and exported as a png (map2.png) for display here. The map depicts my study, hallway, kitchen and dining-room.

Map2.png

Log