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
stockturtlebot3 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
nuturtlebotfirmware (e.g., those in ME495 Sensing Navigation and Machine Learning for Robotics) then odometry relies on encoders. - The
rawfirmware 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_turtleandid_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.robotnetwork withnmcli con up eduroam.robot - You should now be able to
ping leonardossh msr@leonardoand be logged in automatically with your ssh key (if notssh-add ~/.ssh/id_turtle).- From
leonardobe able toping <hostname>, where<hostname>is the name of your computer.
- To use the turtlebot in accordance with the ROBOTIS documentation:
- Run
roscoreon your computer ssh -o SendEnv=ROS_MASTER_URI msr@leonardo(make sure thatROS_MASTER_URIis properly set tohttp://$(hostname):11311msr@leonardo$ roslaunch turtlebot3_bringup turtlebot3_robot.launch- From your computer, you can
rostopiclist all the topics from the turtlebot,echothem, andpublishto them
- Run
- Alternatively you can run
roscoreon the turtlebot byexport ROS_MASTER_URI=http://leonardo:11311and then following the same sequence (theSendEnvflag ensures that the value ofROS_MASTER_URIon the turtlebot matches the value in your local terminal - When you are done using the turtlebots, run
nmcli con up eduroamto 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_velmessages and experiment with how the wheels move - If using custom firmware: Try publishing some
wheel_cmdmessages 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 stockto load thestockfirmwaressh msr@<turtlebotname> opencr_update rawto load therawfirmware- 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
rawmode
- Contains the scripts used to create the full turtlebot image and also messages for use with