How dynamicswarms/ds-crazyflies works
Dynamic Swarms Crazyflies is a ROS 2 stack for operating Crazyflie nanoquadcopters through either real hardware or Webots simulation. Users select a backend through the framework launch file, then run Crazyflie or Safeflie nodes; Safeflie accepts target and flight commands and applies bounded setpoint handling. Optional tracking and position visualization support tracked operation, while rqt plugins expose vehicle status and controls and provide a UI for adding and saving vehicles. The excerpts show launch dispatch, Safeflie command handling, gateway requests, and parts of the rqt status UI; wiring not established by those excerpts is omitted.
Main entry points: framework.launch.py Framework Launch · safeflie.py Safeflie · gateway_endpoint.py Gateway Endpoint · safeflie.launch.py Safeflie Launch
Components 20
Vehicle Runtime
- Safeflie Launch
src/crazyflies/launch/safeflie.launch.py - Crazyflie
src/crazyflies/crazyflies/crazyflie.py - Safeflie
src/crazyflies/crazyflies/safeflie.py - Safe Commander
src/crazyflies/crazyflies/safe/safe_commander.py - Target Message
src/crazyflies_interfaces/msg/SendTarget.msg
Backend And Tracking
- Framework Launch
src/crazyflies/launch/framework.launch.py - Gateway Endpoint
src/crazyflies/crazyflies/gateway_endpoint.py - Hardware Gateway
src/dependencies/crazyflie_hardware - Webots Gateway
src/dependencies/crazyflie_webots - Webots Simulation
src/dependencies/crazyflie_webots - Motion Capture
src/dependencies/ros-motioncapture - Object Tracker
src/dependencies/ros-objecttracker - Position Visualization
src/crazyflies/crazyflies/position_visualization.py
Status And Control UI
- State Plugin
src/rqt_crazyflies/src/state_plugin.cpp - Status Widget
src/rqt_crazyflies/src/crazyflie_status_widget.cpp - Vehicle Connection
src/rqt_crazyflies/include/rqt_crazyflies/crazyflie_connection.hpp
Vehicle Setup UI
- Add Vehicle UI
src/rqt_crazyflies_add/rqt_crazyflies_add/add_widget.py - Add API
src/rqt_crazyflies_add/rqt_crazyflies_add/add_api.py
Other components
- Operator
- rqt Operator
Connections 20
- Operator → Framework Launch: selects backend
- Framework Launch → Hardware Gateway: launches conditionally
- Framework Launch → Webots Gateway: launches conditionally
- Framework Launch → Webots Simulation: launches simulator
- Framework Launch → Motion Capture: launches when tracked
- Framework Launch → Object Tracker: launches when tracked
- Framework Launch → Position Visualization: launches
- Operator → Safeflie Launch: configures vehicle
- Safeflie Launch → Safeflie: starts node
- Safeflie → Crazyflie: inherits vehicle behavior
- Safeflie → Target Message: subscribes to
- Safeflie → Safe Commander: imports
- rqt Operator → State Plugin: opens plugin
- State Plugin → Status Widget: creates status frames
- Status Widget → Vehicle Connection: registers callbacks
- rqt Operator → Add Vehicle UI: uses setup UI
- Add Vehicle UI → Add API: calls add methods
- Add API → Gateway Endpoint: requests vehicle changes
- Gateway Endpoint → Hardware Gateway: calls gateway services
- Gateway Endpoint → Webots Gateway: calls gateway services