Turtlebot

From Robin

Revision as of 11:07, 28 June 2023 by Claudaba (Talk | contribs)
Jump to: navigation, search

Contents

Setup

Connecting to the turtlebot via ssh

The turtlebot is connected to the network called “nettbrett”, so you should use a development computer that is connected to this network. It is recommended to use the vixen-machine because all ports between the turtlebot and computer are open.

You can connect to the turtlebot by ssh-ing into it. The turtlebot is configured with key authentification, so it you have to generate a key pair for authentication purposes before connecting to the turtlebot. Follow these steps to do so:


On your computer, navigate to the .ssh folder:

$ cd ~/.ssh 

Create the key pair and give the key pair a suitable name key-name:

$ ssh-keygen

Send the public key to robin-engineer@ifi.uio.no. This key is in the key-name.pub file. HERE: DO THEMSELVES OR SEND MAIL?

Write the following lines in the .ssh/config file:

Host turtle
  Hostname 193.157.209.133
  User ubuntu
  IdentityFile ~/.ssh/your_key_pair_name
   

When the public key is added to the authorized keys on the turtlebot, you can connect to the turtlebot by running the command:

$ ssh turtle

If you want to use GUI on the turtlebot, add the -Y flag in the line above:

$ ssh -Y turtle

Setting up the ROS network

To be able to control the turtlebot, it is important that the ROS network configuration is set up properly. This entails setting up the environment variables correctly so that the turtlebot is able to communicate with the ROS master running on the computer (it is usually what we do). This is done according to the image here under the title “Network configuration”.

The turtlebot side is already set up, where the ROS_MASTER_URI is set to the vixen computer. If you are using any other computer, it needs to be connected to the hidden network “nettbrett” and you need to change the ROS_MASTER_URI on the turtlebot to use the IP of your computer for example by running this command in the terminal:

export ROS_MASTER_URI=http://IP_OF_YOUR_COMPUTER:11311

On the side of your computer you also need to set the ROS_MASTER_URI and ROS_HOSTNAME variables according to this, where you use the IP of your computer. To make it easier, you can add these lines to a FILENAME.sh file that you can source.

Updating the .sh file

In each terminal on the development computer you have to specify the model of the turtlebot you are using. To make it easier, you can add this line (export TURTLEBOT3_MODEL=turtlebot model) in the same FILENAME.sh file as above.

In addition, you can add the following lines in the FILENAME.sh as well to avoid writing it when entering a new terminal.

source /opt/ros/noetic/setup.bash
source /turtlebot_ws/devel/setup.bash


Containers

- Currently the robot is running ROS Noetic. To interact with the robot from the development computer, you can use a ROS Noetic-based container which is available on Robin’s project area (IT'S NOT UP YET). You can enter the container by running the following command:

$ apptainer shell —nv /uio/kant/ifi-project06/robin/programs/sing-con/ros-noetic /turtlebot.sif
Personal tools
Front page