CloudCare is a local simulation setup for running multiple PX4 SITL drones and controlling them from a Flask web UI. This repo focuses on:
- A tmux-based simulator launcher (mytmux)
- A web control server (uav_web_control)
- Simulation cases (initial positions and setpoint lists)
The tmux profile launches:
- PX4 SITL multi-vehicle simulation
- QGroundControl
- MicroXRCEAgent
cd src/mytmux/multi_tmux
tmuxinatorThis uses:
- PX4 Autopilot at
~/PX4-Autopilot - QGroundControl at
~/QGroundControl.AppImage - MicroXRCEAgent on UDP port
8888
If those paths differ on your machine, edit:
src/mytmux/multi_tmux/.tmuxinator.yml
cd src/uav_web_control
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Start rosbridge websocket (default port 9090)
# Example:
# ros2 launch rosbridge_server rosbridge_websocket_launch.xml
export FLASK_APP=app.py
flask run --host=0.0.0.0Open:
http://localhost:5000
The web server publishes and subscribes via rosbridge websocket.
Optional env vars:
ROSBRIDGE_HOST(defaultlocalhost)ROSBRIDGE_PORT(default9090)ROSBRIDGE_USE_SSL(true/false)
"Cases" live in the configuration files that define spawn locations and mission setpoints.
Primary case file:
src/px4_swarm_controller/config/drones.yamlinitial_positions: spawn positions for each drone IDsetpoints: ordered lists of waypoints per drone (x, y, z, yaw)
Secondary case file (used by the web UI if px4_swarm_controller config is missing):
src/uav_web_control/config/config.yamlinitial_positions: grid positionsgeo_origin: map origin for lat/lon conversions
If you want a smaller demo case, copy and edit:
src/uav_web_control/config/uavs.yaml.org->src/uav_web_control/config/uavs.yaml
PX4 includes a multi-vehicle script. The tmuxinator profile already calls it, but you can run it manually:
cd ~/PX4-Autopilot/Tools/simulation/gazebo-classic
./sitl_multiple_run.sh -n 20bash src/install_scripts/multi_uavs_sim_env.shThis opens GNOME Terminal tabs and starts 3 PX4 instances plus the XRCE agent.
If your UAV GPS markers do not align with the map:
- Open a UAV's Open Mission view.
- Click the map where the UAV should appear.
- Click Calibrate Map.
Notes:
- Calibration is per-UAV and stored in the browser (clears on reload).
- Goals are adjusted automatically using the calibration offset.
- The Arm button publishes a
px4_msgs/msg/VehicleCommandvia rosbridge to/px4_<id>/fmu/in/vehicle_command. - Ensure rosbridge websocket is running and accessible.
src/mytmux/multi_tmux/.tmuxinator.yml: tmux launchersrc/uav_web_control/: Flask web UI + control endpointssrc/px4_swarm_controller/: ROS2 control stack + configssrc/install_scripts/: helper scripts
- No UAVs appear: check
src/px4_swarm_controller/config/drones.yamlor createsrc/uav_web_control/config/uavs.yaml. - Arm/Setpoint fails: confirm ROS2 is sourced and
px4_msgsis built/available. - Gazebo not launching: verify PX4 build exists at
~/PX4-Autopilot/build/px4_sitl_default.

