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
- 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
- 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.
- Do not use the PincherX 100 power brick with the turtlebot3!
- It has the same plug but is rated for significantly less power.
- 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.
- Download the ssh keys (
id_turtle
andid_turtle.pub
) from Canvas and place them in~/.ssh
- 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
- The script will print instructions and create
~/.ssh/id_robotdns.pub
. TO submit, upload this file on Canvas. - 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
- See robotdns for more details
Regular Usage
- Turn on the turtlebot and note its name (e.g.
leonardo
) - Activate the
eduroam.robot
network withnmcli con up eduroam.robot
- You should now be able to
ping leonardo
ssh msr@leonardo
and be logged in automatically with your ssh key (if notssh-add ~/.ssh/id_turtle
).- From
leonardo
be able toping <hostname>
, where<hostname>
is the name of your computer.
- 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 thatROS_MASTER_URI
is properly set tohttp://$(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, andpublish
to them
- Run
- Alternatively you can run
roscore
on the turtlebot byexport ROS_MASTER_URI=http://leonardo:11311
and then following the same sequence (theSendEnv
flag ensures that the value ofROS_MASTER_URI
on the turtlebot matches the value in your local terminal - 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
rostopic pub /sound turtlebot3_msgs/Sound "value: 2"
- This sound is the low-battery sound.- Try other sound values (Sound.msg)
- 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
- If using stock firmware: Try publishing some
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.
ssh msr@<turtlebotname> opencr_update stock
to load thestock
firmwaressh msr@<turtlebotname> opencr_update raw
to load theraw
firmware- 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
- Main turtlebot documentation
- nuturtlebot
- Contains the scripts used to create the full turtlebot image and also messages for use with
raw
mode
- Contains the scripts used to create the full turtlebot image and also messages for use with