Simulation¶
Launch and manage multiple ArduPilot SITL instances with MAVProxy.
Works on Linux natively and on Windows via WSL. Each SITL instance gets a
unique sysid and a TCP port separated by port_step (default 10).
A MAVProxy daemon bridges each SITL TCP port to a UDP port that the SDK
connects to.
Parameters¶
n_drones:
Number of ArduCopter instances to launch.
sitl_path:
Explicit path to the arducopter binary. Detected automatically if
omitted.
base_port:
TCP port for the first instance. Subsequent instances use
base_port + i * port_step.
port_step:
Port increment between instances.
mavproxy_base_port:
UDP port for the first MAVProxy output. Subsequent instances use
mavproxy_base_port + i * port_step.
home:
(lat, lon) home position for the first drone.
home_alt:
Home altitude in meters.
spacing_m:
Meters between drones along latitude.
speedup:
SITL clock speed multiplier (1 = real-time).
startup_timeout:
Seconds to wait for each instance TCP port to become reachable.
mavproxy_settle_s:
Seconds to wait after launching MAVProxy for it to connect to SITL.
wipe:
Pass --wipe on the first instance to reset parameters.
start()
async
¶
Launch all SITL instances with MAVProxy sidecars and wait until ready.
Returns the list of :class:SITLInstance objects with populated
connection_string attributes (UDP via MAVProxy).
stop()
async
¶
Terminate all running SITL and MAVProxy processes and clean up.
connection_strings()
¶
Return MAVLink connection strings for all running instances.
Tracks a single SITL ArduCopter process and its MAVProxy sidecar.
connection_string
property
¶
MAVLink connection string for this instance (via MAVProxy UDP).