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

  1. If you have not already done so install ROS 2 Humble on your system.

  2. These dependencies are required:

    sudo apt-get install ros-humble-tf-transformations ros-humble-ros2-control
    
  3. Clone the ds-crazyflies (this) repository

    git clone https://github.com/DynamicSwarms/ds-crazyflies.git
    
  4. Before building this repository the submodules need to be initialized

    git submodule update --init --recursive
    
  5. Source your ROS installation

    source /opt/ros/humble/setup.bash
    
  6. Install colcon

    sudo apt install python3-colcon-common-extensions
    
  7. 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:

  1. 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
    
  2. 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
    
  3. Download the crazywebotsworld repository:

    git clone https://github.com/DynamicSwarms/crazywebotsworld.git
    
  4. Build the controllers inside the world:

    1. Open the world found at crazywebotsworld/worlds/crazyflie.wbt.

    2. Right click on the Crazyflie in the scene tree and select Edit Controller.

    3. Press the gear icon in the editor to build the controllers.

    4. Repeat steps 2 and 3 for the Wand.

Next up follow the Getting Started guide.