Installation
This project has been developed and tested for ROS2 Humble on following system configurations. It is recommended to also use a similar configuration.
Ubuntu |
ROS |
20.04 |
Humble |
22.04 |
Humble |
Step by Step Instructions
If you have not already done so install ROS 2 Humble on your system.
These dependencies are required:
sudo apt-get install ros-humble-tf-transformations ros-humble-ros2-control
Clone the ds-crazyflies (this) repository
git clone https://github.com/DynamicSwarms/ds-crazyflies.git
Before building this repository the submodules need to be initialized
git submodule update --init --recursive
Source your ROS installation
source /opt/ros/humble/setup.bash
Install colcon
sudo apt install python3-colcon-common-extensions
Build the software stack
sh build.sh
Note
Because of the dependency structure, colcon build
can not be executed directly.
If you only want to build the crazyflies
package, use:
colcon build --packages-select crazyflies
Webots Simulation
If you want to use the Webots simulation you will also need to:
Install the Webots Simulator (Webots 2023b is required)
Either
from: https://cyberbotics.com/ select Older Versions and download Webots 2023b.
or
wget -q https://github.com/cyberbotics/webots/releases/download/R2023b/webots-R2023b-x86-64.tar.bz2 tar -xjf webots-R2023b-x86-64.tar.bz2 mv webots /usr/local/webots ln -s /usr/local/webots/webots /usr/local/bin/webots rm webots-R2023b-x86-64.tar.bz2
Also the ros-humble-webots-ros2 package needs to be installed:
Build the webots_ros2 package from source into a directory of your choice. When building (sh build.sh) this package then also needs to be sourced.
git clone -b 2023.1.2 --recurse-submodules https://github.com/cyberbotics/webots_ros2.git source /opt/ros/humble/setup.bash colcon build
Note
The apt package is currently broken (doesn’t check for version). In the future the following might suffice:
sudo apt-get install ros-humble-webots-ros2
Download the crazywebotsworld repository:
git clone https://github.com/DynamicSwarms/crazywebotsworld.git
Build the controllers inside the world:
Open the world found at
crazywebotsworld/worlds/crazyflie.wbt
.Right click on the Crazyflie in the scene tree and select
Edit Controller
.Press the gear icon in the editor to build the controllers.
Repeat steps 2 and 3 for the Wand.
Next up follow the Getting Started guide.