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. 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. 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) * [Working with the TurtleBot3 Burger](#working-with-the-turtlebot3-burger)
* [Specification](#specification) * [Specification](#specification)
* [Local environment and configuration](#local-environment-and-configuration) * [Local environment and configuration](#local-environment-and-configuration)
* [Getting started using ROS 1](#getting-started-using-ros-1) * [Getting started using ROS 1](#getting-started-using-ros-1)
* [Configuring](#configuring) * [Configuring](#configuring)
* [Launching ROS](#launching-ros) * [Launching ROS](#launching-ros)
* [Getting started using ROS 2](#getting-started-using-ros-2) * [Getting started using ROS 2](#getting-started-using-ros-2)
* [Working with TurtleBot3 Waffle with arm](#working-with-turtlebot3-waffle-with-arm) * [Working with TurtleBot3 Waffle with arm](#working-with-turtlebot3-waffle-with-arm)
* [Specifications](#specifications) * [Specifications](#specifications)
* [Mobile part Specification](#mobile-part-specification) * [Mobile part Specification](#mobile-part-specification)
* [Arm part Specification (OpenManipulator RM-X52 TNM)](#arm-part-specification-openmanipulator-rm-x52-tnm) * [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) * [Getting started using ROS 1](#getting-started-using-ros-1-1)
* [Configuring](#configuring-1) * [Configuring](#configuring-1)
* [Launching ROS](#launching-ros-1) * [Launching ROS](#launching-ros-1)
* [Getting started using ROS 2](#getting-started-using-ros-2-1) * [Getting started using ROS 2](#getting-started-using-ros-2-1)
* [Gazebo with multi-turtlebot3s](#gazebo-with-multi-turtlebot3s) * [Gazebo with multi-turtlebot3s](#gazebo-with-multi-turtlebot3s)
* [configure gazebo launch file](#configure-gazebo-launch-file) * [configure gazebo launch file](#configure-gazebo-launch-file)
* [Control robot](#control-robot) * [Control robot](#control-robot)
* [TurtleBot3 Administration](#turtlebot3-administration) * [TurtleBot3 Administration](#turtlebot3-administration)
# Working with the TurtleBot3 Burger <details>
<summary>Click to expand</summary>
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.
# Working with the TurtleBot3 Burger
![](./images/turtlebot3-burger1.jpg)
</details>
## Specification
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.
* Max translational speed: 0,22 m/s
* Max rotational speed: 162,72°/s ![](./images/turtlebot3-burger1.jpg)
* Max payload: 15kg
* Size: 138 × 178 × 192 mm ## Specification
* Weight: 995g
* Autonomy: 2h30 (Lithium Polymer Battery 11,1 V 1800 mAh/19.98 Wh 5C) * Max translational speed: 0,22 m/s
* Input: 100-240 V, 50/60 Hz CA, 1,5 A @ max * Max rotational speed: 162,72°/s
* Output: 12 Vcc, 5 A * Max payload: 15kg
* 3-axis gyroscope * Size: 138 × 178 × 192 mm
* 3-axis accelerometer * Weight: 995g
* 3-axis magnetometer * Autonomy: 2h30 (Lithium Polymer Battery 11,1 V 1800 mAh/19.98 Wh 5C)
* 360° LiDAR * Input: 100-240 V, 50/60 Hz CA, 1,5 A @ max
* Output: 12 Vcc, 5 A
## Local environment and configuration * 3-axis gyroscope
* 3-axis accelerometer
You can use the ROS distribution and softwares provided in the virtual machine at Mines Saint-Etienne as follows: * 3-axis magnetometer
* Wifi connected on eduroam * 360° LiDAR
* Install Virtual Box and download [ROS image for virtual box](http://193.49.165.77/virtualbox/)
* Import ROS image in Virtual Box ## Local environment and configuration
* Configure Image parameters: System (CPU, RAM), Network (deactivate adaptater 1, activate adaptater 2, check wifi interface)
* Launch the image You can use the ROS distribution and softwares provided in the virtual machine at Mines Saint-Etienne as follows:
* execute ifconfig. You should obtain the same IP address that you have on your own machine * Wifi connected on eduroam
* configure your environment (see below) to be able to use the installed roscore environment * Install Virtual Box and download [ROS image for virtual box](http://193.49.165.77/virtualbox/)
* check the configuration by executing the following command: * Import ROS image in Virtual Box
```plaintext * Configure Image parameters: System (CPU, RAM), Network (deactivate adaptater 1, activate adaptater 2, check wifi interface)
> ping roscore * 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
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. * check the configuration by executing the following command:
```plaintext
## Getting started using ROS 1 > ping roscore
```
### Configuring
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.
Add the following lines in the .bashrc of your Remote PC to define the necessary environment variables for runnning ROS:
## Getting started using ROS 1
```plaintext
export TURTLEBOT3_MODEL=burger ### Configuring
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_REMOTE_PC Add the following lines in the .bashrc of your Remote PC to define the necessary environment variables for runnning ROS:
```
```plaintext
Reinitialize the environment of your Remote PC or Virtual Machine (in the following (Remote PC) equals remote PC or Virtual Machine: export TURTLEBOT3_MODEL=burger
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
```plaintext export ROS_HOSTNAME=IP_OF_REMOTE_PC
(Remote PC)> source ~/.bashrc ```
```
Reinitialize the environment of your Remote PC or Virtual Machine (in the following (Remote PC) equals remote PC or Virtual Machine:
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_.
```plaintext
### Launching ROSCORE (Remote PC)> source ~/.bashrc
```
```plaintext
(Remote PC)>roscore 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
### Launching ROSBRIDGE
```plaintext
```plaintext (Remote PC)>roscore
(Remote PC)>roslaunch rosbridge_server rosbridge_websocket.launch port:=9090 ```
```
### Launching ROSBRIDGE
### Starting a real robot burger ```plaintext
(Remote PC)>roslaunch rosbridge_server rosbridge_websocket.launch port:=9090
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 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)):
### Starting a simulated robot burger
```plaintext
* with _gazebo_ (Remote PC)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=myspace
```
```plaintext
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_world.launch ### Starting a simulated robot burger
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_gazebo_rviz.launch
``` * with _gazebo_
(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) ```plaintext
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_world.launch
![](./images/turtlebot3_burger2.png) (Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_gazebo_rviz.launch
```
* with _rviz_ ([Our burger configuration](/specification of our robots))
(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)
```plaintext
(Remote PC)>[ROS_NAMESPACE=/myspace] roslaunch turtlebot3_fake turtlebot3_fake.launch ![](./images/turtlebot3_burger2.png)
```
* with _rviz_ ([Our burger configuration](/specification of our robots))
(if you use a specific namespace, dont forget to change it in the rviz interface (e.g. /odom by /myspace/odom))
```plaintext
![](./images/turtlebot3-rviz.png) (Remote PC)>[ROS_NAMESPACE=/myspace] roslaunch turtlebot3_fake turtlebot3_fake.launch
```
### Controlling the burger with keyboard
(if you use a specific namespace, dont forget to change it in the rviz interface (e.g. /odom by /myspace/odom))
([Our burger configuration](/specification of our robots))
![](./images/turtlebot3-rviz.png)
```plaintext
(Remote PC)>[ROS_NAMESPACE=/myspace] roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch ### Controlling the burger with keyboard
```
([Our burger configuration](/specification of our robots))
## Getting started using ROS 2
```plaintext
TODO (Remote PC)>[ROS_NAMESPACE=/myspace] roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
```
# Working with TurtleBot3 Waffle with arm
## Getting started using ROS 2
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.
TODO
![](./images/turtlebot3-waffle1.jpg)
# Working with TurtleBot3 Waffle with arm
## Specifications
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.
### Mobile part Specification
![](./images/turtlebot3-waffle1.jpg)
* Max translational speed: 0,26 m/s
* Max rotational speed: 104,27°/s ## Specifications
* 2 servomotors Dynamixel XM430-W210-T
* Max payload: 30kg ### Mobile part Specification
* Size: 281 x 306 x 141 mm
* Weight: 1,8g * Max translational speed: 0,26 m/s
* Autonomy: 2h (Lithium Polymer Battery 11,1 V 1800 mAh/19.98 Wh 5C) * Max rotational speed: 104,27°/s
* Input: 100-240 V, 50/60 Hz CA, 1,5 A @ max * 2 servomotors Dynamixel XM430-W210-T
* Output: 12 Vcc, 5 A * Max payload: 30kg
* 3-axis gyroscope * Size: 281 x 306 x 141 mm
* 3-axis accelerometer * Weight: 1,8g
* 3-axis magnetometer * Autonomy: 2h (Lithium Polymer Battery 11,1 V 1800 mAh/19.98 Wh 5C)
* 360° LiDAR * Input: 100-240 V, 50/60 Hz CA, 1,5 A @ max
* Raspberry Pi Camera * Output: 12 Vcc, 5 A
* 3-axis gyroscope
### Arm part Specification (OpenManipulator RM-X52 TNM) * 3-axis accelerometer
* 3-axis magnetometer
* 5xServomotors: Dynamixel XM430-W350-T x 5 * 360° LiDAR
* Power: 12V * Raspberry Pi Camera
* Degrees of freedom: 5 (4 for arm, 1 for gripper)
* Max payload: 500g ### Arm part Specification (OpenManipulator RM-X52 TNM)
* Rotation speed: 46rpm
* 1xgripper with openning between 20 to 75mm * 5xServomotors: Dynamixel XM430-W350-T x 5
* Communication: TTL with Multi Drop bus * Power: 12V
* Weight: 700g * Degrees of freedom: 5 (4 for arm, 1 for gripper)
* Range: 380mm * Max payload: 500g
* Rotation speed: 46rpm
## Getting started using ROS 1 * 1xgripper with openning between 20 to 75mm
* Communication: TTL with Multi Drop bus
### Configuring * Weight: 700g
* Range: 380mm
Add the following lines in the .bashrc of your Remote PC to define the necessary environment variables for runnning ROS:
## Getting started using ROS 1
```plaintext
export TURTLEBOT3_MODEL=waffle_pi ### Configuring
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_REMOTE_PC Add the following lines in the .bashrc of your Remote PC to define the necessary environment variables for runnning ROS:
```
```plaintext
Reinitialize the environment of your Remote PC: export TURTLEBOT3_MODEL=waffle_pi
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
```plaintext export ROS_HOSTNAME=IP_OF_REMOTE_PC
(Remote PC)> source ~/.bashrc ```
```
Reinitialize the environment of your Remote PC:
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*.
```plaintext
### Launching ROS (Remote PC)> source ~/.bashrc
```
* Launching roscore
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*.
```plaintext
(Remote PC)>roscore ### Launching ROS
```
* Launching roscore
* Starting a real robot Waffle
```plaintext
```plaintext (Remote PC)>roscore
(Remote PC)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=myspace ```
```
* Starting a real robot Waffle
* Starting a simulated robot Waffle with _gazebo_
```plaintext
```plaintext (Remote PC)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=myspace
(Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_world.launch ```
```
* Starting a simulated robot Waffle with _gazebo_
(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)
```plaintext
![](./images/turtlebot3_burger2.png) (Remote PC)>roslaunch turtlebot3_gazebo turtlebot3_world.launch
```
* Controlling the Waffle with keyboard
(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)
```plaintext
(Remote PC)>roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch ![](./images/turtlebot3_burger2.png)
```
* Controlling the Waffle with keyboard
* Controlling the Waffle Arm
* Run Bringup node for OpenMANIPULATOR on TurtleBot3 ```plaintext
(Remote PC)>roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
```plaintext ```
roslaunch turtlebot3_manipulation_bringup turtlebot3_manipulation_bringup.launch
``` * Controlling the Waffle Arm
* Run Bringup node for OpenMANIPULATOR on TurtleBot3
* Launch move group
```plaintext
```plaintext roslaunch turtlebot3_manipulation_bringup turtlebot3_manipulation_bringup.launch
(Remote PC)>roslaunch turtlebot3_manipulation_moveit_config move_group.launch ```
```
* Launch move group
* Launch moveit feature in rviz
```plaintext
```plaintext (Remote PC)>roslaunch turtlebot3_manipulation_moveit_config move_group.launch
(Remote PC)>roslaunch turtlebot3_manipulation_moveit_config moveit_rviz.launch ```
```
* Launch moveit feature in rviz
* Launching the GUI controller
```plaintext
```plaintext (Remote PC)>roslaunch turtlebot3_manipulation_moveit_config moveit_rviz.launch
(Remote PC)>roslaunch turtlebot3_manipulation_gui turtlebot3_manipulation_gui.launch ```
```
* Launching the GUI controller
## Getting started using ROS 2
```plaintext
TODO (Remote PC)>roslaunch turtlebot3_manipulation_gui turtlebot3_manipulation_gui.launch
```
# Gazebo with multi-turtlebot3s
## Getting started using ROS 2
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.
TODO
![](./images/gazebo-fayol.png)
# Gazebo with multi-turtlebot3s
## configure gazebo launch file
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.
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:
![](./images/gazebo-fayol.png)
```plaintext
<launch> ## configure gazebo launch file
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<arg name="first_tb3" default="tb3_0"/> 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:
<arg name="second_tb3" default="tb3_1"/>
<arg name="third_tb3" default="tb3_2"/> ```plaintext
<launch>
<arg name="first_tb3_x_pos" default="-7.0"/> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<arg name="first_tb3_y_pos" default=" 0.0"/> <arg name="first_tb3" default="tb3_0"/>
<arg name="first_tb3_z_pos" default=" 0.0"/> <arg name="second_tb3" default="tb3_1"/>
<arg name="first_tb3_yaw" default=" 1.57"/> <arg name="third_tb3" default="tb3_2"/>
<arg name="second_tb3_x_pos" default=" 0.0"/> <arg name="first_tb3_x_pos" default="-7.0"/>
<arg name="second_tb3_y_pos" default=" 0.0"/> <arg name="first_tb3_y_pos" default=" 0.0"/>
<arg name="second_tb3_z_pos" default=" 0.0"/> <arg name="first_tb3_z_pos" default=" 0.0"/>
<arg name="second_tb3_yaw" default=" 1.57"/> <arg name="first_tb3_yaw" default=" 1.57"/>
<arg name="third_tb3_x_pos" default=" -1.0"/> <arg name="second_tb3_x_pos" default=" 0.0"/>
<arg name="third_tb3_y_pos" default=" -1.0"/> <arg name="second_tb3_y_pos" default=" 0.0"/>
<arg name="third_tb3_z_pos" default=" 0.0"/> <arg name="second_tb3_z_pos" default=" 0.0"/>
<arg name="third_tb3_yaw" default=" 0.0"/> <arg name="second_tb3_yaw" default=" 1.57"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="third_tb3_x_pos" default=" -1.0"/>
<arg name="world_name" value="$(find turtlebot3_gazebo)/models/turtlebot3_world/fayol-4et-1.sdf"/> <arg name="third_tb3_y_pos" default=" -1.0"/>
<arg name="paused" value="false"/> <arg name="third_tb3_z_pos" default=" 0.0"/>
<arg name="use_sim_time" value="true"/> <arg name="third_tb3_yaw" default=" 0.0"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/> <include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="debug" value="false"/> <arg name="world_name" value="$(find turtlebot3_gazebo)/models/turtlebot3_world/fayol-4et-1.sdf"/>
</include> <arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>
<group ns = "$(arg first_tb3)"> <arg name="gui" value="true"/>
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" /> <arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> </include>
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg first_tb3)" /> <group ns = "$(arg first_tb3)">
</node> <param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<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" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
</group> <param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg first_tb3)" />
<group ns = "$(arg second_tb3)"> </node>
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<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" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> </group>
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg second_tb3)" /> <group ns = "$(arg second_tb3)">
</node> <param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<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" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
</group> <param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg second_tb3)" />
<group ns = "$(arg third_tb3)"> </node>
<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<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" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> </group>
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg third_tb3)" /> <group ns = "$(arg third_tb3)">
</node> <param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />
<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" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
</group> <param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg third_tb3)" />
</launch> </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" />
In first, we define the robot configuration: </group>
* the model `<arg name="model" default="burger" doc="model type [burger, waffle, waffle_pi]"/>` </launch>
* 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 first, we define the robot configuration:
In second, we define the gazebo environment:
* the model `<arg name="model" default="burger" doc="model type [burger, waffle, waffle_pi]"/>`
* spatial environment `<arg name="world_name" value="$(find turtlebot3_gazebo)/models/turtlebot3_world/fayol-4et-1.sdf"/>` * the namespace `<arg name="first_tb3" default="tb3_0"/>`
* simulation time `<arg name="use_sim_time" value="true"/>` * 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"/>`
* with user interface `<arg name="gui" value="true"/>`
In second, we define the gazebo environment:
In last, we configure the robot deployment using group syntax:
* spatial environment `<arg name="world_name" value="$(find turtlebot3_gazebo)/models/turtlebot3_world/fayol-4et-1.sdf"/>`
* label of the namespace `<group ns = "$(arg first_tb3)">` * simulation time `<arg name="use_sim_time" value="true"/>`
* robot urdf `<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />` * with user interface `<arg name="gui" value="true"/>`
* robot intialization with tf_prefix for robot topics
In last, we configure the robot deployment using group syntax:
```plaintext
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> * label of the namespace `<group ns = "$(arg first_tb3)">`
<param name="publish_frequency" type="double" value="50.0" /> * robot urdf `<param name="robot_description" command="$(find xacro)/xacro $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />`
<param name="tf_prefix" value="$(arg first_tb3)" /> * robot intialization with tf_prefix for robot topics
</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" /> ```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" />
![](./images/gazebo-fayol-tb.png) <param name="tf_prefix" value="$(arg first_tb3)" />
</node>
## Control robot <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" />
```
* Control one specific burger, e.g. burger tb3_0, with keyboard using his namespace
![](./images/gazebo-fayol-tb.png)
```plaintext
>ROS_NAMESPACE=/tb3_0 roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch ## Control robot
```
* Control one specific burger, e.g. burger tb3_0, with keyboard using his namespace
\+visualize data of burger tb3_0 in rviz
```plaintext
```plaintext >ROS_NAMESPACE=/tb3_0 roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
>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 \+visualize data of burger tb3_0 in rviz
>> Add laser scan and set topic with `tb3_0/scan`
``` ```plaintext
>rosrun rviz rviz
![](./images/gazebo-rviz1.png) >> 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
# TurtleBot3 Administration >> Add laser scan and set topic with `tb3_0/scan`
```
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.
![](./images/gazebo-rviz1.png)
* Configuring the TurtleBot3 Burger
# TurtleBot3 Administration
From the remote PC, connect to the Burger by ssh ([Our burger configuration](/specification of our robots)):
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.
```plaintext
(Remote PC)> ssh pi@{IP_ADDRESS_OF_BURGER} * Configuring the TurtleBot3 Burger
```
From the remote PC, connect to the Burger by ssh ([Our burger configuration](/specification of our robots)):
Add the following lines in the .bashrc of the Burger to define the necessary environment variables for runnning ROS:
```plaintext
```plaintext (Remote PC)> ssh pi@{IP_ADDRESS_OF_BURGER}
export TURTLEBOT3_MODEL=burger ```
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_BURGER Add the following lines in the .bashrc of the Burger to define the necessary environment variables for runnning ROS:
```
```plaintext
Reinitialize the environment of your Burger: export TURTLEBOT3_MODEL=burger
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
```plaintext export ROS_HOSTNAME=IP_OF_BURGER
(Burger)> source ~/.bashrc ```
```
Reinitialize the environment of your Burger:
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
```plaintext (Burger)> source ~/.bashrc
(Burger)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="myspace" set_lidar_frame_id:="myspace/base_scan" ```
```
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)):
* Configuring the TurtleBot3 Waffle
```plaintext
From the remote PC, connect to the Waffle by ssh: (Burger)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="myspace" set_lidar_frame_id:="myspace/base_scan"
```
```plaintext
(Remote PC)> ssh pi@{IP_ADDRESS_OF_WAFFLE} * Configuring the TurtleBot3 Waffle
```
From the remote PC, connect to the Waffle by ssh:
Add the following lines in the .bashrc of the Waffle to define the necessary environment variables for runnning ROS:
```plaintext
```plaintext (Remote PC)> ssh pi@{IP_ADDRESS_OF_WAFFLE}
export TURTLEBOT3_MODEL=waffle_pi ```
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
export ROS_HOSTNAME=IP_OF_WAFFLE Add the following lines in the .bashrc of the Waffle to define the necessary environment variables for runnning ROS:
```
```plaintext
Reinitialize the environment of your Waffle: export TURTLEBOT3_MODEL=waffle_pi
export ROS_MASTER_URI=http://IP_OF_SERVER_RUNNING_ROSCORE:11311
```plaintext export ROS_HOSTNAME=IP_OF_WAFFLE
(Waffle)> source ~/.bashrc ```
```
Reinitialize the environment of your Waffle:
```plaintext
(Waffle)>[ROS_NAMESPACE=myspace] roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="myspace" set_lidar_frame_id:="myspace/base_scan" ```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