[ ![Logo](../../../../_static/logo_ros-controls.png) ](../../../../index.html)
  * [ Getting Started ](../../../getting_started/getting_started.html)
  * [ ros2_control ](../../../ros2_control/doc/index.html)
  * [ ros2_controllers ](../../doc/controllers_index.html)
    * [ Guidelines and Best Practices ](../../doc/controllers_index.html#guidelines-and-best-practices)
    * [ Controllers for Mobile Robots ](../../doc/controllers_index.html#controllers-for-mobile-robots)
    * [ Controllers for Manipulators and Other Robots ](../../doc/controllers_index.html#controllers-for-manipulators-and-other-robots)
      * [ Admittance Controller ](../../admittance_controller/doc/userdoc.html)
      * [ Effort Controllers ](../../effort_controllers/doc/userdoc.html)
      * [ Forward Command Controller ](../../forward_command_controller/doc/userdoc.html)
      * [ Gripper Controller ](../../gripper_controllers/doc/userdoc.html)
      * [ Joint Trajectory Controller ](../../joint_trajectory_controller/doc/userdoc.html)
      * [ PID Controller ](../../pid_controller/doc/userdoc.html)
      * Position Controllers
        * position_controllers/JointGroupPositionController
          * ROS 2 interface of the controller
            * Topics
            * Parameters
      * [ Velocity Controllers ](../../velocity_controllers/doc/userdoc.html)
    * [ Broadcasters ](../../doc/controllers_index.html#broadcasters)
    * [ Common Controller Parameters ](../../doc/controllers_index.html#common-controller-parameters)
  * [ Demos ](../../../ros2_control_demos/doc/index.html)
  * [ Command Line Interface ](../../../ros2_control/ros2controlcli/doc/userdoc.html)
  * [ Simulator Integrations ](../../../simulators/simulators.html)
  * [ Migration Guides ](../../../migration/migration.html)
  * [ API Documentation ](../../../api/api.html)
  * [ Supported Robots ](../../../supported_robots/supported_robots.html)
  * [ Resources ](../../../resources/resources.html)
  * [ Contributing ](../../../contributing/contributing.html)
  * [ Project Ideas for GSoC 2024 ](../../../project_ideas.html)
  * [ Acknowledgements ](../../../acknowledgements/acknowledgements.html)
__ [ ROS2_Control: Rolling ](../../../../index.html)
  * [ ](../../../../index.html)
  * [ ros2_controllers ](../../doc/controllers_index.html)
  * position_controllers
  * [ Edit on GitHub ](https://github.com/ros-controls/ros2_controllers/blob/master/position_controllers/doc/userdoc.rst)
* * *
**You're reading the documentation for a development version. For the latest
released version, please have a look at[ Iron
](../../../../../iron/doc/ros2_controllers/position_controllers/doc/userdoc.html)


Read more  Read less


##  3\. ROS1 Point Mutations


ROS1 and ALK share a high overall sequence similarity (>64%), with this value
reaching 84% concerning the ATP binding pocket [  4  ,  5  ,  6  ]. Type I
inhibitors such as crizotinib and lorlatinib have been extensively used in the
treatment of these patients. Type II inhibitors have also been studied,
especially against mutations [  7  ]. As observed for other kinases, the
emergence of kinase point mutations after the use of kinase inhibitors also
occurs for ROS1. The classical gatekeeper (L2026M) and solvent front mutations
(e.g., G2032R) have been characterized and are associated with a diminished
response to type I inhibitors [  5  ,  6  ].


    class Sensor:  ros::NodeHandle{
    private:
      // Timer for the simulated detected object
      ros::Timer object_timer_;
      // Publisher for the simulated detected object
      ros::Publisher pose_pub_;
      // Pose to publish
      geometry_msgs::PoseStamped pose_;
      // Aux variable that determines the detected object’s position
      int count_ = 0;


##  Topics


__ [ ROS2_Control: Rolling ](../../../../index.html)


Lorlatinib effectively inhibits BA/F3 cells harboring the CD74-ROS1  L2026M
fusion kinase [  6  ]. While this mutation decreases crizotinib’s potency,
lorlatinib is efficient in inhibiting the growth of cells expressing CD74-ROS1
L2026M  in a dose-dependent manner [  6  ]. Despite not having an
experimentally determined structure for this mutant, earlier studies
overlapped the native ROS1 kinase domain to the analogous ALK  L1196M  crystal
structure and indicated that the presence of a methionine at position 2026 in
the ROS1 protein would likely be accommodated due to lorlatinib lacking the
piperidine substituent [  6  ].


Journal


[ Submit to this Journal
](https://susy.mdpi.com/user/manuscripts/upload?form%5Bjournal_id%5D%3D28) [
Review for this Journal ](https://susy.mdpi.com/volunteer/journals/review) [
Propose a Special Issue ](/journalproposal/sendproposalspecialissue/crystals)


**You're reading the documentation for a development version. For the latest
released version, please have a look at[ Iron
](../../../../../iron/doc/ros2_control/ros2controlcli/doc/userdoc.html) . **


##  References


[ ![](https://pub.mdpi-res.com/img/design/mdpi-pub-logo-black-
small1.svg?da3a8dcae975a41c?1713167732) ](/)


2 followers


[ Some problem with Connection between Gazebo and moveit
](/question/349686/some-problem-with-connection-between-gazebo-and-moveit/)


**Figure 2.** ( **A** ) Overlap of crizotinib extracted from complexes with
c-Met (yellow), ALK (magenta), and ROS1 (orange). Two-dimensional
representation of first-generation inhibitors, ( **B** ) crizotinib and (
**C** ) lorlatinib, with the following color scheme for the atoms: carbon
(grey), oxygen (red), nitrogen (blue), chlorine (green), and fluorine (cyan).
The interactions were analyzed and plotted using Discovery Studio Visualizer
and Pymol.


[ ![cc-by-sa](/m/default/media/images/cc-by-sa.png?v=28)
](http://creativecommons.org/licenses/by-sa/3.0/legalcode) ROS Answers is
licensed under Creative Commons Attribution 3.0 Content on this site is
licensed under a [ Creative Commons Attribution Share Alike 3.0
](http://creativecommons.org/licenses/by-sa/3.0/legalcode) license.


[ Sign In / Sign Up ](/user/login) [ Submit
](https://susy.mdpi.com/user/manuscripts/upload?journal=crystals)


    $ ros2 control unload_controller -h
    usage: ros2 control unload_controller [-h] [--spin-time SPIN_TIME] [-c CONTROLLER_MANAGER] [--include-hidden-nodes] controller_name

    Unload a controller in a controller manager

    positional arguments:
      controller_name       Name of the controller

    optional arguments:
      -h, --help            show this help message and exit
      --spin-time SPIN_TIME
                            Spin time in seconds to wait for discovery (only applies when not using an already running daemon)
      -c CONTROLLER_MANAGER, --controller-manager CONTROLLER_MANAGER
                            Name of the controller manager ROS node
      --include-hidden-nodes
                            Consider hidden nodes as well


Vilachã JF, Wassenaar TA, Marrink SJ. Structural Aspects of the ROS1 Kinase
Domain and Oncogenic Mutations. _Crystals_ . 2024; 14(2):106.
https://doi.org/10.3390/cryst14020106


    $ ros2 control list_hardware_interfaces -h
    usage: ros2 control list_hardware_interfaces [-h] [--spin-time SPIN_TIME] [-c CONTROLLER_MANAGER] [--include-hidden-nodes]

    Output the list of available command and state interfaces

    optional arguments:
      -h, --help            show this help message and exit
      --spin-time SPIN_TIME
                            Spin time in seconds to wait for discovery (only applies when not using an already running daemon)
      -c CONTROLLER_MANAGER, --controller-manager CONTROLLER_MANAGER
                            Name of the controller manager ROS node
      --include-hidden-nodes
                            Consider hidden nodes as well

    $ ros2 control list_hardware_interfaces
    command interfaces
      joint1/position [unclaimed]
      joint2/position [unclaimed]
    state interfaces
      joint1/position
      joint2/position


March 21, 2023  ·  1 min  read


[ Sciforum ](https://sciforum.net) [ MDPI Books ](https://www.mdpi.com/books)
[ Preprints.org ](https://www.preprints.org) [ Scilit
](https://www.scilit.net) [ SciProfiles
](https://sciprofiles.com?utm_source=mpdi.com&utm_medium=bottom_menu&utm_campaign=initiative)
[ Encyclopedia ](https://encyclopedia.pub) [ JAMS ](https://jams.pub) [
Proceedings Series ](/about/proceedings)


In Development


  * [ Code  ](/USC-ACTLab/crazyswarm)
  * [ Issues  ](/USC-ACTLab/crazyswarm/issues)
  * [ Pull requests  ](/USC-ACTLab/crazyswarm/pulls)
  * [ Discussions  ](/USC-ACTLab/crazyswarm/discussions)
  * [ Actions  ](/USC-ACTLab/crazyswarm/actions)
  * [ Projects  ](/USC-ACTLab/crazyswarm/projects)
  * [ Security  ](/USC-ACTLab/crazyswarm/security)
  * [ Insights  ](/USC-ACTLab/crazyswarm/pulse)


  * [ Code  ](/USC-ACTLab/crazyswarm)
  * [ Issues  20  ](/USC-ACTLab/crazyswarm/issues)
  * [ Pull requests  3  ](/USC-ACTLab/crazyswarm/pulls)
  * [ Discussions  ](/USC-ACTLab/crazyswarm/discussions)
  * [ Actions  ](/USC-ACTLab/crazyswarm/actions)
  * [ Projects  0  ](/USC-ACTLab/crazyswarm/projects)
  * [ Security  ](/USC-ACTLab/crazyswarm/security)
  * [ Insights  ](/USC-ACTLab/crazyswarm/pulse)


{{ message }}


Maybe I'm suggesting something completely crazy in terms of how the frameworks
is put together, but the idea of smaller more manageable packages sound more
appealing then everything in one bunch.

---

Beta  Was this translation helpful?  Give feedback.


  * [ General  ](./viewforum.php?f=1&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Forum rules  ](./viewforum.php?f=22&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Bitcraze  ](./viewforum.php?f=2&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Quadcopters  ](./viewforum.php?f=3&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Technology  ](./viewforum.php?f=12&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Off topic  ](./viewforum.php?f=13&sid=f377be2a5f4c7552af96f63c34721358)
  * [ Crazyflie Nano Quadcopter  ](./viewforum.php?f=4&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ General discussions  ](./viewforum.php?f=11&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Developer Discussions  ](./viewforum.php?f=6&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Support  ](./viewforum.php?f=5&sid=f377be2a5f4c7552af96f63c34721358)
  * [ Crazyradio  ](./viewforum.php?f=7&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ General discussions  ](./viewforum.php?f=10&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Developer discussions  ](./viewforum.php?f=9&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Support  ](./viewforum.php?f=8&sid=f377be2a5f4c7552af96f63c34721358)
  * [ Positioning systems and autonomous flight  ](./viewforum.php?f=15&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Loco Positioning System  ](./viewforum.php?f=16&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Lighthouse positioning system  ](./viewforum.php?f=20&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ External positioning systems  ](./viewforum.php?f=18&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ Autonomous flight  ](./viewforum.php?f=19&sid=f377be2a5f4c7552af96f63c34721358)
  * [ ↳ AI-deck  ](./viewforum.php?f=21&sid=f377be2a5f4c7552af96f63c34721358)


  * [ Changelog ](changelog.html)
    * [ October 4th, 2019 ](changelog.html#october-4th-2019)
    * [ April 22nd, 2018 ](changelog.html#april-22nd-2018)
    * [ March 2nd, 2018 ](changelog.html#march-2nd-2018)
  * [ Getting Started ](gettingstarted.html)
  * [ Installation ](installation.html)
  * [ Overview ](overview.html)
    * [ More Information ](overview.html#more-information)
  * [ Configuration ](configuration.html)
    * [ Set up radio communication ](configuration.html#set-up-radio-communication)
    * [ Update firmware ](configuration.html#update-firmware)
    * [ Adjust configuration files ](configuration.html#adjust-configuration-files)
    * [ Manage fleet with the Chooser ](configuration.html#manage-fleet-with-the-chooser)
    * [ Testing configuration ](configuration.html#testing-configuration)
  * [ Tutorials ](tutorials/tutorials.html)
    * [ Hovering (hello, world) ](tutorials/tutorials.html#hovering-hello-world)
  * [ How-To Guides ](howto/howto.html)
    * [ Crazyswarm Integration with Git ](howto/howto.html#crazyswarm-integration-with-git)
    * [ Creating a new streaming setpoint mode ](howto/howto.html#creating-a-new-streaming-setpoint-mode)
  * [ Python API Reference ](api.html)
    * [ ` Crazyflie  ` class ](api.html#crazyflie-class)
    * [ ` CrazyflieServer  ` class ](api.html#crazyflieserver-class)
    * [ ` TimeHelper  ` class ](api.html#timehelper-class)
    * [ Switching between simulation and real hardware ](api.html#switching-between-simulation-and-real-hardware)
  * [ Crazyswarm Internals ](internals.html)
    * [ Firmware bindings ](internals.html#firmware-bindings)
  * [ Hardware ](hardware.html)
    * [ Components ](hardware.html#components)
    * [ Medium Quadrotor ](hardware.html#medium-quadrotor)
    * [ Large Quadrotor ](hardware.html#large-quadrotor)
  * [ Glossary ](glossary.html)


edited


    * [ Topics ](/topics)
    * [ Trending ](/trending)
    * [ Collections ](/collections)


* [ __ Quote  ](./posting.php?mode=quote&p=15035&sid=f377be2a5f4c7552af96f63c34721358 "Reply with quote")


Quote reply


##  General


Oct 30, 2021  ·  4 comments  ·  11 replies


[ aesreal
](./memberlist.php?mode=viewprofile&u=2459&sid=f377be2a5f4c7552af96f63c34721358)


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2FUSC-
ACTLab%2Fcrazyswarm%2Fdiscussions%2F518)


By Solution


    @inproceedings{crazyswarm,
      author    = {James A. Preiss* and
                   Wolfgang  H\"onig* and
                   Gaurav S. Sukhatme and
                   Nora Ayanian},
      title     = {Crazyswarm: {A} large nano-quadcopter swarm},
      booktitle = {{IEEE} International Conference on Robotics and Automation ({ICRA})},
      pages     = {3299--3304},
      publisher = {{IEEE}},
      year      = {2017},
      url       = {https://doi.org/10.1109/ICRA.2017.7989376},
      doi       = {10.1109/ICRA.2017.7989376},
      note      = {Software available at \url{https://github.com/USC-ACTLab/crazyswarm}},
    }


All reactions


#  {{title}}


[ whoenig
](./memberlist.php?mode=viewprofile&u=1133&sid=f377be2a5f4c7552af96f63c34721358)


[ ![@whoenig](https://avatars.githubusercontent.com/u/3613757?s=60&v=4)
](/whoenig)


Unordered list


of Network Systems, vol. 4, no. 3, pp. 429–438, 2017.
[30] A. Camisa, A. Testa, and G. Notarstefano, “Multi-robot pickup and
delivery via distributed resource allocation,” IEEE Transactions on
Robotics, vol. 39, no. 2, pp. 1106–1118, 2022.


        return 1;
      }

      try
      {
        Crazyflie cf(uri);
        cf.setParam(param, value);

        return 0;
      }
      catch(std::exception& e)
      {
        std::cerr << e.what() << std::endl;
        return 1;
      }
    }


Labels


Something went wrong.


     Expert
     **Posts:** [ 395 ](./search.php?author_id=1133&sr=posts&sid=f377be2a5f4c7552af96f63c34721358)
     **Joined:** Mon Oct 27, 2014 2:55 am


[ ![](https://avatars.githubusercontent.com/u/1606009?s=64&v=4) jpreiss
](/jpreiss) Nov 1, 2021


Comment options


[ __ Post
](./viewtopic.php?p=15026&sid=f377be2a5f4c7552af96f63c34721358#p15026 "Post")
by **[ aesreal
](./memberlist.php?mode=viewprofile&u=2459&sid=f377be2a5f4c7552af96f63c34721358)
** »  Thu Jun 14, 2018 4:49 am


###  [ Setting parameters via terminal [ROS]
](./viewtopic.php?p=15026&sid=f377be2a5f4c7552af96f63c34721358#p15026)


Crazyswarm


Mention


* Open Source


#  Provide feedback


Agreed with the other points! It will be difficult to test with 49, but I
think we could test with 20 and then also check what the CPU utilization looks
like in that case.

---

Beta  Was this translation helpful?  Give feedback.


Science Robotics, vol. 7, no. 66, p. eabm6074, 2022.
[14] L. Puck, P. Keller, T. Schnell, C. Plasberg, A. Tanev, G. Heppner,
A. Roennau, and R. Dillmann, “Distributed and synchronized setup
towards real-time robotic control using ros2 on linux,” in IEEE Intern.
Conf. on Automation Science and Engineering, 2020, pp. 1287–1293.
[15] K. Belsare, A. C. Rodriguez, P. G. Sanchez, J. Hierro, T. Kołcon, ´
R. Lange, I. Lutkebohle, A. Malki, J. M. Losa, F. Melendez ¨ et al.,
“Micro-ros,” in Robot Operating System (ROS) The Complete Reference (Volume 7). Springer, 2023, pp. 3–55.
[16] E. Eros, M. Dahl, K. Bengtsson, A. Hanna, and P. Falkman, “A ˝
ROS2 based communication architecture for control in collaborative
and intelligent automation systems,” Procedia Manufacturing, vol. 38,
pp. 349–357, 2019.
[17] M. Reke, D. Peter, J. Schulte-Tigges, S. Schiffer, A. Ferrein, T. Walter,
and D. Matheis, “A self-driving car architecture in ROS2,” in IEEE
International SAUPEC/RobMech/PRASA Conference, 2020, pp. 1–6.
[18] T. K. Kaiser, M. J. Begemann, T. Plattenteich, L. Schilling, G. Schildbach, and H. Hamann, “Ros2swarm-a ros 2 package for swarm robot
behaviors,” in IEEE ICRA, 2022, pp. 6875–6881.
[19] S. Mai, N. Traichel, and S. Mostaghim, “Driving swarm: A swarm
robotics framework for intelligent navigation in a self-organized
world,” in IEEE Intern. Conf. on Robot. and Autom., 2022, pp. 01–07.
[20] “Crazyswarm2,” https://github.com/IMRCLab/crazyswarm2/.
[21] A. Testa, A. Camisa, and G. Notarstefano, “ChoiRbot: A ROS 2
toolbox for cooperative robotics,” IEEE Robotics and Automation
Letters, vol. 6, no. 2, pp. 2714–2720, 2021.
[22] O. Michel, “Cyberbotics ltd. webots™: professional mobile robot
simulation,” Int. Jour. of Adv. Robotic Sys., vol. 1, no. 1, p. 5, 2004.
[23] F. Farina, A. Camisa, A. Testa, I. Notarnicola, and G. Notarstefano,
“Disropt: a python framework for distributed optimization,” IFACPapersOnLine, vol. 53, no. 2, pp. 2666–2671, 2020.
[24] E. Gamma, R. Helm, R. Johnson, R. E. Johnson, J. Vlissides et al., Design patterns: elements of reusable object-oriented software. Pearson
Deutschland GmbH, 1995.
[25] D. Mellinger and V. Kumar, “Minimum snap trajectory generation and
control for quadrotors,” in IEEE ICRA, 2011, pp. 2520–2525.
[26] T. Lee, M. Leok, and N. H. McClamroch, “Geometric tracking control
of a quadrotor uav on se (3),” in IEEE conference on decision and
control, 2010, pp. 5420–5425.
[27] J.-M. Kai, G. Allibert, M.-D. Hua, and T. Hamel, “Nonlinear feedback control of quadrotors exploiting first-order drag effects,” IFACPapersOnLine, vol. 50, no. 1, pp. 8189–8195, 2017.
[28] J. Forster, “System identification of the crazyflie 2.0 nano quadro- ¨
copter,” B.S. thesis, ETH Zurich, 2015.
[29] S. Zhao and D. Zelazo, “Translational and scaling formation maneuver
control via a bearing-based approach,” IEEE Transactions on Control


Menu


perform experiments on real nano-quadrotors. We provide
several template classes to perform control, planning, and
cooperative decision making. Thanks to these functionalities,
users can easily extend the package by implementing their
own algorithms. Illustrative simulations and experiments
have been provided to assess the potentiality of the toolbox.
REFERENCES
[1] M. Quigley, K. Conley, B. Gerkey, J. Faust, T. Foote, J. Leibs,
R. Wheeler, A. Y. Ng et al., “Ros: an open-source robot operating
system,” in ICRA workshop on open source software, vol. 3, no. 3.2,
2009, p. 5.
[2] Y. Maruyama, S. Kato, and T. Azumi, “Exploring the performance of
ros2,” in 13th Intern. Conf. on Embedded Software, 2016, pp. 1–10.
[3] J. A. Preiss, W. Honig, G. S. Sukhatme, and N. Ayanian, “Crazyswarm:
A large nano-quadcopter swarm,” in IEEE International Conference
on Robotics and Automation (ICRA), 2017, pp. 3299–3304.
[4] W. Honig and N. Ayanian, “Flying multiple uavs using ros,” in ¨ Robot
Operating System (ROS). Springer, 2017, pp. 83–118.
[5] S. Shah, D. Dey, C. Lovett, and A. Kapoor, “Airsim: High-fidelity
visual and physical simulation for autonomous vehicles,” in Field and
service robotics. Springer, 2018, pp. 621–635.
[6] Y. Song, S. Naji, E. Kaufmann, A. Loquercio, and D. Scaramuzza,
“Flightmare: A flexible quadrotor simulator,” arXiv:2009.00563, 2020.
[7] V. Grabe, M. Riedel, H. H. Bulthoff, P. R. Giordano, and A. Franchi, ¨
“The telekyb framework for a modular and extendible ros-based
quadrotor control,” in IEEE ECMR, 2013, pp. 19–25.
[8] J. Meyer, A. Sendobry, S. Kohlbrecher, U. Klingauf, and O. v. Stryk,
“Comprehensive simulation of quadrotor uavs using ros and gazebo,”
in IEEE SIMPAR. Springer, 2012, pp. 400–411.
[9] K. Kumar, S. I. Azid, A. Fagiolini, and M. Cirrincione, “Erlecopter simulation using ros and gazebo,” in IEEE Mediterranean
Electrotechnical Conference, 2020, pp. 259–263.
[10] G. Silano, E. Aucone, and L. Iannelli, “Crazys: a software-in-theloop platform for the crazyflie 2.0 nano-quadcopter,” in IEEE Mediterranean Conference on Control and Automation, 2018, pp. 1–6.
[11] F. Furrer, M. Burri, M. Achtelik, and R. Siegwart, “Rotors—a modular
gazebo mav simulator framework,” in Robot operating system (ROS).
Springer, 2016, pp. 595–625.
[12] M. Nithya and M. Rashmi, “Gazebo-ros-simulink framework for hover
control and trajectory tracking of crazyflie 2.0,” in IEEE Region 10
Conference, 2019, pp. 649–653.
[13] S. Macenski, T. Foote, B. Gerkey, C. Lalancette, and W. Woodall,
“Robot operating system 2: Design, architecture, and uses in the wild,”


Reference


You can’t perform that action at this time.


of the crazyflie ](https://www.bitcraze.io/documentation/repository/crazyflie-
firmware/master/api/logs//) . Moreover, it also contains the firmware_params
field, where parameters can be set at startup. Also see the [ parameter list
of the crazyflie ](https://www.bitcraze.io/documentation/repository/crazyflie-
firmware/master/api/params//) for that.

Mind that you can also place the firmware_params and firmware_logging fields
per crazyflie in ‘robots’ or the ‘robot_types’ field. The server node will
upon initialization, first look at the params/logs from the individual
crazyflie’s settings, then the robot_types, and then anything in ‘all’ which
has lowest priority.


  * [ __ Board index  ](./index.php?sid=f377be2a5f4c7552af96f63c34721358)
  * All times are  UTC
  * [ __ Delete cookies  ](./ucp.php?mode=delete_cookies&sid=f377be2a5f4c7552af96f63c34721358)
  * [ __ Contact us  ](./memberlist.php?mode=contactadmin&sid=f377be2a5f4c7552af96f63c34721358)


We read every piece of feedback, and take your input very seriously.


Free document hosting provided by [ Read the Docs
](http://www.readthedocs.org) .


Heading


to perform point-to-point trajectories and to evaluate polynomial paths passing through multiple, arbitrary points. These
modules allow the user to send (e.g., to the controller node)
position, velocity, and acceleration setpoints constituting a
smooth trajectory at the desired communication rate. These
classes also handle dynamic replanning scenarios where
a new trajectory has to be evaluated while the quadrotor
is already following another path. To interface planning
classes with, e.g. controller classes, CRAZYCHOIR provides
a TrajectoryHandler Strategy class. This class details
the topic on which the desired trajectory will be published.
In this way, ROS 2 nodes dynamically instantiate the proper
ROS 2 publisher and subscribers. The class also specifies the
trajectory message type and a callback function to extract the
trajectory from the message.
B. Distributed Optimization and Control
In CRAZYCHOIR, the user can implement distributed optimization and control schemes in which teams of quadrotors
exchange suitable data in order to solve complex tasks. In
this cooperative setting, each quadrotor communicates with
few, neighboring quadrotors, possibly according to timevarying communication topologies. As a result, the team
of robots leverages the local knowledge of each quadrotor
(coming, e.g. from onboard sensors) and exploits interrobot communications to achieve a global goal. CRAZYCHOIR implements a set of functionalities to deploy distributed optimization and control schemes in which users
can implement distributed algorithms from the perspective
of each robot. Embedding DISROPT [23] functionalities,
users can model different optimization problems in which
each robot knowns only a part of the objective function and
constraints, eventually including non-convex, mixed-integer
sets. An example is provided in Section VIII-B. Inter-robot
communication is then handled using the ROS 2 middleware. To this end, it is compatible with CHOIRBOT [21],
a ROS 2 package for cooperative robotics. More in detail,
it allows users to implement static or time-varying directed
communication networks. This is performed according to
the publisher-subscriber protocol. Exploiting the Quality of
Service feature introduced in ROS 2, the package allows
for the implementation of synchronous and asynchronous
schemes, as well as lossy communications. This set of functionalities is provided by two main classes, CFGuidance
and CFDistributedFeedback, that extend CHOIRBOT
functionalities in order to implement distributed schemes
tailored for Crazyflie swarms. The two classes expose
to users a set of pre-defined methods send, receive,
asynchronous receive, neighbors exchange (to


Include my email address so I can be contacted


where Pg
⋆
ij = I3−g
⋆
ijg
⋆⊤
ij and I3 is the 3×3 identity matrix.
Notice that this input cannot be directly fed to the quadrotors.
In our example, we use the control input u
di
i
as a desired
acceleration profile for the i-th Crazyflie. This profile is then
tracked using a flatness-based controller (cf. Section III).
B. Software Implementation
To implement the distributed bearing-based formation control scheme, we need three classes. The first one implements
the distributed control law in (4). This is done in a specific
method as follows
u = np.zeros(3)
if not self.is_leader:
for j, neigh_pose in neigh_data.items():
err_pos = self.current.position -
neigh_pose.position
err_vel = self.current_pose.velocity -
neigh_pose.velocity
u += - P_i[j] @ (self.kp * err_pos +
self.kv * err_vel)
The rest of the CRAZYCHOIR ecosystem will handle ROS 2
communication among nodes so that the user solely has
to implement the desired control law. The second required
class needs to track the acceleration profile generated by
the distributed control scheme. This is developed according
to Section III. For this example, we need a control law
tracking the acceleration profile generated by the guidance
class. Then, we generate an angular velocity input according
to a geometric control law. To this end, we have to specify
that the controller sends the Crazyflie angular rates and thrust
as control inputs. This can be implemented as follows
position_ctrl = FlatnessAccelerationCtrl()
attitude_ctrl = GeometryAttitudeCtrl()


[ Privacy  ](./ucp.php?mode=privacy&sid=f377be2a5f4c7552af96f63c34721358
"Privacy") | [ Terms
](./ucp.php?mode=terms&sid=f377be2a5f4c7552af96f63c34721358 "Terms")


##  Contents  Â¶


__ Crazyswarm


Comment options


Search


Thoughts/ideas welcome!

---

Beta  Was this translation helpful?  Give feedback.


Something went wrong.


    * [ Actions  Automate any workflow  ](/features/actions)
    * [ Packages  Host and manage packages  ](/features/packages)
    * [ Security  Find and fix vulnerabilities  ](/features/security)
    * [ Codespaces  Instant dev environments  ](/features/codespaces)
    * [ Copilot  Write better code with AI  ](/features/copilot)
    * [ Code review  Manage code changes  ](/features/code-review)
    * [ Issues  Plan and track work  ](/features/issues)
    * [ Discussions  Collaborate outside of code  ](/features/discussions)


Quote reply


* 👍  1


[ __ Post
](./viewtopic.php?p=15030&sid=f377be2a5f4c7552af96f63c34721358#p15030 "Post")
by **[ whoenig
](./memberlist.php?mode=viewprofile&u=1133&sid=f377be2a5f4c7552af96f63c34721358)
** »  Thu Jun 14, 2018 4:32 pm


The Bitcraze web forum


> > The repo should be re-organized to be a proper ROS package (or stack),
> i.e., it should not contain a workspace. This will allow easier
> interoperability with other ROS packages. This will also allow us to use the
> regular CI/CD tools.


1  You must be logged in to vote


[ knmcguire ](/knmcguire) Nov 2, 2021


#  {{title}}


communication bridge with the Crazyflie. Section VI shows
how to simulate swarms of Crazyflies in Webots and RVIZ.
In Section VII, we provide a use-case implementation, while
other experiments are discussed in Section VIII.
II. ARCHITECTURE DESCRIPTION
CRAZYCHOIR is written in Python and is based on the
novel ROS 2 framework. In CRAZYCHOIR, each Crazyflie
is handled by a set of ROS 2 processes (also called nodes).
These nodes handle simulation, control, planning and radio
communication for each quadrotor, as well as inter-robot
communication and cooperation. In the proposed package,
these functionalities are implemented in a modular fashion
as a set of Python classes. At runtime, these classes are instantiated in a dedicated ROS 2 node as a standalone process.
An illustrative representation of the software architecture
is in Figure 2. The software architecture of CRAZYCHOIR
is made of five main blocks: i) control layer, ii) swarm
planning layer, iii) cooperative decision making layer, iv)
radio communication layer, v) realistic simulation layer. We
now briefly introduce the main components of the proposed
architecture. A detailed description is provided in the following sections. The control layer provides a set of classes that
can be extended to implement off-board feedback-control
schemes. These control classes receive reference trajectories
from the planning module, in which users can also provide
graphical inputs to describe complex trajectories. The trajectory planning functionalities are used to generate feasible
trajectories, steering the generic quadrotor to fulfill highlevel decisions. These decisions are taken in another module provided by CRAZYCHOIR, in which users can implement cooperative, decision-making and distributed feedback
schemes on swarms of Crazyflies. This cooperative decision
making layer indeed provides functionalities to implement
distributed, online optimization and control schemes. Leveraging this cooperative framework, robots can jointly fulfill
complex tasks by exchanging messages with neighboring
robots. The control inputs generated by the control classes,
or the setpoints provided by the planning module, can
either be sent to the Crazyflie via radio, or transmitted via
ROS 2 topics to the simulators provided in CRAZYCHOIR.
In particular, users can choose between realistic simulations,
developed in Webots, and lightweight numerical integrations,
visualized in RVIZ. Finally, CRAZYCHOIR can be interfaced
with motion capture systems as, e.g., Vicon so that users
can retrieve quadrotor poses during the experiments. The
proposed package implements derivative and low-pass filters
to obtain linear and angular velocities for each robot. Indeed,


[ ![@knmcguire](https://avatars.githubusercontent.com/u/11061260?s=60&v=4)
](/knmcguire)


All reactions


  1. The overall architecture of having a single crazyswarm_server should remain.
  2. It should still be possible to simulate scripts without ROS.
  3. The repo should be re-organized to be a proper ROS package (or stack), i.e., it should not contain a workspace. This will allow easier interoperability with other ROS packages. This will also allow us to use the regular CI/CD tools.
  4. With the nativelink backend, we should re-think the threading model (currently: 1 thread per channel/radio). The new backend will do the load balancing over radios for us. The crazyswarm_server could either use no threads, or use a threadpool with uniform distribution of Crazyflies, regardless of the channel. The latter seems to only have an advantage for the ICP-based tracking.


I don't have strong feelings about this. Is there any downside to making this
change?


yeah true, but that still requires code that needs to be maintained at two
places which is usually is asking for problems.... Let's see if this is an
option or not, as it would be good not to compromise quality for the sake of
maintainability


* [ Module Index  ](py-modindex.html)


     Beginner
     **Posts:** [ 22 ](./search.php?author_id=2459&sr=posts&sid=f377be2a5f4c7552af96f63c34721358)
     **Joined:** Thu Mar 08, 2018 6:34 am


This discussion was converted from issue #517 on November 01, 2021 15:53.


Comment options


#  Teleoperation controller  

We currently assume an XBox controller (the button mapping can be changed in
teleop.yaml). It is possible to fly in different modes, including attitude-
control and position-control (in which case any localization system can
assist.)

    ros2 launch crazyflie launch.py


Something went wrong.


  1. It should be possible to add/remove Crazyflies dynamically (like it was possible with crazyflie_ros). This is important as we move from centralized control to distributed swarm management. Thus, it should also be possible to use chooser (or a similar tool), while the server is running.
  2. Avoid exceptions for failures that occur with just a few Crazyflies. Use ROS errors instead.
  3. We should not restrict ourselves to fixed URIs anymore - it should be possible to change the datarate and other parts of the address.
  4. Updating params should not require an additional service call. Changed params via broadcasts should be properly reflected on the param server.


* [ __ Quote  ](./posting.php?mode=quote&p=15026&sid=f377be2a5f4c7552af96f63c34721358 "Reply with quote")


Off the top of my head, the only thing I might want to break in the Python API
is the collision avoidance (see [ #481 ](https://github.com/USC-
ACTLab/crazyswarm/discussions/481) ).


Resources


##  Use saved searches to filter your results more quickly


[ whoenig ](/whoenig) Nov 3, 2021


  * [ Oldest  ](/USC-ACTLab/crazyswarm/discussions/518?sort=old)
  * [ Newest  ](/USC-ACTLab/crazyswarm/discussions/518?sort=new)
  * [ Top  ](/USC-ACTLab/crazyswarm/discussions/518?sort=top)


Return to top


__ __


Display:  All posts  1 day  7 days  2 weeks  1 month  3 months  6 months  1
year  Sort by:  Author  Post time  Subject  Direction:  Ascending  Descending


CRAZYCHOIR includes a set of functionalities, in the form
of plugins, to interact with Webots. These plugins receive
inputs from the higher-level classes (e.g., control inputs or
waypoints coordinates) and map them to motor commands.
The command mapping is evaluated using Python bindings
of the Crazyflie firmware functions provided by Bitcraze.
This allows the designer to have realistic feedbacks on the
quadrotor behavior. Also, the designer could use this feature
to test new firmware functions, e.g., embed control algorithm
directly onboard. To properly simulate a robot in the Webots
environment, also called World, the designer has to specify
(i) the geometry of the robot, (ii) external features that
enrich the model (e.g. sensors, cameras, and actuators) and
(iii) plugins to control the actuators. The first requirement
is achieved by importing a .stl file (STereo Lithography
interface format). External features can be endowed by filling
up a .urdf file (Unified Robot Description Format). Finally,
to satisfy the third requirement, CRAZYCHOIR provides a
class of plugins to control the Crazyflie actuators. Hence,
to endow our package with an exhaustive set of Webots
plugins, we developed a parent class named MotorCtrl.
At the beginning, the class sets out the whole Crazyflie
physical equipments, making available GPS measurements
and IMU detections. Moreover, the class initializes ROS 2
publishers and subscribers in order to interface Webots with
CRAZYCHOIR planners and controllers. The main class of
plugins MotorCtrl is extended by two subclasses. The first
subclass, MotorCtrlFPQR, takes as input references the
desired thrust and angular rates. The computation of these
quantities is explained in Section III. The mapping to motor
torques is then performed using firmware Python bindings,
thus using the same model implemented on the Crazyflie.
The second subclass, MotorCtrlXYZ, leverages the functionalities of the trajectory planner coded in the firmware.
Indeed, it receives desired position and yaw setpoints that are
forwarded to the planner methods to evaluate a trajectory. As
a result, the trajectory is elaborated by firmware bindings and
motor commands are provided to the simulated Crazyflie.
B. Lightweight Simulations via Numerical Integration
To allow users to perform simulations without additional,
external software, we provide a dynamics simulator for the


[ knmcguire ](/knmcguire) Nov 3, 2021


Quote reply


If you work in a shared network (lab, classroom) or similar, you might want to
avoid controlling other robots. This is in particular true for simulation. In
this case, you can use

    export ROS_LOCALHOST_ONLY=1
    export ROS_DOMAIN_ID=<unique number between 0 and 101>

The first environment variable restricts ROS to your local machine. The second
is useful if you have multiple user accounts on the same machine (e.g., a
shared workstation computer). In such case, each user should use a unique [
domain ID ](https://docs.ros.org/en/iron/Concepts/Intermediate/About-Domain-
ID.html) .


* [ GitHub Sponsors  Fund open source developers  ](/sponsors)


#  {{title}}


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2FUSC-
ACTLab%2Fcrazyswarm%2Fdiscussions%2F518)


[ ](./index.php?sid=f377be2a5f4c7552af96f63c34721358 "Board index")


👍  1


[ ](https://github.com/)


😄  1


[ ![@whoenig](https://avatars.githubusercontent.com/u/3613757?s=60&v=4)
](/whoenig)


All reactions


Something went wrong.


t = 0 t = 1 t = 2 t = 3
Fig. 9. Snapshots from an experiment at different time instants. Leaders
are circled in red, followers in blue.
we provide an experiment in which leaders track a handwritten trajectory, leveraging the tools provided by the GUI
(see Section IV-A). More precisely, we draw a circle with
a radius of 0.4m, and we execute this trajectory for 40s.
To realize this scenario, we changed only a few settings in
the leader control node. We modified the control strategy
to FlatnessPositionCtrl(), which also processes
position and velocity references, and the trajectory handler to
FullStateTraj(). In addition, it is necessary to launch
a planner node for the leaders, with the goal of evaluating the
splines retrieved by the drawing done in the GUI. A video
is available as supplementary material2
.
VIII. CRAZYCHOIR EXPERIMENTS ON TRAJECTORY
TRACKING AND PICKUP AND DELIVERY
We now provide two additional experiments. First, a
quadrotor tracks a hand-written trajectory. Then, a swarm
of Crazyflies executes a pickup-and-delivery task. All the
needed nodes are executed on a workstation (Intel i9, Nvidia
RTX 4000, Ubuntu 20.04, ROS 2 Foxy) equipped with
multiple radio transmitters, each handling two quadrotors.
Moreover, a second workstation (Intel Xeon, Windows 7)
handles the Vicon Tracker software.
A. Tracking of a hand-written trajectory
We provide experimental results for a Crazyflie tracking
a hand-drawn trajectory. The path has been implemented
using he graphical interface introduced in Section IV-A, see
also Figure 4. The chosen trajectory, i.e., the name of our
laboratory “Casy”, is interpolated by a set of Python methods
provided by the proposed planning module. This trajectory is
tracked by an off-board controller that elaborates the desired
references and, leveraging the RadioFPQR class, forwards
the thrust and angular-rates commands to the Crazyflie. Figure 10 shows a long-exposure snapshot from the experiment.
A video is available as supplementary material to the paper3
.
B. Multi-Robot Pickup and Delivery
By exploiting the distributed optimization features detailed
in Section IV-B, we choose an experimental set-up that deals


👍  1  reacted with thumbs up emoji  👎  1  reacted with thumbs down emoji  😄  1
reacted with laugh emoji  🎉  1  reacted with hooray emoji  😕  1  reacted with
confused emoji  ❤  1  reacted with heart emoji  🚀  1  reacted with rocket
emoji  👀  1  reacted with eyes emoji


[ whoenig ](/whoenig) Nov 3, 2021


Link


The fork is now available at [ https://github.com/IMRCLab/crazyswarm2
](https://github.com/IMRCLab/crazyswarm2) . The readme describes the current
status (and I'll try to update it there, as it progresses). [ @knmcguire
](https://github.com/knmcguire) : This should suffice for you to test on
Windows. I expect this to be bumpy:-/ I wasn't able to enable windows CI, due
to [ dirk-thomas/vcstool#205 ](https://github.com/dirk-
thomas/vcstool/issues/205) not being picked up in ros-tooling.

---

Beta  Was this translation helpful?  Give feedback.


Quote reply


The Crazyswarm architecture, including some motivation for the design
decisions, is described in [ our paper ](http://usc-
actlab.github.io/publications/Preiss_ICRA2017.pdf) [pdf].


     Beginner
     **Posts:** [ 22 ](./search.php?author_id=2459&sr=posts&sid=f377be2a5f4c7552af96f63c34721358)
     **Joined:** Thu Mar 08, 2018 6:34 am


* [ Index  ](genindex.html)


3 posts • Page **1** of **1**


On Read the Docs


Built with [ Sphinx ](http://sphinx-doc.org/) using a [ theme
](https://github.com/rtfd/sphinx_rtd_theme) provided by [ Read the Docs
](https://readthedocs.org) .


  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information


#  ROS2 port  #518


CrazyChoir: Flying Swarms of Crazyflie Quadrotors in ROS 2
Lorenzo Pichierri, Andrea Testa, Giuseppe Notarstefano
©2023 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all
other uses, in any current or future media, including reprinting/republishing this material for advertising or
promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse
of any copyrighted component of this work in other works.
Abstract— This paper introduces CRAZYCHOIR, a modular
Python framework based on the Robot Operating System (ROS)
2. The toolbox provides a comprehensive set of functionalities to
simulate and run experiments on teams of cooperating Crazyflie
nano-quadrotors. Specifically, it allows users to perform realistic simulations over robotic simulators as, e.g., Webots
and includes bindings of the firmware control and planning
functions. The toolbox also provides libraries to perform radio
communication with Crazyflie directly inside ROS 2 scripts.
The package can be thus used to design, implement and
test planning strategies and control schemes for a Crazyflie
nano-quadrotor. Moreover, the modular structure of CRAZYCHOIR allows users to easily implement online distributed
optimization and control schemes over multiple quadrotors.
The CRAZYCHOIR package is validated via simulations and
experiments on a swarm of Crazyflies for formation control,
pickup-and-delivery vehicle routing and trajectory tracking
tasks. CRAZYCHOIR is available at https://github.com/
OPT4SMART/crazychoir.
Index Terms— Distributed Robot Systems; Software Architecture for Robotics and Automation; Cooperating Robots;
Optimization and Optimal Control
I. INTRODUCTION
UAV swarms have gained a great interest in both research
and industrial applications due to their applicability in a wide
range of scenarios. In the last years the Crazyflie platform
(Figure 1) has gained a lot of attention among researchers.
Crazyflie is a cheap nano-quadrotor weighting 27 g. It is
endowed with an ARM Cortex-M4 microcontroller and can
receive radio messages through a so-called Crazyradio dongle. In the last years, several efforts have been put into the
development of simulation and control toolboxes based on
the Robot Operating System (ROS) [1]. Recently, ROS is
being substituted by ROS 2, which is expanding its capabilities with novel functionalities [2]. In this paper, we introduce
CRAZYCHOIR, a ROS 2 package allowing researchers to run
realistic simulations and laboratory experiments on a swarm
of cooperating Crazyflie nano-quadrotors.
This work was supported in part by the Italian Ministry of Foreign Affairs


Maintainer  Author


Discussion options


#  {{title}}


##  General


[ __ Post
](./viewtopic.php?p=15035&sid=f377be2a5f4c7552af96f63c34721358#p15035 "Post")
by **[ aesreal
](./memberlist.php?mode=viewprofile&u=2459&sid=f377be2a5f4c7552af96f63c34721358)
** »  Fri Jun 15, 2018 6:22 am


  * [ Notifications ](/login?return_to=%2FUSC-ACTLab%2Fcrazyswarm)
  * [ Fork  308  ](/login?return_to=%2FUSC-ACTLab%2Fcrazyswarm)
  * [ Star  299  ](/login?return_to=%2FUSC-ACTLab%2Fcrazyswarm)


Great! Still installing it in on windows as we speak... the QT install took
forever and installing ignition fortress took a big chunk of my time.


Ah wait, my last suggestion to split it up goes completely to your first
architecture requirement [ @whoenig ](https://github.com/whoenig) . let's
discuss it next time we meet

---

Beta  Was this translation helpful?  Give feedback.


[ ![](https://avatars.githubusercontent.com/u/3613757?s=64&v=4) whoenig
](/whoenig) Oct 30, 2021


__ __


Cancel  Submit feedback


Bold


Fully agree for both.


** This forum is read-only, please start new threads on the  [ Bitcraze
discussions page ](https://discussions.bitcraze.io) instead **


None yet


Comment options


Versions


Something went wrong.


Task list


#  {{title}}


Read the Docs  v: latest


[ knmcguire ](/knmcguire) Nov 2, 2021


[ __ Return to “Developer discussions”
](./viewforum.php?f=9&sid=f377be2a5f4c7552af96f63c34721358)


* **Motion capture integration.** Crazyswarm contains drivers for common motion capture systems. The Bitcraze API can _send_ position measurements to the Crazyflie, but does not know how to _get_ position measurements from mocap hardware.


###  [ Re: Setting parameters via terminal [ROS]
](./viewtopic.php?p=15035&sid=f377be2a5f4c7552af96f63c34721358#p15035)


© Copyright 2018-2021, Wolfgang Hoenig, James A. Preiss, and contributors.
Revision ` beb05492 ` .


2  You must be logged in to vote


[ knmcguire ](/knmcguire) Nov 3, 2021


Cancel  Create saved search


* __ Quick links


[ ![](https://avatars.githubusercontent.com/u/1606009?s=64&v=4) jpreiss
](/jpreiss) Nov 1, 2021


latest


[ Post Reply  __
](./posting.php?mode=reply&t=3034&sid=f377be2a5f4c7552af96f63c34721358 "Post a
reply")


Comment options


for swarm robotics on ground mobile robots. Moreover,
these works neglect cooperation among robots or simulate
it via (computationally demanding) all-to-all communication. None of these frameworks is however tailored for the
Crazyflie. Recently, Crazyswarm2 [20] has been proposed
as a ROS 2 extension to Crazyswarm [3]. Still, this package
does not include routines to implement distributed optimization and control schemes on cooperating Crazyflies. Finally,
the toolbox in [21] provides distributed optimization and
communication functionalities for teams of generic robots.
This package however does not handle Crazyflie swarms and
radio communication with the quadrotors. Moreover, as we
detail next, our package provides simulations by combining
the Webots engine [22] and Crazyflie firmware bindings.
B. Contributions
In this paper we introduce CRAZYCHOIR, a ROS 2
modular framework to perform realistic simulations and
experiments on swarms of cooperating Crazyflie nanoquadrotors. The toolbox provides a comprehensive set of
Python modules allowing for fast prototyping of (distributed)
decision-making and control schemes on Crazyflie swarms.
Specifically, CRAZYCHOIR is a scalable package in which
each Crazyflie is handled by a set of independent ROS 2
processes, thus reducing single points of failure. These nodes
are executed on a ROS-enabled workstation and can be
allocated among multiple workstations connected on the
same networks. Also, its modular structure allows the user to
easily switch from simulative scenarios to real experiments
by changing a few lines of code. The toolbox is integrated
with the Webots engine, so that users can perform realistic
simulations of multiple Crazyflie. To the best of the authors’
knowledge, realistic, CAD-based simulation of large-scale
swarms is often neglected. Moreover, the simulator incorporates the firmware bindings provided by Bitcraze implementing Crazyflie onboard control functions. Thereby, the user
can perform parameter tuning in a safe simulation environment. The proposed framework also allows for lightweight
simulations by means of an ad-hoc numerical integrator
combined with the RVIZ visualizer. Finally, CRAZYCHOIR
supports DISROPT [23] and CHOIRBOT [21] toolboxes,
thus allowing users to implement distributed optimization
schemes and handle inter-robot communications over ROS 2
according to a user-defined graph. The paper unfolds as
follows. In Section II, we detail the architecture of CRAZYCHOIR. Section III details libraries for control schemes.
Section IV discusses swarm decision making strategies, distributed control and distributed optimization functionalities
of the proposed package. In Section V, we discuss the


I prefer it on [ https://github.com/IMRCLab ](https://github.com/IMRCLab) \-
this is essentially advertisement for my lab as well as an indication for my
funding agency that I am disseminating the results as promised in the
proposal.

---

Beta  Was this translation helpful?  Give feedback.


All reactions


Warning


> I don't have strong feelings about this. Is there any downside to making
> this change?


#  crazyflies.yaml  

Each crazyflie should have an unique URI which can [ be changed in Bitcraze’s
CFclient ](https://www.bitcraze.io/documentation/repository/crazyflie-clients-
python/master/userguides/userguide_client/#firmware-configuration/) . They can
also be enabled in case you don’t want the server to connect with it.

    robots:
        cf231:
            enabled: true
            uri: radio://0/80/2M/E7E7E7E7E7
            initial_position: [0, 0, 0]
            type: cf21  # see robot_types

        cf5:
            enabled: false
            uri: radio://0/80/2M/E7E7E7E705
            initial_position: [0, -0.5, 0]
            type: cf21  # see robot_types

The yaml file also contains different robot_types, to indicate differences
between each platform:

    robot_types:
        cf21:
            motion_capture:
                enabled: true
                # only if enabled; see motion_capture.yaml
                marker: default_single_marker
                dynamics: default
            big_quad: false
            battery:
                voltage_warning: 3.8  # V
                voltage_critical: 3.7 # V


with a distributed optimization problem.
2The video is also available at https://youtu.be/mJ1HOquR-vE
3The video is also available at https://youtu.be/wX2r55WdZ9g
Fig. 10. Long-term exposure snapshot from an experiment in which a
quadrotor draws a hand-drawn trajectory.
1) Problem Set-up: We employ CRAZYCHOIR to perform
experiments for a cooperative pickup-and-delivery scenario
involving N = 6 Crazyflie. In this setting, quadrotors have
to pickup goods at given locations and delivery them in
other locations. As a further constraint, each quadrotor has
a certain load capability and can pick-up only some goods.
The goal is to minimize the overall travel distance, while
guaranteeing that all the goods are successfully delivered.
This problem can be formulated as a large-scale mixedinteger linear program, i.e. an optimization problem with a
large number of both binary and continuous variables. We
refer the reader to [30] for a description of the problem.
2) Software Implementation: Similarly to Section VII,
we exploit the modularity features of CRAZYCHOIR to
implement the considered scenario on a real swarm of
Crazyflies. Firstly, we take advantage of the CFGuidance
class, creating a child subclass named PDVRPGuidance
which computes the optimal pickup-and-delivery locations
for each quadrotor. In this subclass, we exploit the functionalities of DISROPT [23] to model and solve the distributed
optimization problem. As opposed to the simulative example
provided in Section VII, in this experiment, we exploit the
onboard controller, by sending position references to each
Crazyflie. Thanks to the RadioHandlerXYZ class, the
position references given by the solution of the pickup-anddelivery problem are forwarded to the onboard controller
of the Crazyflie, which is in charge to generate and track
the desired trajectory. A snapshot from an experiment is in
Figure 11. A video is available as supplementary material3
.
Fig. 11. The left snapshot illustrates the Crazyflies reaching the delivery
locations, while the right scheme shows the pickup points (blue arrows) and
the delivery points (orange arrows). Dashed lines represent optimal paths.
IX. CONCLUSIONS
In this paper, we introduced CRAZYCHOIR, a ROS 2
toolbox specifically tailored for swarms of Crazyflie nanoquadrotors. The package allows the user to perform realistic
simulations of Crazyflie swarms using Webots and firmware
bindings. Also, the toolbox interfaces with radio dongles to


Search or jump to...


{{actor}} deleted this content  .


Quote reply


motion capture systems usually provide only position and
attitude data. Thanks to this modular design, users can
combine classes from the different layers according to their
needs. As we detail in the following, this allows for switching
from simulations to experiments with few lines of code.
Users can quickly extend the proposed modules with novel
functionalities and, thanks to the ROS 2 capabilities, can also
deploy the software on different workstations.
III. CRAZYCHOIR CONTROL LIBRARY
CRAZYCHOIR provides a CrazyflieController
template class that can be specialized to implement
the desired control schemes for the Crazyflie. This
class aims at mapping desired trajectory inputs to a
control setpoint to be sent to the Crazyflie or to the
simulators. The CrazyflieController class is
designed according to the Strategy pattern [24] so that the
specific control law can be defined at runtime. Specifically,
the class owns as attributes a set of classes specifying
its behavior. That is, it owns TrajectoryHandler
and CommunicationHandler classes specifying how
desired trajectories will be published to the controller
and which control input must be communicated to the
Crazyflie. In the proposed package, we already provide
a HierarchicalController class that implements
classical flatness-based control schemes [25]. This class
is suitable to track a desired flat-output trajectory (e.g.,
position and yaw profiles with their derivatives), or it
can be used to track desired acceleration profiles coming
from, e.g., double-integrator distributed control laws. We
provide an example of this setting in Section VII, in
which we use this class to perform a distributed formation
control task. HierarchicalController extends
the CrazyflieController template. To this end,
it owns two additional classes PositionControl
and AttitudeControl, implementing position
and angular control, respectively. The outputs of the
PositionControl class are the thrust and desired
attitude profile. The AttitudeControl classes instead
generate an angular velocity profile given desired attitude
references. As an example, we implement the geometric


* [ Pricing ](/pricing)


Repositories


#  Search code, repositories, users, issues, pull requests...


  Swarm Management  

The launch file will also start a swarm management tool that is a ROS node and
web-based GUI. In the upper pane is the location of the drone visualized in a
3D window, similar to rviz. In the lower pane, the status as well as log
messages are visible (tabbed per drone). In the future, we are planning to add
support for rebooting and other actions.

[ Previous ](overview.html "Overview") [ Next  ](tutorials.html "ROS 2
Tutorials")

* * *

© Copyright 2021-2024, Wolfgang Hönig (TU Berlin), Kimberly McGuire (Bitcraze
AB), and contributors.

Built with [ Sphinx ](https://www.sphinx-doc.org/) using a [ theme
](https://github.com/readthedocs/sphinx_rtd_theme) provided by [ Read the Docs
](https://readthedocs.org) .


How much would rely on completing the native link aka crazyflie-link-cpp for
the ROS2 port? [ https://github.com/bitcraze/crazyflie-link-cpp
](https://github.com/bitcraze/crazyflie-link-cpp) . There were still some
issues with this I've heard?

---

Beta  Was this translation helpful?  Give feedback.


##  Indices and tables  Â¶


#  Saved searches


>   4. With the nativelink backend, we should re-think the threading model
> (currently: 1 thread per channel/radio). The new backend will do the load
> balancing over radios for us. The crazyswarm_server could either use no
> threads, or use a threadpool with uniform distribution of Crazyflies,
> regardless of the channel. The latter seems to only have an advantage for
> the ICP-based tracking.
>


Maintainer


> Should we have ROS1 and ROS2 development side-by-side, or focus from a
> certain point on ROS2, only (with only bugfixes for the ROS1 version, if
> needed)? [My opinion: Due to constrained resources, I prefer the second
> option.]


Toggle navigation


#  Bitcraze Forums


Something went wrong.


[ ![@knmcguire](https://avatars.githubusercontent.com/u/11061260?s=60&v=4)
](/knmcguire)


#  Welcome to Crazyswarmâs documentation!  Â¶


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


Clear


Quote reply


* [ __ Print view  ](./viewtopic.php?t=3034&sid=f377be2a5f4c7552af96f63c34721358&view=print "Print view")


node_executable=’crazychoir_controller’,
namespace=’agent_{}’.format(i),
parameters=[{’cf_id’: i}]))
return LaunchDescription(launch_description)
In order to visualize the simulation, we included in our
toolbox a script to visualize the Crazyflie team in RVIZ. More
in detail, we provide a class that receives the pose information from the CFIntegrator classes and sends suitable
messages to RVIZ for visualization. A set of snapshots for
a simulation with N = 4 robots is provided in Figure 7.
To run the same setting in the Webots simulator, it is solely
t = 0 t = 1 t = 2 t = 3
Fig. 7. Sequence of images from the RVIZ toolbox at different subsequent
time instants. Static quadrotors are the leaders, while the moving ones are
the followers. As time progresses, quadrotors reach the desired formation.
necessary to substitute the CFIntegrator classes with the
Webots simulation architecture. To emphasize the potential
of Webots, we simulate 30 quadrotors drawing a grid. In
this setting, we leverage the distributed paradigm allowed
by CRAZYCHOIR employing three workstations to handle
the swarm, each of them endowed with Ubuntu 20.04 and
ROS 2 Foxy. One handles the physics engine, while each one
handles a subset of the quadrotors. We implemented a keepout zone to ensure that, as soon as a quadrotor flies beyond
a certain limit area, it is immediately shut down. Snapshots
from the Webots simulation are depicted in Figure 8.
Fig. 8. Beginning of the simulation (left) and end of the simulation (right)
of the bearing formation control problem in Webots.
D. Running the Experiment
In this section, we show how CRAZYCHOIR meets prototyping standards, allowing the user to switch from simulation
and experiment by changing only a few lines of code.
Indeed, to run an experiment, it is necessary to include
in the launch file the Crazyflie URIs and the radio nodes
as described in Section V. These few lines of code shall
substitute the ones related to Webots or RVIZ. After that,
it is only required to check that nodes subscribe to the
topics transporting Vicon data. To run our experiments, we
used the ros2-vicon-receiver package 1
to receive
data from our Vicon system. Snapshots from an experiment
with 4 quadrotor are provided in Figure 9. Furthermore,
1https://github.com/OPT4SMART/ros2-vicon-receiver


[ knmcguire ](/knmcguire) Nov 4, 2021


[ Forum rules ](https://forum.bitcraze.io/viewtopic.php?f=22&t=4425)


__ Search  [ __ Advanced search
](./search.php?sid=f377be2a5f4c7552af96f63c34721358 "Advanced search")


and International Cooperation, grant number BR22GR01.
Authors are with the Department of Electrical, Electronic and Information Engineering, University of Bologna,
Bologna, Italy. {lorenzo.pichierri, a.testa,
giuseppe.notarstefano}@unibo.it.
Fig. 1. Snapshot of a swarm of Crazyflie nano-quadrotors in our testbed.
A. Related Work
Control of quadrotors is currently performed with toolboxes based on the first ROS version. As for toolboxes
specific for the Crazyflie, the toolboxes in [3], [4] allow user
to run experiments on multiple Crazyflies. Researchers also
developed tools to efficiently simulate generic, autonomous
quadrotors in a realistic environment. An Unreal Engine
simulator for unmanned vehicles is proposed in [5]. Authors
in [6] propose a simulator based on Unreal Engine with
bridges for RotorS and OpenAI-Gym as to perform Reinforcement Learning tasks. Works in [7], [8] propose two
toolboxes to simulate and control multiple UAVs. Finally,
a ROS-Gazebo simulator for the Erle-Copter is provided
in [9]. As for simulation toolboxes tailored for the Crazyflie,
authors in [10] extend the well-known RotorS toolbox [11] to
target the Crazyflie. A Gazebo-ROS-Simulink toolbox for the
Crazyflie is proposed instead in [12]. However, in the above
toolboxes the swarm is handled by few, centralized ROS
processes that interact with all the quadrotors, thus affecting
the scalability and robustness of the swarm. Moreover, they
do not involve distributed or decentralized design tools
for swarm management and control. Recently, the novel
ROS 2 [13] is substituting ROS. Indeed, ROS 2 allows
multi-process communication leveraging the popular Data
Distribution Service (DDS) open standard. The DDS does
not require a centralized broker to dispatch messages, and
nodes can implement self-discovery procedures. Moreover,
the DDS allows for the implemention of different Quality of
Service profiles, and provides reliable and secure communiarXiv:2302.00716v2 [cs.RO] 30 May 2023
Fig. 2. CRAZYCHOIR architecture. Crazyflies can exchange information with neighbors to implement distributed feedback and optimization schemes.
Local classes handle planning and low-level control. Control inputs can be sent to simulation environments (Webots or RVIZ) or to real robots via radio.
cation. Also, ROS 2 has been designed for industrial settings,
thus supporting real-time [14] and embedded systems [15]
development. Authors in [16] propose a framework for collaborative industrial manipulators. The work in [17] proposes
a ROS 2-based architecture for self-driving cars. As for
works concerning software for multi-robot systems in ROS 2,
papers [18], [19] address the development of toolboxes


* [ __ Quote  ](./posting.php?mode=quote&p=15030&sid=f377be2a5f4c7552af96f63c34721358 "Reply with quote")


oke great!


Comment options


>   1. The overall architecture of having a single crazyswarm_server should
> remain.
>   2. It should still be possible to simulate scripts without ROS.
>


1  You must be logged in to vote


##  Replies:  4 comments  ·  11 replies


    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)


* **Simulation.** Crazyswarm has a simulation mode with 3D graphics, which makes it easy to validate complex scripts before running them on real hardware.


Looking at Figure 3 in our paper, it does seem like the latency benefit from
multithreaded ICP tracking is significant for large numbers of CFs. However,
in practice I think very few Crazyswarm users fly more than 20 CFs at once. I
strongly prefer simplicity so I would lean towards single-threaded tracking.
But "you can fly 49 CFs" is a big part of our claimed contribution. Since ICP
tracking is easily expressed as a pure function, maybe we could use `
std::async ` to get multithreading with a small impact on the overall code
structure?

---

Beta  Was this translation helpful?  Give feedback.


Firmware/software/electronics


control law in [26]. We refer the reader to the next
sections for a detailed discussion of these modules. A
sketch of the role of these classes and the related topics is
provided in Figure 3. Here, the arrows generated from the
HierarchicalController class represent the fact that
TrajectoryHandler and CommunicationHandler
are attributes of HierarchicalController, that call
their methods. The HierarchicalController class
receives trajectory messages on /traj topic and sends
control messages on /cmd vel topic.
Fig. 3. HierarchicalControl class and involved topics.
IV. CRAZYCHOIR MODULES FOR COOPERATIVE
DECISION MAKING AND PLANNING
CRAZYCHOIR provides modules to perform off-board
planning tasks for each quadrotor. Also, the proposed package allows users to implement cooperative decision-making
and distributed feedback schemes on swarms of Crazyflies.
A. GUI-based Swarm Trajectory Planning
CRAZYCHOIR involves a set of functionalities to handle
planning tasks. More in detail, CRAZYCHOIR includes a
graphical interface to provide trajectories to a set of quadrotors. In fact, one of these functionalities allows users to
hand-draw trajectories and directly send them to the chosen
quadrotor(s). The points of these hand-drawn trajectories
are interpolated, and a polynomial spline is constructed in
order to ensure the continuity of velocity and acceleration
profiles. Then, users can tune the trajectory time in order to
increase/decrease its execution and avoid high accelerations.
Also, this process can be extended in order to use different
planning methods and, e.g., manually impose bounds on
the trajectories. A snapshot of the interface is reported in
Figure 4, where we draw the name of our laboratory (i.e.,
Casy). Further, in Section VIII we present an example in
which a Crazyflie follows this trajectory.
This functionality can be exploited in scenarios in which,
e.g., there is a subset of leading quadrotors that move in the
space and a subset of following quadrotors that run cooperative algorithms to suitably track the leaders. In Section VII,
we provide an example of formation control with moving
leaders to highlight this aspect. The GUI can be also used to
help the final user to manage classical operations needed during simulations/experiments (e.g., hovering, landing, starting
Fig. 4. Snapshot of the proposed GUI.
the experiment, etc.). Then, the package provides methods


All reactions


[ Next  ](changelog.html "Changelog")


Something went wrong.


  Configuration  

All configuration files are in crazyflie/config.

  * crazyflies.yaml : setting up everything related to the robots.

  * server.yaml : setting up everything related to the server.

  * motion_capture.yaml : configs for the motion capture package.

  * teleop.yaml : configs for remote controls.


#  {{title}}


To see all available qualifiers, see our [ documentation
](https://docs.github.com/search-github/github-code-search/understanding-
github-code-search-syntax) .


Code:  Select all


Explore


Can the Bitcraze github account be of service here or do you prefer it on your
lab's account [ @whoenig ](https://github.com/whoenig) ?

---

Beta  Was this translation helpful?  Give feedback.


* Solutions


[ ![@whoenig](https://avatars.githubusercontent.com/u/3613757?s=60&v=4)
](/whoenig)


Anyway, perhaps we should start a discussion in crazyswarm2 fork now :) I'll
start an issue if I run into problems on windows.

---

Beta  Was this translation helpful?  Give feedback.


##  Footer


Comment options


Converted from issue


Our contributed code is licensed under the permissive MIT license, however
some of the parts (such as the firmware) are licensed under their respective
license.


3 replies


Skip to content


Numbered list


##  Crazyswarmâs academic origins  Â¶


Quote reply


3 posts • Page **1** of **1**


Crazyswarm1 is not recommended for new projects and has no/minimal
maintainance. Please use [ Crazyswarm2
](https://imrclab.github.io/crazyswarm2/) instead.


[ ![](https://avatars.githubusercontent.com/u/11061260?s=64&v=4) knmcguire
](/knmcguire) Nov 2, 2021


  Simulation  

Any usage of the ROS API, including high-level Python scripts, can be
visualized before execution. The initial position and number of robots is
taken from the crazyflies.yaml configuration file. The simulation uses the
firmware code as software-in-the-loop, and can optionally include the robot
dynamics. The configuration of the simulation (physics simulator, controller,
etc.) can be changed in server.yaml.

Example:

    [terminal]$ ros2 launch crazyflie_examples launch.py script:=hello_world backend:=sim

which is a short-hand for the following two commands:

    [terminal1]$ ros2 launch crazyflie launch.py backend:=sim
    [terminal2]$ ros2 run crazyflie_examples hello_world --ros-args -p use_sim_time:=True


1  You must be logged in to vote


###  Footer navigation


Maintainer  Author


        cf21_mocap_deck:
            motion_capture:
                enabled: true
                # only if enabled; see motion_capture.yaml
                marker: mocap_deck
                dynamics: default
            big_quad: false
            battery:
                voltage_warning: 3.8  # V
                voltage_critical: 3.7 # V

The yaml file also contain an ‘all’ field, in case you have parameters or
logging that you want enabled for all the connected crazyflies.

    all:
        firmware_logging:
            enabled: false
            default_topics:
                pose:
                frequency: 10 # Hz
            #custom_topics:
            #  topic_name1:
            #    frequency: 10 # Hz
            #    vars: ["stateEstimateZ.x", "stateEstimateZ.y", "stateEstimateZ.z", "pm.vbat"]
            #  topic_name2:
            #    frequency: 1 # Hz
            #    vars: ["stabilizer.roll", "stabilizer.pitch", "stabilizer.yaw"]
        firmware_params:
            commander:
                enHighLevel: 1
            stabilizer:
                estimator: 2 # 1: complementary, 2: kalman
                controller: 2 # 1: PID, 2: mellinger

The above also contains an example of the firmware_logging field, where
default topics can be enabled or custom topics based on the [ existing log toc


#  {{editor}}'s edit


For the ROS2 version I suggest we make a new repo ` crazyswarm2 ` under your
lab's github account. Or we could create a github account specifically for
crazyswarm.

---

Beta  Was this translation helpful?  Give feedback.


Query


* [ __ Print view  ](./viewtopic.php?t=3034&sid=f377be2a5f4c7552af96f63c34721358&view=print "Print view")


* 😄  1


sender = FPQRSender()
desired_accel = AccelerationTraj()
controller = HierarchicalController(
pos_strategy=position_ctrl,
attitude_strategy=attitude_ctrl,
command_sender=sender,
traj_handler=desired_accel)
rclpy.spin(controller)
The last class instead simulates the Crazyflie dynamics. In
Figure 6, we provide a communication diagram highlighting
the classes involved in this use-case and their interactions.
For the formation control problem, the guidance node of
each quadrotor sends to its neighbors only two vectors (i.e.,
position and velocity) at 100Hz rate.
Fig. 6. Class communication diagram. Rectangles represent different
classes, each one handled by a different node. Arrows represent directional
communications, which are performed leveraging ROS 2 topics. On each
arrow, exchanged data is reported.
C. Running and Visualize the Simulation
To easily run the simulation, we leverage
the ROS 2 launching system. Specifically, it is
necessary to write a Python script specifying which
nodes have to be run. It is necessary to set-up
instances of the DistributedControlGuidance,
HierarchicalController and CFIntegrator
classes for each quadrotor in the network. The launch file
also allows the user to specify additional parameters, e.g.,
robot initial conditions and the communication graph. As
an example, let N be the number of Crazyflie in the desired
simulation. To instantiate a controller for each quadrotor,
the code can be formatted as follows.
def generate_launch_description():
# ... define graph and init. positions
launch_description = [] # list overall nodes
for i in range(N): # for each quadrotor add
needed nodes
# ... set-up distributed feedback node
# ... set-up integrator node
launch_description.append(Node(
package=’crazychoir_examples’,


This would be indeed a great addition - feel free to open an issue in the
crazyflie_tools repository and I can take a look.

The code will be a bit more complicated, because it would need to handle
different data types, e.g., here is how I do it in `crazyflie_ros`: [
https://github.com/whoenig/crazyflie_ro ... #L284-L310
](https://github.com/whoenig/crazyflie_ros/blob/master/crazyflie_driver/src/crazyflie_server.cpp#L284-L310)
.

All crazyflie_tools use a point-to-point communication right now, so changing
parameters in parallel won't be possible; In the crazyswarm project we have
python scripts that run crazyflie_tools in a loop for each CF. It would be
possible to change parameters using broadcasts, but that is not implemented
yet.

As for the difference between crazyflie_cpp and the python client:
crazyflie_cpp does not have the notion of a connection like the python client,
but individual commands might fail if a timeout is reached. Additionally, the
communication is optimized to hide firmware latency of the asynchronous
communication. You can establish a connection with crazyflie_cpp in <1s.


* **ROS foundation.** The Crazyswarm server program is a ROS node. The [ Python API Reference  ](api.html#api) is a thin wrapper around the ROS interface. While we recommend the Python API for most applications, the ROS interface is fully supported.


     [ Project Home ](//readthedocs.org/projects/crazyswarm/?fromdocs=crazyswarm)
     [ Builds ](//readthedocs.org/builds/crazyswarm/?fromdocs=crazyswarm)


Italic


  * Docs  »
  * Welcome to Crazyswarmâs documentation!
  * [ Edit on GitHub ](https://github.com/USC-ACTLab/crazyswarm/blob/master/docs/index.rst)


I already have a crazyflie_cpp port that uses the new link. There are open
firmware issues, but they are small enough that I do have working workarounds
for them. So in short: the ROS2 effort is not blocked.

---

Beta  Was this translation helpful?  Give feedback.


All reactions


* [ Search Page  ](search.html)


Jump to  __


VII. CRAZYCHOIR HANDS-ON EXAMPLE:
BEARING-BASED FORMATION CONTROL
This section aims at introducing the user to our toolbox.
To this end, we show how to simulate the bearing-based
distributed formation control scheme as in [29] over a swarm
of Crazyflie. We start by providing the problem set-up and
the classes needed for its implementation. Then, we show
how to run the simulation both in RVIZ and Webots. Finally,
we show how CRAZYCHOIR allows users to easily switch
from simulation to experiment and run the same setting on
a real swarm of Crazyflies.
A. Problem Set-up
We consider a network of N quadrotors, divided into Nl
leaders and N −Nl followers. The objective is to control the
followers to deploy a desired formation in the space, while
the leaders stand still in their positions. In the considered
distributed set-up, each quadrotor can communicate with a
set Ni of neighboring quadrotors. The formation is defined
by a set of bearings g
⋆
ij for all the couples (i, j) with i ∈
{1, . . . , N} and j ∈ Ni
. Authors in [29] consider doubleintegrator systems in the form ¨p
di
i = u
di
i
. Leaders apply
u
di
i = 0, while followers implement
u
di
i = −
P
j∈Ni
Pg
⋆
ij
[kp(pi − pj ) + kv(vi − vj )], (4)


#  {{title}}


[ Create a new saved reply  ](/settings/replies?return_to=1)


Attach files


Maintainer


__ Top


>   3. The repo should be re-organized to be a proper ROS package (or stack),
> i.e., it should not contain a workspace. This will allow easier
> interoperability with other ROS packages. This will also allow us to use the
> regular CI/CD tools.
>


Quote reply


There is many reasons to move to ROS2. This issue is for discussing how to do
it.


[ whoenig ](/whoenig) Nov 1, 2021


I wouldn't mind if we break something w.r.t. initialization as long as we keep
the main commander APIs compatible.


##  [ Setting parameters via terminal [ROS]
](./viewtopic.php?t=3034&sid=f377be2a5f4c7552af96f63c34721358)


I agree.


[ ![@whoenig](https://avatars.githubusercontent.com/u/3613757?s=48&v=4)
](/whoenig) [
![@jpreiss](https://avatars.githubusercontent.com/u/1606009?s=48&v=4)
](/jpreiss) [
![@knmcguire](https://avatars.githubusercontent.com/u/11061260?s=48&v=4)
](/knmcguire)


#  Python scripts  

In the first terminal run the server, in the second the desired script. You
may run the script multiple times or different scripts while leaving the
server running.

    [terminal1]$ ros2 launch crazyflie launch.py
    [terminal2]$ ros2 run crazyflie_examples hello_world

If you only want to run a single script once, you can also use:

    [terminal]$ ros2 launch crazyflie_examples launch.py script:=hello_world


For


#  Select a reply


> What compatibility do we have to keep and what can we change. [My opinion:
> ROS2 is a breaking change. Ideally, the Python user scripts will keep
> working without changes, but everything else, e.g., config files or system
> architecture is IMO up for redesign.]


(converted to Discussion so we can have threaded topics)


Powered by [ phpBB ](https://www.phpbb.com/) ® Forum Software © phpBB Limited


Downloads


Thanks for the elaboration! That cleared my doubts

I am using the awesome chooser.py that you made and wanted to expand on it to
be able to control lights/led rings for now, so it got me thinking why not
expand it to be able to change parameters too?

Opened the issue here!: [ https://github.com/whoenig/crazyflie_ros/issues/98
](https://github.com/whoenig/crazyflie_ros/issues/98)

I guess CFClient is built for stability, steady flights, statistics, and
configuration/maintenance, whereas crazyflie_cpp is made more for controlling
multiple drones, faster communication, each has their pros and cons.


[ ![@knmcguire](https://avatars.githubusercontent.com/u/11061260?s=60&v=4)
](/knmcguire)


[ Sign up for free ](/join?source=comment-repo) **to join this conversation on
GitHub** . Already have an account? [ Sign in to comment
](/login?return_to=https%3A%2F%2Fgithub.com%2FUSC-
ACTLab%2Fcrazyswarm%2Fdiscussions%2F518)


I agree, especially because [ Noetic is the last official ROS1 release
](https://www.openrobotics.org/blog/2020/5/23/noetic-ninjemys-the-last-
official-ros-1-release) and we would have to maintain systems running old
versions of Ubuntu to test Crazyswarm on hardware.


[ USC-ACTLab ](/USC-ACTLab) /  **[ crazyswarm ](/USC-ACTLab/crazyswarm) **
Public


  1. Should we have ROS1 and ROS2 development side-by-side, or focus from a certain point on ROS2, only (with only bugfixes for the ROS1 version, if needed)? [My opinion: Due to constrained resources, I prefer the second option.]
  2. What compatibility do we have to keep and what can we change. [My opinion: ROS2 is a breaking change. Ideally, the Python user scripts will keep working without changes, but everything else, e.g., config files or system architecture is IMO up for redesign.]


ROS2 port  #518


1 reply


Something went wrong.


All reactions


Comment options


[ Crazyswarm2 ](index.html)

1.0

  * [ Installation ](installation.html)
  * [ Overview ](overview.html)
  * Usage
    * Configuration
      * crazyflies.yaml
    * Simulation
    * Physical Experiments
      * Teleoperation controller
      * Python scripts
    * Swarm Management
  * [ ROS 2 Tutorials ](tutorials.html)
  * [ How To ](howto.html)
  * [ Frequently Asked Questions ](faq.html)

__ [ Crazyswarm2 ](index.html)

  * [ ](index.html)
  * Usage
  * [ View page source ](_sources/usage.rst.txt)

* * *

#  Usage  

Warning

Do not forget to source your ROS 2 workspace in each terminal you would like
to use it

    . install/local_setup.bash

Warning


[ whoenig ](/whoenig) Nov 3, 2021


The Crazyswarm platform allows you to fly a swarm of [ Bitcraze Crazyflie 2.x
](https://www.bitcraze.io/products/crazyflie-2-1/) and [ Bitcraze Crazyflie
Bolt-based ](https://store.bitcraze.io/products/crazyflie-bolt) quadcopters in
tight, synchronized formations. Different localization systems are supported:
LightHouse, LPS, and motion capture. The Crazyswarm is particularly optimized
for motion capture systems and supports VICON, NOKOV, OptiTrack, and Qualisys.
We successfully flew 49 Crazyflies using three Crazyradios. An example video
for what you can do is shown below:


Quote reply


[ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax)


* [ The ReadME Project  GitHub community articles  ](/readme)


[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


[ whoenig  ](/whoenig) started this conversation in [ Ideas ](/USC-
ACTLab/crazyswarm/discussions/categories/ideas)


[ Sign up
](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-
name%3E%2F%3Crepo-
name%3E%2Fvoltron%2Fdiscussions_fragments%2Fdiscussion_layout&source=header-
repo&source_repo=USC-ACTLab%2Fcrazyswarm)


Quote


If you use our work in academic research, please cite us:


[ aesreal
](./memberlist.php?mode=viewprofile&u=2459&sid=f377be2a5f4c7552af96f63c34721358)


3 participants


associated with the dongle. The subscription callback triggers
the cmd sender, which is implemented in subclasses of
RadioHandler, and it is in charge of elaborating the
control input and forward it to the nano-quadrotors. A sketch
of this architecture is provided in Figure 5.
We provide a set of subclasses that extend
RadioHandler, namely RadioHandlerFPQR,
Fig. 5. Examples of nodes and topics involved in the radio communication
for a swarm of 5 quadrotors and 2 radio dongles.
RadioHandlerFRPY and RadioHandlerXYZ. More
in detail, the first one sends to the nano-quadrotors thrust
and angular-rate setpoints. The onboard firmware then
evaluates a suitable control input using a PID controller,
comparing the setpoint with gyroscope data. The second
one instead sends thrust and angular setpoints. An onboard
PID controller tracks these setpoints. The class leverages
Bitcraze logging methods to retrieve onboard log data.
These subclasses are tailored for precise control schemes
and require control inputs to be sent at high communication
rates. The RadioHandlerXYZ class instead sends
position setpoints and ground truth information to
the robots. These setpoints are handled onboard by
the higher level commander implemented on the
Crazyflie firmware. The communication of position setpoints
can be performed at a low communication rate, in the order
of a few Hertz. This fact reduces the number of messages
on the communication links. Thus, this class is tailored
for experimental scenarios with several quadrotors. Each
radio node handles a group of Crazyflies and thus requires
a list of radio URIs and a set of numerical identifiers to
subscribe to the correct topics.
VI. SIMULATION TOOLS IN CRAZYCHOIR
In this section, we describe how to simulate a swarm
of Crazyflies in CRAZYCHOIR. First, we detail how to
perform this task in conjunction with Webots, a realistic
engine tailored for robot simulations. Then, we detail how
to run a numerical simulation using a custom integrator and
RVIZ visualization. Although we focus on Webots, users can
extend the package to leverage other engines such as Gazebo.
A. Realistic Simulations via Webots


__ Search  [ __ Advanced search
](./search.php?sid=f377be2a5f4c7552af96f63c34721358 "Advanced search")


I have a separate ROS package just for tracking ( [
https://github.com/IMRCLab/motion_capture_tracking
](https://github.com/IMRCLab/motion_capture_tracking) ). This already has a
(partial) ROS2 port and CI for both ROS1 and ROS2. It would be possible to re-
evaluate the option to keep it separate for Crazyswarm2 (and use ROS topics to
communicate between different nodes), but I am a bit worried about latency and
computing requirements. What's nice right now is that I can run the Crazyswarm
on a pretty old Laptop and it just works:-)

---

Beta  Was this translation helpful?  Give feedback.


[ ![@knmcguire](https://avatars.githubusercontent.com/u/11061260?s=60&v=4)
](/knmcguire)


#  {{title}}


##  How is Crazyswarm different from Bitcrazeâs [ Crazyflie Python API
](https://github.com/bitcraze/crazyflie-lib-python) ?  Â¶


* **Python firmware bindings.** Crazyswarmâs simulator is built upon automatically generated Python bindings for certain modules in the Crazyflie firmware. The binding system can be helpful when developing new firmware modules, especially when they are mathematically complex and hard to debug.


Maintainer


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


All reactions


Something went wrong.


* Product


simultaneously perform send/receive) according to some
user-defined communication graph. These functions also allow to send different kinds of data to different neighbors. An
interesting feature is that the user does not need to define any
ROS message. Indeed, all the data is automatically serialized
and sent as a std msgs/ByteMultiArray on the sender
side, while it is de-serialized on the receiver side. Thus,
users can extend these classes according to their needs by
only implementing the desired algorithmic strategies without
warning about inter-robot communications. We remind the
reader to Section VII and Section VIII for usage examples of
these classes for cooperative control and optimization tasks.
V. RADIO COMMUNICATION
To physically control the Crazyflie nano-quadrotor, angular or angular-rate set points can be sent via radio. Position or velocity set-points can be communicated as well,
together with periodical ground-truth information. Crazyflies
are equipped with an nRF51822 radio controller, used to
communicate with a PC by means of the Crazyradio PA.
The Crazyradio PA is a 2.4 GHz USB radio dongle based on
the nRF24LU1+. It transmits 32-byte packets with datarate
up to 2Mbits, spreading in a range of 125 channels. Each
Crazyflie is able to receive data on one of these channels
at a certain datarate. The choice of these communication
parameter is crucial when performing experiments with a
large number of quadrotors. Indeed, a wrong choice may
result into a noisy communication channel and poor flight
performance. To mitigate this aspect, CRAZYCHOIR provides
a script that identifies the channels that are less subject
to external interferences. To handle the communication
with the quadrotors, CRAZYCHOIR implements a tailored
RadioHandler class. Each Crazyradio PA is handled by
an instantiation of this class into an independent ROS 2 node.
In particular, this class allows each dongle to communicate
with multiple Crazyflies by exploiting the Python methods
of Crazyflie-lib-python developed by Bitcraze. The
RadioHandler requires a list of URI address, used
to set a unique communication link with each Crazyflie
associated with the radio. In an initialization procedure, the
class updates a set of required parameters of the Crazyflie
related to the onboard controller. After that, each radio
node subscribes to the multiple cmd vel topics published
by the control nodes (cf. Section III) for each Crazyflie


2 replies


Both can be used to control several Crazyflies from a Python script. Here are
some differences:


__ Top


  * [ __ Board index  ](./index.php?sid=f377be2a5f4c7552af96f63c34721358) [ Crazyradio  ](./viewforum.php?f=7&sid=f377be2a5f4c7552af96f63c34721358) [ Developer discussions  ](./viewforum.php?f=9&sid=f377be2a5f4c7552af96f63c34721358)
  * [ __ Search  ](./search.php?sid=f377be2a5f4c7552af96f63c34721358 "View the advanced search options")


👍  1


###  [ Re: Setting parameters via terminal [ROS]
](./viewtopic.php?p=15030&sid=f377be2a5f4c7552af96f63c34721358#p15030)


##  Architecture


    *     * [ __ Unanswered topics  ](./search.php?search_id=unanswered&sid=f377be2a5f4c7552af96f63c34721358)
    * [ __ Active topics  ](./search.php?search_id=active_topics&sid=f377be2a5f4c7552af96f63c34721358)
    *     * [ __ Search  ](./search.php?sid=f377be2a5f4c7552af96f63c34721358)
    *   * [ __ FAQ  ](/app.php/help/faq?sid=f377be2a5f4c7552af96f63c34721358 "Frequently Asked Questions")
  * [ __ Login  ](./ucp.php?mode=login&redirect=viewtopic.php%3Ft%3D3034&sid=f377be2a5f4c7552af96f63c34721358 "Login")


[ ![@whoenig](https://avatars.githubusercontent.com/u/3613757?s=40&v=4)
whoenig  ](/whoenig)


About the ROS package, yes the initial setup would be harder but
discoverability would be much better. Like when people google crazyflie and
ros together, they will get to this old package: [
http://wiki.ros.org/crazyflie ](http://wiki.ros.org/crazyflie) . It would be
nice to have new users go to the right place for the package right away.


  * Initial setup is harder, because users now have to create their own ROS workspace (although we could provide a helper script)
  * Files will move around from the current location, although not by very much


Quote reply


Comment options


* **Identical or single motion capture markers.** Via [ libobjecttracker ](https://github.com/USC-ACTLab/libobjecttracker) , Crazyswarm can track multiple quadrotors with identical motion capture marker arrangements, or quadrotors with only one marker each. Most motion capture devices do not support this natively. To make it possible, the user must supply the quadrotorsâ initial positions in a configuration file at startup to establish the mapping from radio addresses to positions.


Is it also perhaps an idea to even further split it up? The lib-object tracker
could already be it's own package as it can also be used for other robotic
platform or perhaps separating the server part from the teleop?


#  {{title}}


This is based of listParams.cpp by whoenig's crazyflie ros
setParam.cpp


[ ![@jpreiss](https://avatars.githubusercontent.com/u/1606009?s=60&v=4)
](/jpreiss)


Hi all,

Is there an already built-in method to change crazyflie parameters using
rosrun on terminal?

Have searched through crazyflie_tools and there doesn't seem to be executable
that can do it (the closest one is listParams), so I tried to write my own
executable for it (I do not know C++ at all, was just playing around and
trying it out, am taking online courses right now.), which compiled but
doesn't work.

I'm guessing it's the following block of code here that would make it work: [
https://github.com/whoenig/crazyflie_cp ... #L770-L775
](https://github.com/whoenig/crazyflie_cpp/blob/22896ebe8b262b8cdd4ba6734b962ca4fa4a691c/src/Crazyflie.cpp#L770-L775)

I was hoping to use this command line to control the parameters for the
crazyflies because I'm using more than one, it would be so much faster to
change all of their parameters by a using a single line of code.

For instance, maybe something like:
rosrun crazyflie_tools setParam --ring.effect -- 2 --uri
radio://0/100/2M/E7E7E7E7XX
or
rosrun crazyflie_tools setParam --param ring.effect --value 2 --uri
radio://0/100/2M/E7E7E7E7XX
or
rosrun crazyflie_tools setParam --param ring/effect --value 2 --uri
radio://0/100/2M/E7E7E7E7XX

I've tried using the python way of connecting at first. It works well, but the
issue is that using crazyflie.open_link(uri) takes a considerable amount of
time (>2s) and it establishes a blocking connection, whereas using the
crazyflie ros tools, multiple crazyfliess can be targeted at once (not sure
why that is so, might be because packets are sent instead of a establishing a
stable link). I might as well do it via cfclient if I'm using this method.

Here is what I did, if anyone is interested. I'm ashamed because I really
don't know what I'm doing, not sure if what I'm passing into the method even
makes sense.


Something went wrong.


[ knmcguire ](/knmcguire) Nov 2, 2021


Name


Skip to content


All reactions


5 replies


[ latest ](/en/latest/)


[ ![](https://avatars.githubusercontent.com/u/3613757?s=64&v=4) whoenig
](/whoenig) Nov 4, 2021


#  {{editor}}'s edit


  * Heading
  * Bold
  * Italic
  * Quote
  * Code
  * Link
  *   * Numbered list
  * Unordered list
  * Task list
  *   * Attach files
  * Mention
  * Reference


Physical Experiments  


    #include <iostream>

    #include <boost/program_options.hpp>
    #include <crazyflie_cpp/Crazyflie.h>

    int main(int argc, char **argv)
    {

      std::string uri;
      std::string defaultUri("radio://0/80/2M/E7E7E7E7E7");
      std::uint8_t param;
      std::string value;

      namespace po = boost::program_options;

      po::options_description desc("Allowed options");
      desc.add_options()
        ("help", "produce help message")
        ("uri", po::value<std::string>(&uri)->default_value(defaultUri), "unique ressource identifier")
        ("param", po::value<std::uint8_t>(&param)->required(), "parameter to set")
        ("value", po::value<std::string>(&value)->required(), "value to set")
      ;

      try
      {
        po::variables_map vm;
        po::store(po::parse_command_line(argc, argv, desc), vm);
        po::notify(vm);

        if (vm.count("help")) {
          std::cout << desc << "\n";
          return 0;
        }
      }
      catch(po::error& e)
      {
        std::cerr << e.what() << std::endl << std::endl;
        std::cerr << desc << std::endl;


Code


A talk at the [ BAM days 2021 ](https://www.bitcraze.io/about/events/bam2021/)
includes a primer on how to use the Crazyswarm and a bibliography of papers
using the Crazyswarm: [ Slides
](https://www.bitcraze.io/about/events/documents/bam2021/hoenig_crazyswarm_bam2021.pdf)
[pdf], [ Video ](https://youtu.be/9KlfFpv6NIQ) [youtube].


    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)


It might be nice if the embedded YAML part of the launch file remained
compatible, or at least could be updated to the new format with regex search
and replace, or failing that maybe we provide a Python script à la 2to3.
Working configurations are valuable!

---

Beta  Was this translation helpful?  Give feedback.


Perhaps we work along the way of a separate place for the main code for motion
tracking and ROS wrappers with submodules in both the repo you have now and
crazyswarm2 in the future?

---

Beta  Was this translation helpful?  Give feedback.


[ jpreiss ](/jpreiss) Nov 1, 2021


Crazyflie nano-quadrotor running an Explicit Runge-Kutta
method. The integration is performed at 100 Hz, and is based
on the following dynamics
˙p = v (1)
˙v = gzW −
u1
m
R(η)zW −
1
m
R(η)AR(η)
⊤v (2)
η˙ = [u2 u3 u4]
⊤ (3)
Here, p ∈ R
3
is the position of the quadrotor in the
world frame FW = {xW , yW , zW }, v ∈ R
3
is its linear
velocity, and m = 0.027 Kg is the Crazyflie mass. The
rotation matrix is denoted by R ∈ SO(3), and the vector
η = [φ, θ, ψ]
⊤ stacks the Euler’s angles, namely, roll, pitch
and yaw. The Crazyflie allows the user to send thrust, roll
rate, pitch rate and yaw rate as control actions. Thus, the
control inputs in the considered dynamics are collected by
the vector u = [u1 u2 u3 u4]
⊤ ∈ R
4
, with u1 ∈ R denoting
the thrust and u2, u3, u4 ∈ R the angular rates (according
to the Z − Y − X extrinsic Euler representation). The term
RAR⊤v in (2) refers to the rotor drag effect as modelled
in [27]. The numerical values of the drag parameters have
been chosen according to the discussion in [28]. Thanks to
the modular structure of the package, the user can extend
or modify the proposed integrator to simulate more complex
dynamics. To visualize the quadrotor motion, we also provide
a visualization utility based on RVIZ.


__ Top


Seems that the windows build might also be fixed soon. so let's keep an eye on
that.

---

Beta  Was this translation helpful?  Give feedback.


[ 💡  Ideas ](/USC-ACTLab/crazyswarm/discussions/categories/ideas)


##  New/Changing Features


Maintainer  Author


All reactions


    * [ CI/CD & Automation ](/solutions/ci-cd/)
    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)


[ Post Reply  __
](./posting.php?mode=reply&t=3034&sid=f377be2a5f4c7552af96f63c34721358 "Post a
reply")


Comment options


Category


  * [ Changelog ](changelog.html)
  * [ Getting Started ](gettingstarted.html)
  * [ Installation ](installation.html)
  * [ Overview ](overview.html)
  * [ Configuration ](configuration.html)
  * [ Tutorials ](tutorials/tutorials.html)
  * [ How-To Guides ](howto/howto.html)
  * [ Python API Reference ](api.html)
  * [ Crazyswarm Internals ](internals.html)
  * [ Hardware ](hardware.html)
  * [ Glossary ](glossary.html)


Additional navigation options


* **Broadcasts.** Crazyswarm uses broadcast communication whenever possible to require fewer radios per Crazyflie. In contrast, the official SDK uses unicast communication instead.


<?xml version="1.0" ?>
<!--


Go to file


  * [ Code  ](/HBPNeurorobotics/gazebo_dvs_plugin)
  * [ Issues  1  ](/HBPNeurorobotics/gazebo_dvs_plugin/issues)
  * [ Pull requests  1  ](/HBPNeurorobotics/gazebo_dvs_plugin/pulls)
  * [ Actions  ](/HBPNeurorobotics/gazebo_dvs_plugin/actions)
  * [ Projects  0  ](/HBPNeurorobotics/gazebo_dvs_plugin/projects)
  * [ Security  ](/HBPNeurorobotics/gazebo_dvs_plugin/security)
  * [ Insights  ](/HBPNeurorobotics/gazebo_dvs_plugin/pulse)


This is a controller that collects data from a Camera Sensor and populates a
libgazebo camera interface as well as publish a ROS sensor_msgs::Image (under
the field ** <imageTopicName> ** ). This controller should only be used as a
child of a camera sensor (see example below.


  This will apply a constant force on the joint
    ign topic -t "/model/joint_force_example/joint/j1/cmd_force" -m ignition.msgs.Double  -p "data: 0.001"


      <plugin
        filename="ignition-gazebo-joint-position-controller-system"
        name="ignition::gazebo::systems::JointPositionController">
        <joint_name>vertical_fins_joint</joint_name>
        <p_gain>0.1</p_gain>
      </plugin>


* [ GitHub Sponsors  Fund open source developers  ](/sponsors)


Query


Repositories


If you used this code for your research, please consider citing the paper [
Towards a framework for end-to-end control of a simulated vehicle with spiking
neural networks ](http://ieeexplore.ieee.org/document/7862386/) .


* Open Source


###  License


  * Buoyancy: applies buoyancy forces
  * JointPositionController: controls the vertical and horizontal fins
  * LiftDrag: generates forces on the vertical and horizontal fins
  * Thruster: propels the vehicle
  * Hydrodynamics: applies forces such as added mass, drag and coriolis


[ ](https://github.com/)


    * [ Topics ](/topics)
    * [ Trending ](/trending)
    * [ Collections ](/collections)


##  Usage