Skip to content

Real Robot Tips

Tom Howard edited this page Apr 6, 2022 · 10 revisions

Tips & Tricks

Quick Links

Some Handy Bash Aliases

Alias Full Command Context
tb3_bringup roslaunch turtlebot3_bringup turtlebot3_robot.launch Robot
tb3_camera roslaunch realsense2_camera rs_camera.launch Robot
tb3_bringup roslaunch turtlebot3_bringup turtlebot3_remote.launch Laptop
tb3_rviz rosrun rviz rviz -d `rospack find turtlebot3_description`/rviz/model.rviz Laptop
tb3_teleop roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch Laptop
tb3_slam roslaunch turtlebot3_slam turtlebot3_slam.launch Laptop
src echo 'Sourcing bashrc...' && source ~/.bashrc Both

Using tmux

The keyboard commands in tmux must be prefixed with Ctrl+B, followed by the command key for the action that you want to perform. Press Ctrl+B simultaneously, release and then press the command key. Some useful commands are as follows, with a full list available on the tmux manual pages:

  • Ctrl+B,C: Create a new window
  • Ctrl+B,N: Move to the next window (right)
  • Ctrl+B,P: Move to the previous window (left)
  • Ctrl+B,{0 to 9}: Select window by index 0 to 9
  • Ctrl+B,&: Close the current window
  • Ctrl+B,D: Disconnect from the tmux session

Moving files between the Laptop and Robot

Moving files between the robot and the laptop can be done via a terminal instance using the scp command. The following sections provide a brief overview of how to do this for a few different scenarios.

Note: The following should all be carried out from a terminal instance running on the laptop!

Copying a file from the Laptop to the Robot

  1. Open a terminal window on the laptop and navigate to the location of the file that you want to transfer:

     $ cd ~/{file location}
    
  2. To transfer this file to the robot filesystem use scp as follows:

     $ scp {file} robot@dia-waffleX:/home/robot/{robot location}/
    

    Where {file} is the name of the file that you want to copy, dia-waffleX is the name of the robot that you are working with and {robot location} is the path to the directory you want to copy the file to on the robot's filesystem (note that this must exist within the home directory of the robot: /home/robot/...).

  3. Then, enter the password for the robot when asked and the transfer process will start.

Copying a file from the Robot to the Laptop

The same works the other way, if you want to copy a file back from the robot to the laptop (via a terminal instance running on the laptop):

$ scp robot@dia-waffleX:/home/robot/{robot location}/{file} /home/student/{laptop location}/

You may be asked to enter the password (for the robot user account) again.

Remember:

  • The user account that you are working with on the laptop is 'student' hence the home directory on the laptop is /home/student/.
  • The user account that we work with on the robot is 'robot', and so the home directory on the robot's filesystem is /home/robot/.

Copying a folder from the Laptop to the Robot

To copy a folder (directory) from the laptop to the robot, use the -r option with scp:

$ scp -r {path to directory} robot@dia-waffleX:/home/robot/{directory}/

The same works the other way around too (similarly to copying a file from robot to laptop)

Real Robot Lab Instructions:
← 'Remote' Deployment [Previous]

Clone this wiki locally