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
Copy file name to clipboardExpand all lines: _docs/tutorials/demos/crazyflie_demo/index.md
+35-29Lines changed: 35 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,20 @@ redirect_from:
5
5
- /crazyflie_demo/
6
6
---
7
7
8
-
This demo is a proof concept, which aims to demostrate the versatility of the Micro-ROS project to be adapted to an already exciting product, with constrain memory size and respecting the original firmware. On this demostration we're going to work with the [Crazyflie 2.1 Drone](https://www.bitcraze.io/products/crazyflie-2-1/). This is a tiny and open-source drone which has the next characteristics:
8
+
This demo is a proof concept, which aims to demonstrate the versatility of the Micro-ROS project to be adapted to an already exciting product, with constrain memory size and respecting the original firmware. On this demonstration, we're going to work with the [Crazyflie 2.1 Drone](https://www.bitcraze.io/products/crazyflie-2-1/). This is a tiny and open-source drone which has the next characteristics:
- Radio and power management by nRF51822 MCU (Up to 1 Km of range)
11
11
- BMI088 IMU
12
12
- BMP388 barometric sensor
13
13
- 100 mAH battery which gives an autonomy of up to 7 minutes.
14
14
- Dimensions: 92x92x92 mm
15
-
-Takeof weight: 27g
15
+
-Takeoff weight: 27g
16
16
17
17

18
18
19
-
The main challenge of this demo, was been able to fit Micro-ROS inside of the already existing firmware which with all the features active use around the 60% of the MCU RAM memory and X of the flash memory. Thanks to the modular design of micro-ROS and the versatile configuration system, is possible to fit micro-ROS full stack on this tiny device.
19
+
The main challenge of this demo was been able to fit Micro-ROS inside of the already existing firmware which with all the features active use around 60% of the MCU RAM and X of the flash memory. Thanks to the modular design of micro-ROS and the versatile configuration system, it is possible to fit micro-ROS full stack on this tiny device.
20
20
21
-
On the next points we will see the functionalities of this micro-ROS demo and how you can reproduce it.
21
+
On the next points, we will see the functionalities of this micro-ROS demo and how you can reproduce it.
22
22
23
23
## Required hardware:
24
24
@@ -28,13 +28,14 @@ On the next points we will see the functionalities of this micro-ROS demo and ho
28
28
* 1 x [Crazyflie-compatible remote controller](https://www.bitcraze.io/docs/crazyflie-clients-python/master/inputdevices/).
29
29
30
30
## Reproduce the demo
31
-
On the next points, we will see a set of steps that you need to follow to succeed on the demo reproduction.
31
+
On the next points, we will see a set of steps that you need to follow to succeed in the demo reproduction.
32
32
(Note: Is necessary to install previously ROS2 Dashing, you can find instructions here: [ROS2 Dashing](https://index.ros.org/doc/ros2/Installation/Dashing/))
33
-
### Work Space set-up and configuration
33
+
### WorkSpace set-up and configuration
34
34
35
-
To create the work space and set the proper configuration for this demo, you need to execute the next commands:
35
+
To create the workspace and set the proper configuration for this demo, you need to execute the next commands:
36
+
37
+
- Create a workspace folder and download the micro-ROS build system:
36
38
37
-
- Create work space folder and download the micro-ROS build system:
38
39
```bash
39
40
# Source ROS2 Dashing
40
41
source /opt/ros/$ROS_DISTRO/setup.bash
@@ -54,6 +55,7 @@ colcon build
54
55
source install/local_setup.bash
55
56
```
56
57
- Set the Crazyflie proper configuration:
58
+
57
59
```bash
58
60
# Create specific Crazyflie freertos workspace
59
61
ros2 run micro_ros_setup create_firmware_ws.sh freertos crazyflie
@@ -82,12 +84,12 @@ Version extracted from git
82
84
83
85
### Flash the device
84
86
85
-
You need to set the device on DFU mode. To active this mode, you need to do next steps:
87
+
You need to set the device on DFU mode. To activate this mode, you need to do next steps:
86
88
- Disconnect the battery.
87
-
- Push the reset buttom of the drone.
88
-
- At the same time that you're pushing the buttom, connect the micro-USB cable to the PC.
89
-
- Continue pushing the reset buttom, the blue LED should start blinking.
90
-
- Wait on this position until LED blink frequency increase.
89
+
- Push the reset button of the drone.
90
+
- At the same time that you're pushing the button, connect the micro-USB cable to the PC.
91
+
- Continue pushing the reset button, the blue LED should start blinking.
92
+
- Wait on this position until the LED blink frequency increase.
91
93
92
94
Now the device is on DFU mode. Now execute the next command to flash the firmware to the device:
93
95
@@ -112,49 +114,53 @@ xhost +
112
114
# Execute docker compose to build all the requiered work space
113
115
docker-compose up -d
114
116
```
115
-
This last step could take a while the first time that you execute it, but later on executions, it will execute almost inmediatly.
117
+
This last step could take a while the first time that you execute it, but later on executions, it will execute almost immediately.
116
118
117
-
If everything goes fine, it should appear RVIZ and CrazyFlies Client. Each application, has the next utility:
118
-
- RVIZ: Shows an animation of the drone, drawing de flight trayectory on screen. This data are obtained from the ROS2 topic published by the drone.
119
-
- CrazyFlie Client: Shows the telemetry status of the drone, allows us to modify the configuration of the device and works as communication bridge between the CrazyFlie radio protocol and the micro-ROS network.
119
+
If everything goes fine, it should appear RVIZ and CrazyFlies Client. Each application has the next utility:
120
+
- RVIZ: Shows an animation of the drone, drawing de flight trajectory on screen. This data are obtained from the ROS2 topic published by the drone.
121
+
- CrazyFlie Client: Shows the telemetry status of the drone, allows us to modify the configuration of the device and works as a communication bridge between the CrazyFlie radio protocol and the micro-ROS network.
120
122
121
123
Once open it should look like this:
122
-
<!-- Add image of RVIZ and Crazyflie without connection-->
123
124
124
-
Push the reset buttom of the drone. The drone will perform an internal check status which if goes fine it should do the next:
Push the reset button of the drone. The drone will perform an internal check status which if goes fine it should do the next:
125
131
- Move the propellers producing a "melody".
126
132
- Turning on statically two blue and one red light.
127
133
- Blinking the yellow LED.
128
134
129
-
Finally you need to do the next steps:
135
+
Finally, you need to do the next steps:
130
136
- Connect the USB radio dongle.
131
-
- Push the buttom scan on the Crazyflie Client.
132
-
- On the left menu it should appear an interface called ```` select it.
133
-
- Finally Push the buttom connect.
137
+
- Push the button scan on the Crazyflie Client.
138
+
- On the left menu, it should appear an interface called ```` select it.
139
+
- Finally, push the button ``connect``
140
+
141
+
The part of the menu that you need to manipulate is highlighted on the next image:
134
142
135
-
The part of the menu that you need to manipulate is highlited on the next image:
136
-

137
143
138
144
Now everything is ready and the Crazyflie Client should return the telemetry data and the RVIZ should start to show drone trajectory like on the bottom image:
139
145
<!--- Add Image with drone working properly-->
140
146
141
-
Finally, if you want to close this utilities properly, you need to execute the next command:
147
+
Finally, if you want to close these utilities, you need to execute the next command:
142
148
```bash
143
149
docker-compose down
144
150
```
145
151
146
152
## Demo functionality
147
153
148
-
Once everything is ready you can check on the ROS2 network the telemetry of the drone. On the next image, you see the available topics and how interact it with RVIZ.
154
+
Once everything is ready you can check on the ROS2 network the telemetry of the drone. In the next image, you see the available topics and how to interact with RVIZ.
On the other hand, on the next image you can see a simplify diagram of how is performed the communication path between the drone and the ROS2 network:
158
+
On the other hand, on the next image you can see a simplified diagram of how is performed the communication path between the drone and the ROS2 network:
153
159
154
160

155
161
156
162
## Annex
157
163
158
-
Is possible to fly the drone at the same time that micro-ROS is running inside of it. To do so, you need to follow the next guide which explains how to connect a compatible controller to the host PC to fligth it.
164
+
It is possible to fly the drone at the same time that micro-ROS is running inside of it. To do so, you need to follow the next guide which explains how to connect a compatible controller to the host PC to flight it.
0 commit comments