turtlebot3c packaged as a snap.
turtlebot3c is a collection of launchfiles and configuration files to ease working with the Turtlebot3.
The snap is meant to be run with the real robot as well as the simulation, allowing one to quickly get an up and running Turtlebot3 application.
- See the Turtlebot3 website.
- See the turtlebot3c repo.
sudo snap install turtlebot3c --channel=noetic/latest
In case your Turtlebot doesn't use the default LDS-01 lidar model change it with the help of
sudo snap set turtlebot3c lsd-model=LDS-02
By default the snap is using the Turtlebot3 model waffle_pi.
You can select another model (for the simulation or the real robot).
The available models are: waffle_pi, waffle and burger.
The model can change with the help of:
sudo snap set turtlebot3c turtlebot3-model=waffle_pi
First select the simulation mode of turtlebot3c:
sudo snap set turtlebot3c simulation=trueThen, launch the simulation:
TURTLEBOT3_MODEL=waffle_pi roslaunch turtlebot3_gazebo turtlebot3_world.launchThe snap is composed of 6 applications:
- core
- teleop
- key
- joy
- mapping
- navigation
The core app is a daemon that is automatically started when the robot is turned on.
It starts the motor controller, advertises the sensors, upload the robot model to the rosparam server and publishes the robot tf tree.
In case the simulation is used, it only starts the robot_state_publisher since the robot is meant to be spawned by the simulation.
At boot, the robot is simply ready to be used.
The teleop app is a daemon that is automatically started when the robot is turned on.
It allows for controlling the robot from multiple sources such as the keyboard (e.g. key_teleop),
a remote controller (e.g. joy_teleop) or leave it to the navigation stack.
The input to use is managed by the mux node. It can be changed through a rosservice call such as,
rosservice call /mux/select "topic: 'joy_vel'"
The key app allows the keyboard to control the robot.
See also the teleop application for further details.
To start the app, simply type the following command,
turtlebot3c.key
This command automatically select 'key_vel' as the input for the mux node.
The joy app allows the joystick to control the robot.
See also the teleop application for further details.
To start the app, simply type the following command,
turtlebot3c.joy
This command automatically select 'joy_vel' as the input for the mux node.
The mapping app is a daemon that allows the robot to build a representation of its environment as a map usable by the navigation stack.
To launch the mapping, simply type the following command:
sudo snap start turtlebot3c.mapping
Drive your robot around in order to map your environment. Notice that you can monitor the process through Rviz. Once the entire environment covered, stop the mapping by typing the following command:
sudo snap stop turtlebot3c.mapping
This will stop the process and automatically save the map as
$SNAP_USER_COMMON/map/${DATE}.yaml.
Furthermore, a softlink to the newly created map is created at
$SNAP_USER_COMMON/map/current_map.yaml. The navigation stack will automatically use the softlinked map.
This command automatically select 'key_vel' as the input for the mux node.
Note that the default USER of snap daemons is root. Hence, the $SNAP_USER_COMMON variable will point to /root/snap/turtlebot3c/common.
The navigation app is also a daemon that encompasses the whole autonomous navigation stack.
It allows the robot to move autonomously in its environment, from its current location to a desired goal while avoiding obstacles.
To start the navigation app, simply type the following command:
sudo snap start turtlebot3c.navigation
It will start the whole navigation stack and use the last map built with the
mapping app found at $SNAP_USER_COMMON/map.
This command automatically select 'nav_vel' as the input for the mux node and switch back to 'key_vel' on exit.
You can stop it by typing:
sudo snap stop turtlebot3c.navigation