Update Turtlebot3 authored by Olivier BOISSIER's avatar Olivier BOISSIER
TurtleBot is a ROS standard platform robot. There are 3 versions of the TurtleBot model. The last version, _TurtleBot3_, was developed with features to supplement the lacking functions of its predecessors, and the demands of users.
The TurtleBot3 version adopts ROBOTIS smart actuator DYNAMIXEL for driving. TurtleBot3 is a small, affordable, programmable, ROS-based mobile robot. The TurtleBot3 can be customized into various ways depending on how you reconstruct the mechanical parts and use optional parts such as the computer and sensor. In addition, TurtleBot3 is evolved with cost-effective and small-sized SBC that is suitable for robust embedded system, 360 degree distance sensor and 3D printing technology.
* [Working with the TurtleBot3 Burger](#working-with-the-turtlebot3-burger)
* [Specification](#specification)
* [Local environment and configuration](#local-environment-and-configuration)
* [Getting started using ROS 1](#getting-started-using-ros-1)
* [Configuring](#configuring)
* [Launching ROS](#launching-ros)
* [Getting started using ROS 2](#getting-started-using-ros-2)
* [Working with TurtleBot3 Waffle with arm](#working-with-turtlebot3-waffle-with-arm)
* [Specifications](#specifications)
* [Mobile part Specification](#mobile-part-specification)
* [Arm part Specification (OpenManipulator RM-X52 TNM)](#arm-part-specification-openmanipulator-rm-x52-tnm)
* [Getting started using ROS 1](#getting-started-using-ros-1-1)
* [Configuring](#configuring-1)
* [Launching ROS](#launching-ros-1)
* [Getting started using ROS 2](#getting-started-using-ros-2-1)
* [Gazebo with multi-turtlebot3s](#gazebo-with-multi-turtlebot3s)
* [configure gazebo launch file](#configure-gazebo-launch-file)
* [Control robot](#control-robot)
* [TurtleBot3 Administration](#turtlebot3-administration)
# Working with the TurtleBot3 Burger
The TurtleBot3 burger is the smallest turtlebot3 mobile robot. It is composed of 2 DYNAMIXEL servomotors (one for each wheel), 1 OpenSource control card (OpenCR ARM Cortex-M7), 1 Raspberry Pi3, sensors for the navigation with 360° LiDAR.
![](./images/turtlebot3-burger1.jpg)
## Specification
* Max translational speed: 0,22 m/s
* Max rotational speed: 162,72°/s
* Max payload: 15kg
* Size: 138 × 178 × 192 mm
* Weight: 995g
* Autonomy: 2h30 (Lithium Polymer Battery 11,1 V 1800 mAh/19.98 Wh 5C)
* Input: 100-240 V, 50/60 Hz CA, 1,5 A @ max
* Output: 12 Vcc, 5 A
* 3-axis gyroscope
* 3-axis accelerometer
* 3-axis magnetometer
* 360° LiDAR
## Local environment and configuration
You can use the ROS distribution and softwares provided in the virtual machine at Mines Saint-Etienne as follows:
* Wifi connected on eduroam
* Install Virtual Box and download [ROS image for virtual box](http://193.49.165.77/virtualbox/)
* Import ROS image in Virtual Box
* Configure Image parameters: System (CPU, RAM), Network (deactivate adaptater 1, activate adaptater 2, check wifi interface)
* Launch the image
* execute ifconfig. You should obtain the same IP address that you have on your own machine
* configure your environment (see below) to be able to use the installed roscore environment
* check the configuration by executing the following command:
```plaintext
> ping roscore
```
Given this environment, you can use the robots in the roscore environment already deployed on [different machines and network infrastructures](/Use_turtlebot3_eduroam). In the following, use the IPs of the different machines to configure the environment variables required to run ROS from you virtual machine.
## Getting started using ROS 1
### Configuring
Add the following lines in the .bashrc of your Remote PC to define the necessary environment variables for runnning ROS:
```plaintext
export TURTLEBOT3_MODEL=burger
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_REMOTE_PC
```
Reinitialize the environment of your Remote PC or Virtual Machine (in the following (Remote PC) equals remote PC or Virtual Machine:
```plaintext
(Remote PC)> source ~/.bashrc
```
Note: IP_OF_SERVER_RUNNING_ROSCORE can be equal to IP_OF_REMOTE_PC in case you run _roscore_ on the Remote PC. The ROS_MASTER_URI is necessary for connecting the ros node running on your Remote PC to the ros master node, i.e. the one running _roscore_.
### Launching ROSCORE
```plaintext
(Remote PC)>roscore
```
### Launching ROSBRIDGE
```plaintext
(Remote PC)>roslaunch rosbridge_server rosbridge_websocket.launch port:=9090
```
### Starting a real robot burger
Define a specific namespace for each robot and initialize the *multi_robot_name* parameter with that namespace ([Our burger configuration](/specification of our robots)):
```plaintext
(Remote PC)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=myspace
```
### Starting a simulated robot burger
* with _gazebo_
```plaintext
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_world.launch
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_gazebo_rviz.launch
```
(if you need to use /clock in your ros package, you have to be aware about *use_sim_time* parameter defined in the launch file)
![](./images/turtlebot3_burger2.png)
* with _rviz_ ([Our burger configuration](/specification of our robots))
```plaintext
(Remote PC)>[ROS_NAMESPACE=/myspace] roslaunch turtlebot3_fake turtlebot3_fake.launch
```
(if you use a specific namespace, dont forget to change it in the rviz interface (e.g. /odom by /myspace/odom))
![](./images/turtlebot3-rviz.png)
### Controlling the burger with keyboard
([Our burger configuration](/specification of our robots))
```plaintext
(Remote PC)>[ROS_NAMESPACE=/myspace] roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
```
## Getting started using ROS 2
TODO
# Working with TurtleBot3 Waffle with arm
The waffle follows the same philosophy as the burger. The main difference is a bigger platfom and the possibility of installing a robotic arm on it. Also the waffle can be used as a mobile manipulator capable of manipulating an object by attaching a manipulator like OpenMANIPULATOR.
![](./images/turtlebot3-waffle1.jpg)
## Specifications
### Mobile part Specification
* Max translational speed: 0,26 m/s
* Max rotational speed: 104,27°/s
* 2 servomotors Dynamixel XM430-W210-T
* Max payload: 30kg
* Size: 281 x 306 x 141 mm
* Weight: 1,8g
* Autonomy: 2h (Lithium Polymer Battery 11,1 V 1800 mAh/19.98 Wh 5C)
* Input: 100-240 V, 50/60 Hz CA, 1,5 A @ max
* Output: 12 Vcc, 5 A
* 3-axis gyroscope
* 3-axis accelerometer
* 3-axis magnetometer
* 360° LiDAR
* Raspberry Pi Camera
### Arm part Specification (OpenManipulator RM-X52 TNM)
* 5xServomotors: Dynamixel XM430-W350-T x 5
* Power: 12V
* Degrees of freedom: 5 (4 for arm, 1 for gripper)
* Max payload: 500g
* Rotation speed: 46rpm
* 1xgripper with openning between 20 to 75mm
* Communication: TTL with Multi Drop bus
* Weight: 700g
* Range: 380mm
## Getting started using ROS 1
### Configuring
Add the following lines in the .bashrc of your Remote PC to define the necessary environment variables for runnning ROS:
```plaintext
export TURTLEBOT3_MODEL=waffle_pi
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_REMOTE_PC
```
Reinitialize the environment of your Remote PC:
```plaintext
(Remote PC)> source ~/.bashrc
```
Note: IP_OF_SERVER_RUNNING_ROSCORE can be equal to IP_OF_REMOTE_PC in case you run *roscore* on the Remote PC. The ROS_MASTER_URI is necessary for connecting the ros node running on your Remote PC to the ros master node, i.e. the one running *roscore*.
### Launching ROS
* Launching roscore
```plaintext
(Remote PC)>roscore
```
* Starting a real robot Waffle
```plaintext
(Remote PC)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=myspace
```
* Starting a simulated robot Waffle with _gazebo_
```plaintext
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_world.launch
```
(if you need to use /clock in your ros package, you have to be aware about /use_sim_time parameter defined in the launch file)
![](./images/turtlebot3_burger2.png)
* Controlling the Waffle with keyboard
```plaintext
(Remote PC)>roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
```
* Controlling the Waffle Arm
* Run Bringup node for OpenMANIPULATOR on TurtleBot3
```plaintext
roslaunch turtlebot3_manipulation_bringup turtlebot3_manipulation_bringup.launch
```
* Launch move group
```plaintext
(Remote PC)>roslaunch turtlebot3_manipulation_moveit_config move_group.launch
```
* Launch moveit feature in rviz
```plaintext
(Remote PC)>roslaunch turtlebot3_manipulation_moveit_config moveit_rviz.launch
```
* Launching the GUI controller
```plaintext
(Remote PC)>roslaunch turtlebot3_manipulation_gui turtlebot3_manipulation_gui.launch
```
## Getting started using ROS 2
TODO
# Gazebo with multi-turtlebot3s
Gazebo is a robotics simulation framework that allows several different robots to evolve in a predefined spatial environment. For example, it is possible to deploy several turtlebot3 burgers in a simulated environment of the 4th floor of Fayol building.
![](./images/gazebo-fayol.png)
## configure gazebo launch file
Deploying multiple robots in gazebo requires defining the deployment configuration with robot type, robot location, and ROS environment (NAMESPACE). This configuration is stipulated in a launch type file. An example of launch file with 3 turtlebot3 burgers is:
```plaintext
<launch>
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<arg name="first_tb3" default="tb3_0"/>
<arg name="second_tb3" default="tb3_1"/>
<arg name="third_tb3" default="tb3_2"/>
<arg name="first_tb3_x_pos" default="-7.0"/>
<arg name="first_tb3_y_pos" default=" 0.0"/>
<arg name="first_tb3_z_pos" default=" 0.0"/>
<arg name="first_tb3_yaw" default=" 1.57"/>
<arg name="second_tb3_x_pos" default=" 0.0"/>
<arg name="second_tb3_y_pos" default=" 0.0"/>
<arg name="second_tb3_z_pos" default=" 0.0"/>
<arg name="second_tb3_yaw" default=" 1.57"/>
<arg name="third_tb3_x_pos" default=" -1.0"/>
<arg name="third_tb3_y_pos" default=" -1.0"/>
<arg name="third_tb3_z_pos" default=" 0.0"/>
<arg name="third_tb3_yaw" default=" 0.0"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find turtlebot3_gazebo)/models/turtlebot3_world/fayol-4et-1.sdf"/>
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
</include>
<group ns = "$(arg first_tb3)">
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg first_tb3)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg first_tb3) -x $(arg first_tb3_x_pos) -y $(arg first_tb3_y_pos) -z $(arg first_tb3_z_pos) -Y $(arg first_tb3_yaw) -param robot_description" />
</group>
<group ns = "$(arg second_tb3)">
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg second_tb3)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg second_tb3) -x $(arg second_tb3_x_pos) -y $(arg second_tb3_y_pos) -z $(arg second_tb3_z_pos) -Y $(arg second_tb3_yaw) -param robot_description" />
</group>
<group ns = "$(arg third_tb3)">
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg third_tb3)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg third_tb3) -x $(arg third_tb3_x_pos) -y $(arg third_tb3_y_pos) -z $(arg third_tb3_z_pos) -Y $(arg third_tb3_yaw) -param robot_description" />
</group>
</launch>
```
In first, we define the robot configuration:
* the model `<arg name="model" default="burger" doc="model type [burger, waffle, waffle_pi]"/>`
* the namespace `<arg name="first_tb3" default="tb3_0"/>`
* the localization `<arg name="first_tb3_x_pos" default="-7.0"/> <arg name="first_tb3_y_pos" <arg name="first_tb3_z_pos" default=" 0.0"/> <arg name="first_tb3_yaw" default=" 1.57"/>default=" 0.0"/>`
In second, we define the gazebo environment:
* spatial environment `<arg name="world_name" value="$(find turtlebot3_gazebo)/models/turtlebot3_world/fayol-4et-1.sdf"/>`
* simulation time `<arg name="use_sim_time" value="true"/>`
* with user interface `<arg name="gui" value="true"/>`
In last, we configure the robot deployment using group syntax:
* label of the namespace `<group ns = "$(arg first_tb3)">`
* robot urdf `<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />`
* robot intialization with tf_prefix for robot topics
```plaintext
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg first_tb3)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg first_tb3) -x $(arg first_tb3_x_pos) -y $(arg first_tb3_y_pos) -z $(arg first_tb3_z_pos) -Y $(arg first_tb3_yaw) -param robot_description" />
```
![](./images/gazebo-fayol-tb.png)
## Control robot
* Control one specific burger, e.g. burger tb3_0, with keyboard using his namespace
```plaintext
>ROS_NAMESPACE=/tb3_0 roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
```
\+visualize data of burger tb3_0 in rviz
```plaintext
>rosrun rviz rviz
>> Change fixed frame with the reference of tb3_0 burger `tb3_0/odom`
>> Add robot model, change robot description with `tb3_0/robot_description` and add tf_prefix with tb3_0
>> Add laser scan and set topic with `tb3_0/scan`
```
![](./images/gazebo-rviz1.png)
# TurtleBot3 Administration
By default, TurtleBot3 Burger and Waffle robots get automatically configured at startup. The following instructions only apply in case of problem, e.g. if a robot's topics are not advertised properly.
* Configuring the TurtleBot3 Burger
From the remote PC, connect to the Burger by ssh ([Our burger configuration](/specification of our robots)):
```plaintext
(Remote PC)> ssh pi@{IP_ADDRESS_OF_BURGER}
```
Add the following lines in the .bashrc of the Burger to define the necessary environment variables for runnning ROS:
```plaintext
export TURTLEBOT3_MODEL=burger
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_BURGER
```
Reinitialize the environment of your Burger:
```plaintext
(Burger)> source ~/.bashrc
```
Define a specific namespace for your robot and initialize two parameters *multi_robot_name* and *set_lidar_frame_id* with that namespace ([Our burger configuration](/specification of our robots)):
```plaintext
(Burger)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="myspace" set_lidar_frame_id:="myspace/base_scan"
```
* Configuring the TurtleBot3 Waffle
From the remote PC, connect to the Waffle by ssh:
```plaintext
(Remote PC)> ssh pi@{IP_ADDRESS_OF_WAFFLE}
```
Add the following lines in the .bashrc of the Waffle to define the necessary environment variables for runnning ROS:
```plaintext
export TURTLEBOT3_MODEL=waffle_pi
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_WAFFLE
```
Reinitialize the environment of your Waffle:
```plaintext
(Waffle)> source ~/.bashrc
```
```plaintext
(Waffle)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="myspace" set_lidar_frame_id:="myspace/base_scan"
TurtleBot is a ROS standard platform robot. There are 3 versions of the TurtleBot model. The last version, _TurtleBot3_, was developed with features to supplement the lacking functions of its predecessors, and the demands of users.
The TurtleBot3 version adopts ROBOTIS smart actuator DYNAMIXEL for driving. TurtleBot3 is a small, affordable, programmable, ROS-based mobile robot. The TurtleBot3 can be customized into various ways depending on how you reconstruct the mechanical parts and use optional parts such as the computer and sensor. In addition, TurtleBot3 is evolved with cost-effective and small-sized SBC that is suitable for robust embedded system, 360 degree distance sensor and 3D printing technology.
* [Working with the TurtleBot3 Burger](#working-with-the-turtlebot3-burger)
* [Specification](#specification)
* [Local environment and configuration](#local-environment-and-configuration)
* [Getting started using ROS 1](#getting-started-using-ros-1)
* [Configuring](#configuring)
* [Launching ROS](#launching-ros)
* [Getting started using ROS 2](#getting-started-using-ros-2)
* [Working with TurtleBot3 Waffle with arm](#working-with-turtlebot3-waffle-with-arm)
* [Specifications](#specifications)
* [Mobile part Specification](#mobile-part-specification)
* [Arm part Specification (OpenManipulator RM-X52 TNM)](#arm-part-specification-openmanipulator-rm-x52-tnm)
* [Getting started using ROS 1](#getting-started-using-ros-1-1)
* [Configuring](#configuring-1)
* [Launching ROS](#launching-ros-1)
* [Getting started using ROS 2](#getting-started-using-ros-2-1)
* [Gazebo with multi-turtlebot3s](#gazebo-with-multi-turtlebot3s)
* [configure gazebo launch file](#configure-gazebo-launch-file)
* [Control robot](#control-robot)
* [TurtleBot3 Administration](#turtlebot3-administration)
<details>
<summary>Click to expand</summary>
# Working with the TurtleBot3 Burger
</details>
The TurtleBot3 burger is the smallest turtlebot3 mobile robot. It is composed of 2 DYNAMIXEL servomotors (one for each wheel), 1 OpenSource control card (OpenCR ARM Cortex-M7), 1 Raspberry Pi3, sensors for the navigation with 360° LiDAR.
![](./images/turtlebot3-burger1.jpg)
## Specification
* Max translational speed: 0,22 m/s
* Max rotational speed: 162,72°/s
* Max payload: 15kg
* Size: 138 × 178 × 192 mm
* Weight: 995g
* Autonomy: 2h30 (Lithium Polymer Battery 11,1 V 1800 mAh/19.98 Wh 5C)
* Input: 100-240 V, 50/60 Hz CA, 1,5 A @ max
* Output: 12 Vcc, 5 A
* 3-axis gyroscope
* 3-axis accelerometer
* 3-axis magnetometer
* 360° LiDAR
## Local environment and configuration
You can use the ROS distribution and softwares provided in the virtual machine at Mines Saint-Etienne as follows:
* Wifi connected on eduroam
* Install Virtual Box and download [ROS image for virtual box](http://193.49.165.77/virtualbox/)
* Import ROS image in Virtual Box
* Configure Image parameters: System (CPU, RAM), Network (deactivate adaptater 1, activate adaptater 2, check wifi interface)
* Launch the image
* execute ifconfig. You should obtain the same IP address that you have on your own machine
* configure your environment (see below) to be able to use the installed roscore environment
* check the configuration by executing the following command:
```plaintext
> ping roscore
```
Given this environment, you can use the robots in the roscore environment already deployed on [different machines and network infrastructures](/Use_turtlebot3_eduroam). In the following, use the IPs of the different machines to configure the environment variables required to run ROS from you virtual machine.
## Getting started using ROS 1
### Configuring
Add the following lines in the .bashrc of your Remote PC to define the necessary environment variables for runnning ROS:
```plaintext
export TURTLEBOT3_MODEL=burger
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_REMOTE_PC
```
Reinitialize the environment of your Remote PC or Virtual Machine (in the following (Remote PC) equals remote PC or Virtual Machine:
```plaintext
(Remote PC)> source ~/.bashrc
```
Note: IP_OF_SERVER_RUNNING_ROSCORE can be equal to IP_OF_REMOTE_PC in case you run _roscore_ on the Remote PC. The ROS_MASTER_URI is necessary for connecting the ros node running on your Remote PC to the ros master node, i.e. the one running _roscore_.
### Launching ROSCORE
```plaintext
(Remote PC)>roscore
```
### Launching ROSBRIDGE
```plaintext
(Remote PC)>roslaunch rosbridge_server rosbridge_websocket.launch port:=9090
```
### Starting a real robot burger
Define a specific namespace for each robot and initialize the *multi_robot_name* parameter with that namespace ([Our burger configuration](/specification of our robots)):
```plaintext
(Remote PC)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=myspace
```
### Starting a simulated robot burger
* with _gazebo_
```plaintext
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_world.launch
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_gazebo_rviz.launch
```
(if you need to use /clock in your ros package, you have to be aware about *use_sim_time* parameter defined in the launch file)
![](./images/turtlebot3_burger2.png)
* with _rviz_ ([Our burger configuration](/specification of our robots))
```plaintext
(Remote PC)>[ROS_NAMESPACE=/myspace] roslaunch turtlebot3_fake turtlebot3_fake.launch
```
(if you use a specific namespace, dont forget to change it in the rviz interface (e.g. /odom by /myspace/odom))
![](./images/turtlebot3-rviz.png)
### Controlling the burger with keyboard
([Our burger configuration](/specification of our robots))
```plaintext
(Remote PC)>[ROS_NAMESPACE=/myspace] roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
```
## Getting started using ROS 2
TODO
# Working with TurtleBot3 Waffle with arm
The waffle follows the same philosophy as the burger. The main difference is a bigger platfom and the possibility of installing a robotic arm on it. Also the waffle can be used as a mobile manipulator capable of manipulating an object by attaching a manipulator like OpenMANIPULATOR.
![](./images/turtlebot3-waffle1.jpg)
## Specifications
### Mobile part Specification
* Max translational speed: 0,26 m/s
* Max rotational speed: 104,27°/s
* 2 servomotors Dynamixel XM430-W210-T
* Max payload: 30kg
* Size: 281 x 306 x 141 mm
* Weight: 1,8g
* Autonomy: 2h (Lithium Polymer Battery 11,1 V 1800 mAh/19.98 Wh 5C)
* Input: 100-240 V, 50/60 Hz CA, 1,5 A @ max
* Output: 12 Vcc, 5 A
* 3-axis gyroscope
* 3-axis accelerometer
* 3-axis magnetometer
* 360° LiDAR
* Raspberry Pi Camera
### Arm part Specification (OpenManipulator RM-X52 TNM)
* 5xServomotors: Dynamixel XM430-W350-T x 5
* Power: 12V
* Degrees of freedom: 5 (4 for arm, 1 for gripper)
* Max payload: 500g
* Rotation speed: 46rpm
* 1xgripper with openning between 20 to 75mm
* Communication: TTL with Multi Drop bus
* Weight: 700g
* Range: 380mm
## Getting started using ROS 1
### Configuring
Add the following lines in the .bashrc of your Remote PC to define the necessary environment variables for runnning ROS:
```plaintext
export TURTLEBOT3_MODEL=waffle_pi
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_REMOTE_PC
```
Reinitialize the environment of your Remote PC:
```plaintext
(Remote PC)> source ~/.bashrc
```
Note: IP_OF_SERVER_RUNNING_ROSCORE can be equal to IP_OF_REMOTE_PC in case you run *roscore* on the Remote PC. The ROS_MASTER_URI is necessary for connecting the ros node running on your Remote PC to the ros master node, i.e. the one running *roscore*.
### Launching ROS
* Launching roscore
```plaintext
(Remote PC)>roscore
```
* Starting a real robot Waffle
```plaintext
(Remote PC)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=myspace
```
* Starting a simulated robot Waffle with _gazebo_
```plaintext
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_world.launch
```
(if you need to use /clock in your ros package, you have to be aware about /use_sim_time parameter defined in the launch file)
![](./images/turtlebot3_burger2.png)
* Controlling the Waffle with keyboard
```plaintext
(Remote PC)>roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
```
* Controlling the Waffle Arm
* Run Bringup node for OpenMANIPULATOR on TurtleBot3
```plaintext
roslaunch turtlebot3_manipulation_bringup turtlebot3_manipulation_bringup.launch
```
* Launch move group
```plaintext
(Remote PC)>roslaunch turtlebot3_manipulation_moveit_config move_group.launch
```
* Launch moveit feature in rviz
```plaintext
(Remote PC)>roslaunch turtlebot3_manipulation_moveit_config moveit_rviz.launch
```
* Launching the GUI controller
```plaintext
(Remote PC)>roslaunch turtlebot3_manipulation_gui turtlebot3_manipulation_gui.launch
```
## Getting started using ROS 2
TODO
# Gazebo with multi-turtlebot3s
Gazebo is a robotics simulation framework that allows several different robots to evolve in a predefined spatial environment. For example, it is possible to deploy several turtlebot3 burgers in a simulated environment of the 4th floor of Fayol building.
![](./images/gazebo-fayol.png)
## configure gazebo launch file
Deploying multiple robots in gazebo requires defining the deployment configuration with robot type, robot location, and ROS environment (NAMESPACE). This configuration is stipulated in a launch type file. An example of launch file with 3 turtlebot3 burgers is:
```plaintext
<launch>
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<arg name="first_tb3" default="tb3_0"/>
<arg name="second_tb3" default="tb3_1"/>
<arg name="third_tb3" default="tb3_2"/>
<arg name="first_tb3_x_pos" default="-7.0"/>
<arg name="first_tb3_y_pos" default=" 0.0"/>
<arg name="first_tb3_z_pos" default=" 0.0"/>
<arg name="first_tb3_yaw" default=" 1.57"/>
<arg name="second_tb3_x_pos" default=" 0.0"/>
<arg name="second_tb3_y_pos" default=" 0.0"/>
<arg name="second_tb3_z_pos" default=" 0.0"/>
<arg name="second_tb3_yaw" default=" 1.57"/>
<arg name="third_tb3_x_pos" default=" -1.0"/>
<arg name="third_tb3_y_pos" default=" -1.0"/>
<arg name="third_tb3_z_pos" default=" 0.0"/>
<arg name="third_tb3_yaw" default=" 0.0"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find turtlebot3_gazebo)/models/turtlebot3_world/fayol-4et-1.sdf"/>
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
</include>
<group ns = "$(arg first_tb3)">
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg first_tb3)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg first_tb3) -x $(arg first_tb3_x_pos) -y $(arg first_tb3_y_pos) -z $(arg first_tb3_z_pos) -Y $(arg first_tb3_yaw) -param robot_description" />
</group>
<group ns = "$(arg second_tb3)">
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg second_tb3)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg second_tb3) -x $(arg second_tb3_x_pos) -y $(arg second_tb3_y_pos) -z $(arg second_tb3_z_pos) -Y $(arg second_tb3_yaw) -param robot_description" />
</group>
<group ns = "$(arg third_tb3)">
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg third_tb3)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg third_tb3) -x $(arg third_tb3_x_pos) -y $(arg third_tb3_y_pos) -z $(arg third_tb3_z_pos) -Y $(arg third_tb3_yaw) -param robot_description" />
</group>
</launch>
```
In first, we define the robot configuration:
* the model `<arg name="model" default="burger" doc="model type [burger, waffle, waffle_pi]"/>`
* the namespace `<arg name="first_tb3" default="tb3_0"/>`
* the localization `<arg name="first_tb3_x_pos" default="-7.0"/> <arg name="first_tb3_y_pos" <arg name="first_tb3_z_pos" default=" 0.0"/> <arg name="first_tb3_yaw" default=" 1.57"/>default=" 0.0"/>`
In second, we define the gazebo environment:
* spatial environment `<arg name="world_name" value="$(find turtlebot3_gazebo)/models/turtlebot3_world/fayol-4et-1.sdf"/>`
* simulation time `<arg name="use_sim_time" value="true"/>`
* with user interface `<arg name="gui" value="true"/>`
In last, we configure the robot deployment using group syntax:
* label of the namespace `<group ns = "$(arg first_tb3)">`
* robot urdf `<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />`
* robot intialization with tf_prefix for robot topics
```plaintext
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg first_tb3)" />
</node>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg first_tb3) -x $(arg first_tb3_x_pos) -y $(arg first_tb3_y_pos) -z $(arg first_tb3_z_pos) -Y $(arg first_tb3_yaw) -param robot_description" />
```
![](./images/gazebo-fayol-tb.png)
## Control robot
* Control one specific burger, e.g. burger tb3_0, with keyboard using his namespace
```plaintext
>ROS_NAMESPACE=/tb3_0 roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
```
\+visualize data of burger tb3_0 in rviz
```plaintext
>rosrun rviz rviz
>> Change fixed frame with the reference of tb3_0 burger `tb3_0/odom`
>> Add robot model, change robot description with `tb3_0/robot_description` and add tf_prefix with tb3_0
>> Add laser scan and set topic with `tb3_0/scan`
```
![](./images/gazebo-rviz1.png)
# TurtleBot3 Administration
By default, TurtleBot3 Burger and Waffle robots get automatically configured at startup. The following instructions only apply in case of problem, e.g. if a robot's topics are not advertised properly.
* Configuring the TurtleBot3 Burger
From the remote PC, connect to the Burger by ssh ([Our burger configuration](/specification of our robots)):
```plaintext
(Remote PC)> ssh pi@{IP_ADDRESS_OF_BURGER}
```
Add the following lines in the .bashrc of the Burger to define the necessary environment variables for runnning ROS:
```plaintext
export TURTLEBOT3_MODEL=burger
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_BURGER
```
Reinitialize the environment of your Burger:
```plaintext
(Burger)> source ~/.bashrc
```
Define a specific namespace for your robot and initialize two parameters *multi_robot_name* and *set_lidar_frame_id* with that namespace ([Our burger configuration](/specification of our robots)):
```plaintext
(Burger)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="myspace" set_lidar_frame_id:="myspace/base_scan"
```
* Configuring the TurtleBot3 Waffle
From the remote PC, connect to the Waffle by ssh:
```plaintext
(Remote PC)> ssh pi@{IP_ADDRESS_OF_WAFFLE}
```
Add the following lines in the .bashrc of the Waffle to define the necessary environment variables for runnning ROS:
```plaintext
export TURTLEBOT3_MODEL=waffle_pi
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_WAFFLE
```
Reinitialize the environment of your Waffle:
```plaintext
(Waffle)> source ~/.bashrc
```
```plaintext
(Waffle)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="myspace" set_lidar_frame_id:="myspace/base_scan"
```
\ No newline at end of file