You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9ab6c98
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: _docs/tutorials/demos/crazyflie_demo/index.md
+25-20Lines changed: 25 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,38 +5,43 @@ redirect_from:
5
5
- /crazyflie_demo/
6
6
---
7
7
8
-
This demo aims to expose a **micro-ROS** use case. It runs on a pair of embedded devices:
8
+
This demo aims to expose a **micro-ROS** use case. It runs o a pair of embedded devices:
9
9
a [**Crazyflie 2.1**](https://www.bitcraze.io/crazyflie-2-1/) drone, used as a user controller,
10
10
and a [**Kobuki Turtlebot 2**](https://www.turtlebot.com/turtlebot2/) as a mobile and controlled device.
11
11
12
+

13
+
12
14
Both of them rely on **micro-ROS** publication and subscription mechanisms and use an underlying [**Micro XRCE-DSS client**](https://micro-xrce-dds.readthedocs.io/en/latest/).
13
15
14
16
This demo also includes conventional ROS 2 tooling as a demonstration of integration with **ROS 2**. We use Gazebo, RVIZ and simple ROS 2 nodes (aka **external nodes**) acting as data converters.
15
17
18
+
This demo was developed taking as base the [Kobuki demo](/docs/tutorials/demos/kobuki_demo).
The proposed demo is composed of different kind of messages and topics.
34
+
The proposed demo is composed of different kind of messages and topics.
30
35
31
36
The **Crazyflie 2.1** drone relies on [ST STM32F405](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) MCU running **[FreeRTOS](https://www.freertos.org/)**. Using the RTOS capabilities and the integrated radio communication device, the drone can run a node that publishes:
32
37
- its own relative position as a 3D vector (X, Y and Z) using a *geometry_msg/Point32* message type on */drone/odometry* topic.
33
38
- its own attitude as a 3D vector (pitch, roll and yaw) using a *geometry_msg/Point32* message type on */drone/attitude* topic.
34
39
35
40
The **Kobuki Turtlebot 2** robot is controlled using a UART protocol through a custom DB25 connector. The micro-ROS node runs on an Olimex STM32-E407 board attached to that UART port. This hardware features a [ST STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) MCU running **[Nuttx](https://nuttx.org/)** RTOS. In the same way, this node can communicate with the robot (UART) and with the ROS2 world (integrated Ethernet). Its used topics are:
36
41
- a subscription on */cmd_vel* topic (*geometry_msg/Twist* message type) to receive the controlling angular and linear velocity.
37
-
- a publication on */robot_pose* topic (*geometry_msg/Vector3* message type) which includes X position, Y position and robot yaw.
42
+
- a publication on */robot_pose* topic (*geometry_msg/Vector3* message type) which includes X position, Y position and robot yaw.
38
43
39
-
The **external ROS2 nodes** are rclpy tools with some different functionalities:
44
+
The **external ROS 2 nodes** are rclpy tools with some different functionalities:
40
45
-*attitude_to_vel.py*
41
46
- Converts Crazyflie */drone/attitude* to Kobuki Turtlebot 2 */cmd_vel* so that drone pitch is mapped to robot linear velocity and drone roll to angular valocity.
42
47
- Converts Crazyflie publications on */drone/attitude* and */drone/attitude* topics to *tf2_msgs/TFMessage* messages (required by RVIZ visualizer)
@@ -65,9 +70,9 @@ This setup uses the following hardware:
@@ -216,7 +221,7 @@ After installation, the following packages should be present in your system:
216
221
+-- crazyflie-clients-python
217
222
```
218
223
219
-
Make sure that all ROS2 or MicroROS nodes created along with the following steps **can reach each other using its network interfaces**.
224
+
Make sure that all ROS 2 or micro-ROS nodes created along with the following steps **can reach each other using its network interfaces**.
220
225
221
226
## Run Kobuki Turtlebot 2 Node
222
227
@@ -243,15 +248,15 @@ python3 bin/cfclient
243
248
244
249
This command should open the Crazyflie Client and print a serial device path in the terminal (something like /dev/pts/0).
245
250
246
-
Run (in another prompt) a **MicroXRCE Agent**:
251
+
Run (in another prompt) a **Micro XRCE-DDS Agent**:
247
252
```
248
253
MicroXRCEAgent serial --dev [serial device]
249
254
```
250
255
251
-
**MicroXRCE Agent** should receive an incoming client connection and */drone/attitude* and */drone/position* topics should be published. Check it with `ros2 topic echo /drone/attitude` and `ros2 topic echo /drone/position`
256
+
**Micro XRCE-DDS Agent** should receive an incoming client connection and */drone/attitude* and */drone/position* topics should be published. Check it with `ros2 topic echo /drone/attitude` and `ros2 topic echo /drone/position`
0 commit comments