Hello all,
I am running a SITL simulation with two vehicles using the latest ArduPilot Rover firmware on WSL2 (Windows 10 host).
I start the simulation with the following command:
sim_vehicle.py -v Rover -L nisaki --add-param-file=/home/thomas/ardupilot/parms/boat_parms.parm --map --console --count 2 --auto-sysid --auto-offset-line 270,60
my custom params file has only a frame_class=2
and a larger battery, nothing else.
This successfully launches two vehicles with IDs 1 and 2.
The initial output list in MAVProxy shows:
MANUAL> output list
MANUAL> 2 outputs
0: 172.21.176.1:14550
1: 172.21.176.1:14560
Here, 172.21.176.1 is the WSL address of the Windows host machine.
Goal: I want to set up separate connection strings within the WSL2 subsystem to connect independent Python scripts to each rover. Specifically, I want to assign 127.0.0.1:14550 to rover with ID=1 and 127.0.0.1:14560 to rover with ID=2.
I have tried various approaches for several hours without success and found no comprehensive documentation on this topic. The most promising attempt was using the following MAVProxy commands:
output sysid 1 127.0.0.1:14550
output sysid 2 127.0.0.1:14560
This seemed correct since the output command in MAVProxy has a sysid option to add new output for a specific MAVLink sysID. The command appeared to work, as indicated by the response:
MANUAL> output sysid 1 127.0.0.1:14550
MANUAL> Adding output 127.0.0.1:14550 for sysid 1
After running these commands, the output list updates to:
MANUAL> output list
MANUAL> 2 outputs
0: 172.21.176.1:14550
1: 172.21.176.1:14560
1 sysid outputs
1: 127.0.0.1:14550
However, right after adding the output, I get a “link 1 down” error in the MAVProxy console, and I’m unable to determine why. I’ve tried different ports, IPs, and other configurations, but the issue persists.
I’ve searched through documentation and forum posts (e.g., here and here), but haven’t found a solution or detailed guidance on how to achieve this setup.
To clarify, I want to run multiple rovers on the same SITL, view them on the same MAVProxy map, and have discrete connection strings for each rover to connect different Python scripts to them independently. I am obviously doing something wrong … this must be easily achievable.
If anyone has insights or suggestions, I would greatly appreciate your help!
Thank you.