Turtlebot3 Burger Foxy Run Scripts 20200301

From wikidb
Jump to: navigation, search

Check Addresses

  • ROS Foxy Turtlebot3 Sisters Remote PC Ubuntu: 10.0.0.159
  • SBC Foxy Raspberry Pi: 10.0.0.187
    • Account is ubuntu
    • RC-100B Remote Controller
    • BT-410 Set Bluetooth

Add Path to .bashrc

 export PATH=$PATH:/home/eepp/scripts

or

 export PATH=$PATH:/home/ubuntu/scripts

 mkdir ~/scripts

SBC Scripts

bringup_foxy.sh

On the SBC

 #!/bin/bash
 # ece

 ros2 launch turtlebot3_bringup robot.launch.py

Remote PC Scripts

keyboard_teleop.sh

 #!/bin/bash
 # ece

 ros2 run turtlebot3_teleop teleop_keyboard

make_map.sh

 #!/bin/bash
 # ece

 ros2 launch turtlebot3_cartographer cartographer.launch.py

save_map.sh

 #!/bin/bash
 # ece
 #
 # save_map <map name>

 if [ $# -eq 1 ]
 then
    ros2 run nav2_map_server map_saver_cli -f ~/maps/$1
 else
    echo "save_map <map name>"
 fi

nav2.sh

 #!/bin/bash
 # ece
 #
 # nav2 <map name>

 if [ $# -eq 1 ]
 then
    ros2 run nav2_map_server map_saver_cli -f ~/maps/$1
    ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=$HOME/maps/$1.yaml
 else
    echo "save_map <map name>"
 fi

Execute

Bring up

TERMINAL 1

 $ ssh eepp@10.0.0.111
       eepp@10.0.0.111's password: 

 $ bringup.sh

Mapping

TERMINAL 2

 $ make_map.sh

TERMINAL 3

 $ save_map.sh hall01

 $ ls maps
       desk2.pgm   desk.yaml      hall01.pgm   kitch01.pgm   old2
       desk2.yaml  hall01org.pgm  hall01.png   kitch01.yaml  xxxyyy123.pgm
       desk.pgm    hall01org.png  hall01.yaml  old           xxxyyy123.yaml

 $ eog maps/hall01.pgm

TERMINAL 2

 ^C

Navigation

TERMINAL 2

 $ nav2.sh hall01

Notes and Logs