UP | HOME

TurtleBot3 Quickstart

Overview

The turtlebot3 is a small mobile robot with a 2-D Lidar Sensor. These instructions describe Northwestern's variant of the software, which has been modified for easy deployment on our networks. However, most of the content of the reference manual still applies.

Powering the Turtlebot

  1. The Turtlebot can be powered from a battery, or directly from the wall charger, which gets plugged into the OpenCR board
    • IMPORTANT Always make sure the battery is unplugged prior to powering from the wall charger
    • IMPORTANT Never have the battery and wall charger powering the robot simultaneously
  2. When the battery voltage drops below a threshold, the turtlebot will issue a low-battery warning sound
    • IMPORTANT When the battery voltage is low, stop using the turtlebot and charge the battery. Otherwise you can permanently damage the battery.
  3. Do not use the PincherX 100 power brick with the turtlebot3!
    • It has the same plug but is rated for significantly less power.
  4. I like to test most of the software with the turtlebot3 powered from the wall and up on a block so that the wheels don't touch the ground.
    • This method increases development speed because charging the batteries or chasing the turtlebot3 around the room both take time.
    • However, the odometry of the stock turtlebot3 depends solely on the IMU, therefore if it is up on blocks and you turn, the odometry will be incorrect.
      • In my opinion this is an odd choice but I have not done experiments comparing its accuracy with wheel odometry
      • If using the nuturtlebot firmware (e.g., those in ME495 Sensing Navigation and Machine Learning for Robotics) then odometry relies on encoders.
      • The raw firmware used with Sensing Navigation and Machine Learning for Robotics does not have this problem.

Connecting to the TurtleBot

Computer Setup

One-time Lab Setup

These instructions assume that your computer is successfully connected to the eduroam network (see https://kb.northwestern.edu/109238). It assumes that the NetworkManager connection name for this network is also eduroam (which is the default).

The steps below will only work if you are on campus or with a VPN.

  1. Download the ssh keys (id_turtle and id_turtle.pub) from Canvas and place them in ~/.ssh
  2. Download and run the installation script: curl -L https://raw.githubusercontent.com/m-elwin/robotdns/main/setup_client.sh | sh -s -- eduroam beast.mech.northwestern.edu
  3. The script will print instructions and create ~/.ssh/id_robotdns.pub. TO submit, upload this file on Canvas.
  4. Connect to the robotdns server, and accept the fingerprint: ssh -T -i $HOME/.ssh/id_robotdns robotdns@beast.mech.northwestern.edu
    • If this command fails, you do not yet have access
  5. See robotdns for more details

Regular Usage

  1. Turn on the turtlebot and note its name (e.g. leonardo)
  2. Activate the eduroam.robot network with nmcli con up eduroam.robot
  3. You should now be able to
    1. ping leonardo
    2. ssh msr@leonardo and be logged in automatically with your ssh key (if not ssh-add ~/.ssh/id_turtle).
    3. From leonardo be able to ping <hostname>, where <hostname> is the name of your computer.
  4. To use the turtlebot in accordance with the ROBOTIS documentation:
    • Run roscore on your computer
    • ssh -o SendEnv=ROS_MASTER_URI msr@leonardo (make sure that ROS_MASTER_URI is properly set to http://$(hostname):11311
    • msr@leonardo$ roslaunch turtlebot3_bringup turtlebot3_robot.launch
    • From your computer, you can rostopic list all the topics from the turtlebot, echo them, and publish to them
  5. Alternatively you can run roscore on the turtlebot by export ROS_MASTER_URI=http://leonardo:11311 and then following the same sequence (the SendEnv flag ensures that the value of ROS_MASTER_URI on the turtlebot matches the value in your local terminal
  6. When you are done using the turtlebots, run nmcli con up eduroam to reconnect with regular wireless settings.
  • Examples

    Some example commands when the turtlebot launchfile is running

    1. rostopic pub /sound turtlebot3_msgs/Sound "value: 2" - This sound is the low-battery sound.
    2. Put the turtlebot3 up on a block so that the wheels are slightly above the ground (a RealSense box works well for this)
      • If using stock firmware: Try publishing some cmd_vel messages and experiment with how the wheels move
      • If using custom firmware: Try publishing some wheel_cmd messages and experimenting with how the wheels move

Firmware Setup

There are two firmwares used for the turtlebot, stock (which is what the turtlebot comes with) and raw (modified to provide low-level access). The appropriate firmware should be pre-installed if using the turtlebot for a class.

  1. ssh msr@<turtlebotname> opencr_update stock to load the stock firmware
  2. ssh msr@<turtlebotname> opencr_update raw to load the raw firmware
  3. When using the raw firmware, you need to have nuturtlebot on your ROS path (so either installed or in one of the overlayed workspaces).

Resources

Author: Matthew Elwin.