Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
All our lab robots, as of now, have SSH set up. This is for new robots.
By default, ubuntu MATE comes with ssh installed but disabled. So there are a few steps to setup ssh to your raspberry pi.
ensure that openssh-server
is installed with sudo apt install openssh-server
check ssh status with sudo systemctl status ssh
if it is inactive
, you can start it with sudo systemctl start ssh
, and/or automatically start ssh on boot with sudo systemctl enable ssh
go to settings -> login window and set automatic login to your robot's username.
For more information, here is a useful site that explains it more
Download Image: ROS Noetic Ubuntu 20.04
Flash the image into a microsd card using an imager (dd for linux, or RPiImager).
Connect the Turtlebot to a monitor and keyboard, insert the microsd card and turn on the bot.
Log into the turtlebot with the username: ubuntu and the password: ROSlab134
You will want to remove the tailscale information using the following commands:
Once the turtlebot is rebooted, change the hostname and reinstall tailscale:
Now update the OpenCR board with the following commands:
Once the OpenCR board is updated, shut down your bot and turn it back on and you are done with the setup.
We use a product called tailscale to create a vpn that allows our robots (which are on wifi) to be connected to our Rover cluster (which are connected to the network.)
When this occurs you need to fully uninstall Tailscale from one of the robots. This is the sequence:
Often in the lab the need arises to create several robots with identical operating systems and packages, however it is incredibly time consuming to flash the base operating system to a new sd card and download all the required packages to each new robot.
This guide will explain how to create identical boot sd cards from one working operating system in order to scale the ever-growing fleet of terminator robots this lab hopes to one day create, so let's get started.
Say you have a working operating system on a robot with an SD card of 128GB, but most of the space on that SD card is unused. If you created an OS image from this SD card it too would be 128GB which is large and time consuming to flash, not to mention it won't fit on smaller SD cards. You'll first need to shrink your existing card to the minimum size to fit the operating system.
Plug the SD card into your linux computer and boot up the program GParted. Select the SD card from the menu in the top left. You'll want to unmount both of the partitions displayed by right clicking on them in the list menu, and you'll then see they key icon next to their names disappear.
You're going to resize the larger of the two partitions by selecting it from the list menu pressing the resize button in the top menu. Resize the partition to be slightly larger than the amount of used space. In my case here, I'm resizing the partion to be 13000MB with 12612MB used.
Then you're going to apply the resizing operation by clicking the green checkmark on the top menu bar, it should take a little bit of time to complete.
Now you are ready to create your image file. Open your terminal and type the command sudo fdisk -l
. It should display a list of storage partitions, so find the partition in the list
Now
LiPo batteries are dangerous. When mistreated they can cause a major fire. This is a serious concern and we ask you to be careful and take this seriously.
There is a fire extinguisher in the lab. It is near the main door, on the left as you enter the lab.
When charging, LiPo batteries will become warm. As long as you can put your palm on it and keep it there for 10 seconds you are more or less ok.
If a LiPo battery becomes hot to the touch, immediately unplug it and put it into one of the safety bags.
If a LiPo battery starts emitting smoke or sparks, this is a fire emergency. Luckily we've not experienced this ever.
If a LiPo battery deforms in any way, that is bulges out on one of the sides, that battery is defective and should not be used any more.
We have many different types of chargers.
One entry for each robot or roscore.
All these devices live in the Robotics Lab in Gzang 006
Wifi Connected Rasberry Pi's
b8:27:eb:e3:9b:a2 - mutant - mutant.dyn.brandeis.edu
b8:27:eb:75:89:b1 - roba - roba.dyn.brandeis.edu
b8:27:eb:01:e7:69 - robb - robb.dyn.brandeis.edu
b8:27:eb:83:21:e4 - robc - robc.dyn.brandeis.edu
b8:27:eb:8c:90:c5 - donatello - donatello.dyn.brandeis.edu
b8:27:eb:a4:d5:ec - rafael - rafael.dyn.brandeis.edju
74:40:bb:d5:ea:2f - alien - alien.dyn.brandeis.edu
dc:a6:32:20:ac:16 - platform2 - platform1.dyn.brandeis.edu
e4:5f:01b7:ff - platform3 - platform3.dyn.brandeis.edu
Wifi connected Linux Notebook
5c:ff:35:0f:ef:6d - roscore2
Wired Linux Desktop
44:37:e6:b7:4b:d1 - roscore1
Currently the names are formed as .dyn.brandeis.edu
is literally the hostname
of the particular robot
You can check and set it with the $ hostname
command
| hostname | maintainer | password | last updated | username | ros | OS | known problems | IMU | | -------- | ---------- | -------- | ------------ | -------- | --- | -- | -------------- | | mr1 | pito | default 2 | Mar 3 2022 | pi | noetic | ubuntu 20.04 | none | | mr2 | pito | default 2 | Jan 15 2022 | pi | noetic | ubuntu 20.04 | none | | rafael | pito | Default 1 | Jan 15 2022 | ubuntu | noetic | ubuntu 20.04 | none | | robb | adam | default 1 | Feb 16 2022 | ubuntu | noetic | ubuntu 20.04 | none | | robc | adam | default 1 | Dec 10 2021 | ubuntu | noetic | ubuntu 20.04 | none | | roba | adam | default 1 | Feb 2 2022 | ubuntu | noetic | ubuntu 20.04 | none | | donatello | adam | default 1 | Feb 16 2022 | ubuntu | noetic | ubuntu 20.04 | none | | bullet1 | pito | default 1 | Nov 11 2021 | ubuntu | noetic | ubuntu 20.04 | none | IMU9250 | | cat1 | pito | default 2 | Mar 3 2022 | ubuntu | noetic | ubuntu 20.04 | none | | alien | pito | default 2 | Mar 25 2022 | ubuntu | noetic | ubuntu 20.04 | no lidar |
A collection of notes and documents about all the equipment and facilities we have in the Robotics lab at Brandeis. Our lab is for undergraduates who come to us often never having touched a physical robot let alone programmed them. There are lots of very simple procedures that you can learn by picking them up randomly. We document them here for our students.
We are planning to move students' and teachers' computers to Ubuntu 18.04
It has a nicer to use Desktop and is also the currently supported Ubuntu
It supports ROS Melodic (and ROS Melodic does not support the old Ubuntu)
Follow Ubuntu's own installation instructions to install a clean copy of Ubuntu
As Robotis is still on Ubuntu 16.04 and ROS Kinetic we have to amend their instructions a little
Our baseline is http://emanual.robotis.com/docs/en/platform/turtlebot3/pc_setup/
This procedure is very finicky. We used it before we had our Rover cluster. Avoid doing this if you can!
SSD Solid state disk. Either internal or external. In our case we are using external SSDs which connect to your computer with a USB connection.
USB Stick Also known as a thumb drive, flash drive, memory stick, a memory key. Its a small form factor, dongle like device which also plugs into your computer.
Bootable SSD and Bootable USB Stick have been formatted and created in such a way that the computer can boot from them and thereby leave your default internal disks untouched.
Overview of the procedure We are going to create a bootable SSD with these instructions. You will:
Download the right version of Ubuntu onto your computer
Plug in your USB stick (which will be erased)
"Flash" the USB stick which will make it bootable
Boot using that USB stick
This brings up the Ubuntu installer. You will use it to just "try ubuntu"
You will now plug in the SSD and format it with the right partitions
Next you will install Ubuntu 18.04 onto the SSD and reboot.
In order to install Ubuntu onto an SSD, we need to first create a bootable USB Flash Drive. This drive will be used to boot Ubuntu and install it onto the SSD. The process can be completed as follows:
Plug the USB SSD drive into your computer
Download the appropriate Ubuntu 18.04 desktop image for your machine
Flash the Ubuntu image onto your USB stick.
How to flash Ubuntu with Mac: https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-macos#0
How to flash Ubuntu with Windows: https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows#0
How to flasg Ubuntu with Ubuntu: https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#2
With Ubuntu flashed onto your flash drive, it can now be booted and installed onto your SSD. If your SSD has anything on it, be sure to format it before moving on to the next step.
Booting from a USB depends on your operating system. Instructions for Windows and Mac are below:
Restart your computer. While it is booting up, hold down the alt/option button. A menu should appear, select the "EFI Boot" option. If the MacOS login screen appears, you will need to restart and try again.
Restart your computer. While it is booting up, press the boot menu key. This is often one of the F keys on most Windows machines, but sometimes ESC as well. With the boot menu button pressed, you will be shown the BIOS menu. From here you need to change the boot order so that your Ubuntu USB drive is prioritized above the drive where Windows is installed. Once this is done, reboot and Ubuntu should be booted.
Continuing...
With Ubuntu running on your machine, plug in your external SSD (while keeping the USB stick plugged in) and select “Try ubuntu without installing” to begin the installation process.
NOTE: If you are unable to use your mouse and keyboard on the Ubuntu desktop, a USB keyboard and mouse is required from this point on.
Now that you are on the Ubuntu desktop, it is time to install Ubuntu to the SSD. The following steps will take you through installing Ubutnu onto your SSD:
You will use a program called GParted to partition your SSD for installation. From the applications menu in Ubuntu (top left corner), open up GParted and in the top right corner, select your SSD.
Once the drive is selected, remove all the current partitions by selecting them and pressing the delete / backspace key. With these all removed, select the green check in the top menu to confirm the changes.
Now that all the original partitions have been removed, the SSD needs to be partitioned for Ubuntu. To create a new partition, select the add button in the top left corner. You will need to create 3 partitions with the following specifications:
Partition 1:
New Size = 8000 MB File System = linux-swap
Partition 2:
New Size = 20,000 MB File system = ext4
Partition 3:
New Size = 80,000 MB File System = ext4
To complete the process, click the green checkmark from the top menu once again. With all the partitions created, your GParted should look like this:
With the SSD partitioned, we can now install Ubuntu. Click the Install Ubuntu 18.04 icon from the side bar to begin the process. You will be prompted to go through a series of menus. Choose "minimal" install.
To set up wifi, you need to choose: and the eduroam account robotics@brandeis.edu with our traditional password. See the image below for how to fill in the Wifi dialog box.
You will eventually reach a screen which asks to you how to install, titled Installation Type.
The “Something else” option allows us to assign mount points to the previously partitioned SSD. In the list of partitions, find the SSD. It should be called something like SDx. Be really careful that you are picking the right one. You will see the 3 partitions that were made in GParted. To set the partitions up for Ubuntu, double click on and configure the partitions as follows:
The partitions are now ready and Ubuntu can be installed. Select the SSD from the menu below and click install. Ubuntu will now install, and once done you will need to restart your system and remove the thumb drive.
Now that Ubuntu has been installed, we need to make it bootable. To do this, we will follow a tutorial online. The tutorial begins at the section Create an ESP on the Ubuntu HDD, and can be found at the following link:
https://www.dionysopoulos.me/portable-ubuntu-on-usb-hdd/
NOTE: You should skip the umount
command instruction
To be sure that this process worked, the final command should return a message saying the installation completed with no errors.
The final step in the process is to install ROS. In order to install ROS, you will need access to the internet. If you are using Eduroam, the following settings will need to be used:
Once you are connected to the internet, follow these instructions to install ROS:
http://emanual.robotis.com/docs/en/platform/turtlebot3/pc_setup/
With this completed, your SSD is configured!
Often in robotics, you will find that it is necessary to configure wifi through a terminal interface rather than a GUI. This is often due to the fact that many on-board operating systems for robots lack a desktop environment, and the only way to interface with them is through a terminal.
The task of connecting to a wireless network can be especially difficult when configuring Eduroam which requires a more involved setup process. The following method for connecting to Eduroam has been tested on a barebones version of Ubuntu 20.04.
nmcli
is a command line tool used for networking on Linux machines. It is typically installed by default on Ubuntu Linux, so you should not need to connect your machine through a wired connection and install it before using it. However, if nmcli
is not installed, follow the installation instructions.
Connect your machine through a wired connection (e.g. To a router/wall connection through an ethernet port) and the following commands to install nmcli
and configure it to start upon bootup of your machine.
Note: If it doesn't work even with a connection, and you are on campus, send an email to help@brandeis.edu noting the mac address of the eth0
device (using ip link show
) and the fact that you are trying to connect. Ask them if they see any activity at that particular mac address.
sudo apt-get update
sudo apt install network-manager
systemctl start NetworkManager.service
systemctl enable NetworkManager.service
Run the following command to get the names of your wireless devices.
ip link show
Running this command will list all of your networking devices. You will want to note the name of your wireless networking device, for this tutorial I will assume the wireless device's name will be wlan0
as it is named on the Raspberry Pi 3b+, however you will want to substitute this for the name of your wireless device if your's differs.
Next you will run the following commands to connect your machine to eduroam.
nmcli connection up eduroam --ask
You may then be prompted to enter in the wifi username and password, however the fields should already be filled in and you will just need to press enter.
If you are trying to connect a robot and it is failing, sometimes it's good to try it on the wired network. It should just work. Brandeis networking requires that the MAC address of special devices (like raspberry Pis) be recorded. This is only for the wired network. To do this use this link: : https://www.brandeis.edu/its/services/network-connectivity/netreg.html . It is extremely slow so be patient. When you click the netreg button it is very very slow (minutes) but eventually it allows you to add a mac adress to the list.
Sometimes despite checking everything, the wireless (eduroam) network refuses to connect. One important detail that has caused problems is the system time on the Rasberry Pi. It has to be correct or close to it. Apparently that's part of the authentication. I think the command is date -s "19 APR 2012 11:14:00"
and that sets the UTC time.
Reflects the "new" multi robot setup
This shell script is run automatically whenever you open a new terminal or tab in a terminal
This means that if you edit it and save it, it still does nothing until you open a new terminal
If you want to apply it without opening a new terminal, do source ~/.bashrc
These lines should be on your laptop as well as your robot, the same way.
ROS_HOSTNAME: the IP address of this computer.
ROS_MASTER: the IP address of whereever ROSCORE is running. We have roscore always running on the little computer by the door. It happens to be called roscore1.cs.brandeis.edu
ROS_NAMESPACE: Indicates a unique name for a specific robot. That way when we send a /cmd_vel it is turned into, e.g. /roba/cmd_vel. This way all the robots can coexist on one ROSCORE. It also means you don't have to run your own ROSCORE anymore.
SSH into the robot
Run the following command to launch ROS on the robot
Did you do bringup on the ROBOT (NOT ON YOUR COMPUTER!
if not, do so!
Did bringup work
if not, check your environment variables
printenv | grep ROS
It should include all your settings and also env variables for the path to ROS
Make sure you run source ~/.bashrc
Can you run rostopic list? rostopic list
If not, check your IP addresses
Check whether the ROSCORE computer is running.
Try pinging roscore1.cs.brandeis.edu
Does it list /x/cmd_vel among them?
If not, check your IP addresses. Also make sure you ran
Can you teleop the robot? roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
if not, try a manual cmd_vel: rostopic pub /rob*/cmd_vel
You may notice that the ros installation process added a few Aliases to your .bashrc file. These serve to make your life easier, and you can add more of your own custom aliases to make your life even easier. Here are a few recommended changes to make:
You'll notice eb uses nano by default. nano is fine, if you enjoy living in the dark ages. To make eb open a different text editor, just replace nano with whatever your favorite installed editor is - code (vscode), atom, vim, emacs, etc. Bonus tip: if you're not already using eb
as a shortcut to edit the .bashrc, start using eb!
Try using this chunk in your bashrc:
NB the snippet of code above uses robc as the current robot, robc can be replaced with any valid robot name Here's what this chunk does: 1. The alias "connect" will ssh to your desired preconfigured robot (saves quite a bit of typing) 1. The variable ROBOT is used to reduce the redundancy of typing the robot name anythime you need to ssh or change your ROS_MASTER_URI 1. The last two lines will automatically obtain your IP address anytime you start a new terminal window Some additional things to note: 1. The connect alias grabs ROBOT when it is called, so it can be defined before ROBOT, but ROS_MASTER_URI grabs ROBOT when it is defined, so ROBOT must be defined first 1. The command export ROBOT=<name>
can temporarily change the value of ROBOT - anything that accesses ROBOT will grab the temporary value (Think about what this means given the last point: connect wil ssh to the temporary robot, but ROS_MASTER_URI will not update)
One of the most common problems is that when you kill a ROS script, the most recent cmd_vel latches and the robot will continue in that manner therefore, it is useful to have some sort of emergency stop procedures. 2 viable and common options: 1. create an alias for rostopic pub
that publishes a blank twist to cmd_vel 1. create an alias that launches teleop - this take longer, but will immediately stop the robot as soon as it is running.
To facilitate lab@home, we have created a private network for connect robots and computers together using Tailscale. This private network allows anyone to connect to any robots on the network around the world.
Raspberry Pi
Authkey (like this tskey-123abc456
)
Running either Raspbian 10
, Ubuntu 18.04
, or Ubuntu 20.04
You can check your OS version by doing lsb_release -a
If you don't have an Authkey, please reach out to your TA
Clone the repo: https://github.com/pitosalas/tb3-ros.git
cd tb3-ros/clients
Once the robot is successfully connected to the network, you can try to reach it via cloud desktop
Now that the robot is on the network, you can configure your cloud desktop to control the robot directly.
To control a specific robot, you need to connect to its ROS
master.
On your robot, edit ~/.bashrc
, add or replace the following lines:
If you are not sure what the Tailscale IP is, run ip addr show dev tailscale0 | grep -Eo '([0-9]{1,3}[\.]){3}[0-9]{1,3}'
On your cloud desktop (or your computer if you are not using cloud desktop), edit ~/.bashrc
, add or replace with the following lines:
If you are not sure what the cloud desktop's IP is, run ip addr show dev eth0 | grep -Eo '([0-9]{1,3}[\.]){3}[0-9]{1,3}'
Once this is setup, test the connectivity with
The following instructions are for if you are running cloud desktop on your own computer!
You can still connect to the private network without using cloud desktop. However, right now we have limited support for OS.
Officially supported
Ubuntu 18.04
Ubuntu 20.04
Unofficially supported
MacOS
Clone the repo: https://github.com/pitosalas/tb3-ros.git
cd tb3-ros/clients
To connect to the network after every reboot, just do
Caution: all the instructions here have not been tested, you are on your own!!!
Open the App, DO NOT login
With your terminal do,
Once you have Tailscale installed, you can start it with the following command
To have multiple robots on the same ROS core and each of them listen to a separate node, namespacing would be an easy and efficient way to help.
Boot up the robot and ssh into it
On the robot's onboard computer, open the terminal and type in
Then add the following line to the end of the file, using the robots name as the namespace
Also make the following other changes:
Save the file and don't forget to do source ~/.bashrc
Now that the robot is configured properly with its own unique name space, how do we talk to it?
There are three ways:
Configure your laptop to be permanently associated with the same name space
Set a temporary environment variable that specifies the name space
Add the namespace to a launch file
Use the __ns parameter for roslaunch or rosrun (not recommended)
Use the same steps above. Make sure your namespace is exactly the same as the namespace of the robot you want to control.
From now on, whenever you do, e.g. a cmd_vel, it will be directed just to your robot.
Set namespace for a termimal with temporary environment variable.
To set a namespace temporarily for a terminal, which will be gone when you close the termial, just type in export ROS_NAMESPACE={namespace_you_choose}
directly in your terminal window.
You can use echo $ROS_NAMESPACE
to check it.
To set namespace for a node in launch file, Use the attribute ns
, for example:
<node name="listener1" pkg="rospy_tutorials" type="listener.py" ns="{namespace_you_choose}" />
Launch/Run a file/node with namespace in terminal. Add a special key __ns
(double underscore here!) to your command, for example: roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch __ns:={namespace_you_choose}
However,
Do a rostopic list
, you will find out topics under a namespace will be listed as /{namespace}/{topic_name}
Type roscd turtlebot3_navigation
to go to the package directory.
Type cd launch
to go to the folder that stores .launch files.
Open the turtlebot3_navigation.launch
file with nano or your favorite code editor.
You will see the scripts for launching move base and rviz:
Add another argument cmd_vel_topic
to the four arguments in the <!-- Arguments -->
section:
Pass the new argument to move base launch file:
These changes will make move base publish to /{namespace_you_choose}/cmd_vel
instead of /cmd_vel
. Open the move_base.launch
file in the launch folder, you will see why it worked.
Type roscd turtlebot3_navigation
to go to the package directory.
Type cd rviz
to go to the folder that has turtlebot3_navigation.rviz
. It stores all the arguments for rviz.
Open turtlebot3_navigation.rviz
with VSCode or other realiable code editors, since this file is long and a bit messy.
In the .rviz file, search for all the lines that has the part Topic:
Add your namespace to the topics you found. For example, change
to
These changes will make rviz subsribe to topics in your namespace.
Cloud desktop is a virtual desktop environment which you can access with just your browser. This allows you to run intensive robot simulations without your computer breaking down.
You can access your cloud desktop with one of three ways:
Browser with javascript blocking turned off
For access link and password, please refer to the credentials given to you by the TA.
Browser with javascript blocking turned off
For access link and password, please refer to the credentials given to you by the TA.
Cloud desktop comes with SSH access disabled.
To enable ssh, first login using cloud desktop/VScode
Open up the terminal
Run sudo passwd root
to setup a password
You can now ssh
in using the cloud desktop link given to you.
Using the terminal
All cloud desktops are, by default, connected to a shared private Tailscale network. Using the cloud desktop, you can connect to any robots on the network anywhere in the world.
Each robot on the network is assigned with a Tailscale IP which looks like this: 100.xx.xxx.xxx
Run the following command
Run the following command
If repeated attempts to login through the browser failed, it is likely that your desktop has crashed. Please notify your TA, he/she will restart your desktop for you.
This is usually an issue with slow internet connection, give it a while to load.
If nothing shows up within 5 minutes, try right click > inspect > console
to look for any error messages. Please then notify your TA with the error message.
There's obviously still much more that could done to make a more efficient terminal experience. Don't be afraid to become a bash master. Here are some resources to help get started becoming more proficient in bash:
Check this
Download and Install Tailscale from
Follow the instructions for installing for your OS .
Now that your computer is on the network, follow the to control the robot directly.
Use of this keyword is generally not encouraged as it is provided for special cases where environment variables cannot be set. ()
For more details and troubleshooting about Private Networking, see .