Skip to content

Commit 9ab6c98

Browse files
BorjaOutereloralph-lange
authored andcommitted
Add image and use correct naming.
1 parent 7f93e56 commit 9ab6c98

2 files changed

Lines changed: 25 additions & 20 deletions

File tree

‎_docs/tutorials/demos/crazyflie_demo/index.md‎

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,43 @@ redirect_from:
55
- /crazyflie_demo/
66
---
77

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:
99
a [**Crazyflie 2.1**](https://www.bitcraze.io/crazyflie-2-1/) drone, used as a user controller,
1010
and a [**Kobuki Turtlebot 2**](https://www.turtlebot.com/turtlebot2/) as a mobile and controlled device.
1111

12+
![Illustration of the Crazyflie - DDS interaction](micro-ROS_crazyflie.png)
13+
1214
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/).
1315

1416
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.
1517

18+
This demo was developed taking as base the [Kobuki demo](/docs/tutorials/demos/kobuki_demo).
19+
20+
## Index
1621
- [Installation](#installation)
17-
- [Install external ROS2 nodes](#install-external-ros2-nodes)
18-
- [Build and flash Crazyflie 2.1 firmware](#build-and-flash-crazyflie-21-firmware)
19-
- [Install Crazyflie Client + Bridge](#install-crazyflie-client--bridge)
20-
- [Build and flash Kobuki Turtlebot 2 firmware](#build-and-flash-kobuki-turtlebot-2-firmware)
22+
- [Install external ROS 2 nodes](#install-external-ros-2-nodes)
23+
- [Build and flash Crazyflie 2.1 firmware](#build-and-flash-crazyflie-21-firmware)
24+
- [Install Crazyflie Client + Bridge](#install-crazyflie-client--bridge)
25+
- [Build and flash Kobuki Turtlebot 2 firmware](#build-and-flash-kobuki-turtlebot-2-firmware)
2126
- [Usage](#usage)
22-
- [Run Kobuki Turtlebot 2 Node](#run-kobuki-turtlebot-2-node)
23-
- [Run Crazyflie 2.1 Node](#run-crazyflie-21-node)
24-
- [Run external ROS2 nodes](#run-external-ros2-nodes)
25-
- [Run RVIZ visualizers](#run-rviz-visualizers)
27+
- [Run Kobuki Turtlebot 2 Node](#run-kobuki-turtlebot-2-node)
28+
- [Run Crazyflie 2.1 Node](#run-crazyflie-21-node)
29+
- [Run external ROS 2 nodes](#run-external-ros-2-nodes)
30+
- [Run RVIZ visualizers](#run-rviz-visualizers)
2631

2732
## Setup
2833

29-
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.
3035

3136
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:
3237
- its own relative position as a 3D vector (X, Y and Z) using a *geometry_msg/Point32* message type on */drone/odometry* topic.
3338
- its own attitude as a 3D vector (pitch, roll and yaw) using a *geometry_msg/Point32* message type on */drone/attitude* topic.
3439

3540
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:
3641
- 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.
3843

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:
4045
- *attitude_to_vel.py*
4146
- 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.
4247
- 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:
6570

6671
# Installation
6772

68-
## Install external ROS2 nodes
73+
## Install external ROS 2 nodes
6974

70-
[Install MicroXCRE-DDS](https://micro-xrce-dds.readthedocs.io/en/latest/installation.html). Recommended procedure:
75+
[Install Micro XCRE-DDS](https://micro-xrce-dds.readthedocs.io/en/latest/installation.html). Recommended procedure:
7176

7277
```bash
7378
git clone https://github.com/eProsima/Micro-XRCE-DDS.git
@@ -122,7 +127,7 @@ sudo apt install gcc-arm-embedded dfu-util
122127
Download and build the **Crazyflie 2.1** firmware repository:
123128
```bash
124129
mkdir crazyflie_firmware
125-
git clone https://github.com/eProsima/crazyflie-firmware -b cf_micro-xrce-dds
130+
git clone https://github.com/eProsima/crazyflie-firmware -b cf_micro-xrce-dds
126131
cd crazyflie_firmware
127132
git submodule init
128133
git submodule update
@@ -166,7 +171,7 @@ MODE=\"0664\", GROUP=\"plugdev\" > /etc/udev/rules.d/99-crazyflie.rules
166171

167172
Clone the repo dependencies:
168173
```
169-
git clone -b Micro-XRCE-DDS_Bridge https://github.com/eProsima/crazyflie-clients-python
174+
git clone -b Micro-XRCE-DDS_Bridge https://github.com/eProsima/crazyflie-clients-python
170175
```
171176

172177
## Build and flash Kobuki Turtlebot 2 firmware
@@ -216,7 +221,7 @@ After installation, the following packages should be present in your system:
216221
+-- crazyflie-clients-python
217222
```
218223

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**.
220225

221226
## Run Kobuki Turtlebot 2 Node
222227

@@ -243,15 +248,15 @@ python3 bin/cfclient
243248

244249
This command should open the Crazyflie Client and print a serial device path in the terminal (something like /dev/pts/0).
245250

246-
Run (in another prompt) a **MicroXRCE Agent**:
251+
Run (in another prompt) a **Micro XRCE-DDS Agent**:
247252
```
248253
MicroXRCEAgent serial --dev [serial device]
249254
```
250255

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`
252257

253258

254-
## Run external ROS2 nodes
259+
## Run external ROS 2 nodes
255260

256261
Run commands:
257262
```
148 KB
Loading

0 commit comments

Comments
 (0)