Use the following command to login to your booked robot (turtle04 in this case) from one of the lab computers (machine name 'pc', username 'user'). Logging into the turtlebots is done via your main CTU username and CTU password. The commands here are shown as displayed in a terminal, so do not type the prompt (e.g. user@pc:~$
) again, only the command itself (e.g. ssh <your_username>@turtle04
).
user@pc:~$ ssh <your_username>@turtle04 password: A TurtleBot welcome message etc... <your_username>@turtle04:~$Although one can also use all the robots numbered from one to seven, the robots turtle04, turtle06, turtle07 are equipped with all the hardware needed in the ARO course (RPLidar, RealSense).
If you want to login to the robots from your own laptop, you need to connect to the lab wi-fi hotspot:
SSID: e210bot password: j6UsAC8aThe robots can be accessed via the domain names
turtle04.local, turtle06.local, turtle07.local
etc. on the wireless network.
In the rare case the local domain name system does not work, you may access the robots via their IP addresses instead of the domain names:
192.168.210.21 turtle01 192.168.210.22 turtle02 192.168.210.23 turtle03 192.168.210.24 turtle04 192.168.210.25 turtle05 192.168.210.26 turtle06 192.168.210.27 turtle07
On your computer, you can add these items to /etc/hosts
to ensure the name resolution works.
Upload your ROS packages into ~/workspace/aro_student/. Create the workspace folder on the robot if it does not already exist:
ros@turtle04:~$ mkdir -p ~/workspace/aro_student/srcIf the workspace exists, delete it and create it again:
ros@turtle04:~$ rm -r ~/workspace/aro_student ros@turtle04:~$ mkdir -p ~/workspace/aro_student/srcThe first suitable ROS package to copy to the robot is robot_coordination. It provides waypoint navigation services and a sample Python script to follow a predefined trajectory with the robot. One needs to extract the robot_coordination folder from the tar.gz archive before copying it to the TurtleBot computer.
To synchronize a folder robot_coordination (change this folder name later to your own folder containing a ROS package) to the workspace of turtle04, type the following command on your PC:
user@pc:~$ rsync -av --delete robot_coordination ros@turtle04:~/workspace/aro_student/srcThe command transfers the data of the local folder robot_coordination via SSH over the network to the computer of TurtleBot turtle04.
Before shutting down the robot and leaving, do not forget to delete all your files on the TurtleBot:
ros@turtle04:~$ rm -r ~/workspace/aro_student
Another option is to run on the robot only the drivers and have the rest running on your computer.
There is no need to transfer your workspace to the robot in this setup.
For that to work, one has to ensure that nodes can establish connection in both ways—both from your computer to the robot and from the robot to your computer.
Let the roscore and drivers run on the robot (turtle_start
and rplidar.launch
below).
On your computer, you can run e.g.
source ~/path/to/your_workspace/devel/setup.bash export ROS_MASTER_URI=http://turtle07:11311/ export ROS_IP=`ip -4 addr | grep -oP '(?<=inet\s)192\.168\.210\.\d+'` roslaunch aro_slam live.launch
ROS_MASTER_URI
tells the nodes what roscore to contact (pick your turtle), ROS_IP
tells them to advertise topics using the IP address (which the robot can see) instead of the hostname (which it may not see).
On your computer, add static IP addresses of the robots to /etc/hosts
to ensure the name resolution works. See Turtlebots' IP addresses above.
Activate ROS and basic TurtleBot packages:
ros@turtle04:~$ turtle_stop ros@turtle04:~$ turtle_startActivate the RPLidar if it is not already running:
ros@turtle04:~$ tmux new-window -t ros:3 ros@turtle04:~$ tmux send -t ros:3 "roslaunch rplidar_ros rplidar.launch" ENTERChange the current directory to the catkin workspace, build it and source it:
ros@turtle04:~$ cd ~/workspace/aro_student ros@turtle04:~/workspace/aro_student$ catkin build ros@turtle04:~/workspace/aro_student$ source devel/setup.bashRun any ROS nodes you wish, e.g. waypoint navigation from the robot_coordination package:
ros@turtle04:~$ rosrun robot_coordination robot_nodeWhen the waypoint navigation services are running, you can make the robot move by running the provided example script in another bash terminal, again while being logged in to the robot:
ros@turtle04:~$ rosrun robot_coordination path_following_simple.pySee the README.md file in the robot_coordination package for more details.
To start the ICP SLAM node:
ros@turtle04:~$ roslaunch aro_slam live.launchIf you want to run a program requiring PyTorch, source the PyTorch virtual environment first:
ros@turtle04:~$ source ~/torchenv/bin/activate
turtle_stop
.
rm -r ~/workspace/aro_student
.