Skip to content

Commit 8523390

Browse files
author
jfm92
committed
Rework crazyflie demo
1 parent f66d989 commit 8523390

3 files changed

Lines changed: 35 additions & 29 deletions

File tree

67.6 KB
Loading
275 KB
Loading

_docs/tutorials/demos/crazyflie_demo/index.md

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

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:
99
- STM32F405 (Cortex-M4, 168MHz, 192kb SRAM, 1Mb flash)
1010
- Radio and power management by nRF51822 MCU (Up to 1 Km of range)
1111
- BMI088 IMU
1212
- BMP388 barometric sensor
1313
- 100 mAH battery which gives an autonomy of up to 7 minutes.
1414
- Dimensions: 92x92x92 mm
15-
- Takeof weight: 27g
15+
- Takeoff weight: 27g
1616

1717
![](images/crazyflie.jpg)
1818

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.
2020

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.
2222

2323
## Required hardware:
2424

@@ -28,13 +28,14 @@ On the next points we will see the functionalities of this micro-ROS demo and ho
2828
* 1 x [Crazyflie-compatible remote controller](https://www.bitcraze.io/docs/crazyflie-clients-python/master/inputdevices/).
2929

3030
## 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.
3232
(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
3434

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:
3638

37-
- Create work space folder and download the micro-ROS build system:
3839
```bash
3940
# Source ROS2 Dashing
4041
source /opt/ros/$ROS_DISTRO/setup.bash
@@ -54,6 +55,7 @@ colcon build
5455
source install/local_setup.bash
5556
```
5657
- Set the Crazyflie proper configuration:
58+
5759
```bash
5860
# Create specific Crazyflie freertos workspace
5961
ros2 run micro_ros_setup create_firmware_ws.sh freertos crazyflie
@@ -82,12 +84,12 @@ Version extracted from git
8284

8385
### Flash the device
8486

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:
8688
- 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.
9193

9294
Now the device is on DFU mode. Now execute the next command to flash the firmware to the device:
9395

@@ -112,49 +114,53 @@ xhost +
112114
# Execute docker compose to build all the requiered work space
113115
docker-compose up -d
114116
```
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.
116118

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.
120122

121123
Once open it should look like this:
122-
<!-- Add image of RVIZ and Crazyflie without connection-->
123124

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:
125+
RVIZ | Crazyflie Client
126+
:-------------------------:|:-------------------------:
127+
![](images/rviz_no_data.png) | ![](images/cfclient_no_data.png)
128+
129+
130+
Push the reset button of the drone. The drone will perform an internal check status which if goes fine it should do the next:
125131
- Move the propellers producing a "melody".
126132
- Turning on statically two blue and one red light.
127133
- Blinking the yellow LED.
128134

129-
Finally you need to do the next steps:
135+
Finally, you need to do the next steps:
130136
- 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:
134142

135-
The part of the menu that you need to manipulate is highlited on the next image:
136-
![](images/cfc_connect.png)
137143

138144
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:
139145
<!--- Add Image with drone working properly-->
140146

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:
142148
```bash
143149
docker-compose down
144150
```
145151

146152
## Demo functionality
147153

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.
149155

150156
![](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/micro-ROS/micro-ROS_crazyflie_demo/master/assets/diagrams/architecture.puml)
151157

152-
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:
153159

154160
![](images/micro-ROS_crazyflie.png)
155161

156162
## Annex
157163

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.
159165

160166
[Crazyflies flight Controller](https://www.bitcraze.io/documentation/repository/crazyflie-clients-python/master/inputdevices/)

0 commit comments

Comments
 (0)