Hood NUC Install, Test and Configure Cartographer 202006

From wikidb
Revision as of 13:55, 22 December 2020 by Edc (Talk | contribs)

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.

TERMINAL 4 - Save a map

 $ ros2 run nav2_map_server map_saver -f ~/map
       [INFO] [map_saver]: Waiting for the map
       [INFO] [map_saver]: Received a 91 X 83 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

 $ cd

 $ ls map*
       map.pgm  map.yaml

 $ cat map.yaml 
       image: /home/eepp/map.pgm
       mode: trinary
       resolution: 0.05
       origin: [-1.05, -1.95, 0]
       negate: 0
       occupied_thresh: 0.65
       free_thresh: 0.25

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

File:Maps.png

Log