Running Ubuntu22.04 in WSL on Windows 11 box. Trying to upload missions to multiple SITL Rovers using mavlink script. Sometimes it works, sometimes it doesn’t.
When it doesn’t I get “link down” messages on Mavlink Console like:
“AP: ArduRover V4.4.0-dev (39596188)
no link
link 1 down
link 2 down”
The link can go down when running any of three different functions. And if mission is 8 waypoints 5 of them might get lost. The consistent thing is the links go down. And all of them at once, even if I am only uploading one mission at that moment.
Here are commands in question
A connection.mav.command_long_send(connection.target_system, connection.target_component,
mavutil.mavlink.MAV_CMD_DO_SET_HOME,
1, # set position
0, # param1
0, # param2
0, # param3 …
B connection.waypoint_count_send(wp.count())
C connection.mav.send(wp.wp(msg.seq))
I can create loops that look for the heartbeat and then reboot the connections as ‘fix’. But I wonder if I am missing something more basic. Thanks.
I believe so. Each has its own Sys ID. I can see that works both from a terminal when launched and from each vehicles mavlink console.
Here are two examples: “Setting SIM_SPEEDUP=10.000000
Setting SYSID_THISMAV=4
Home: 33.809313 -118.393867 alt=0.000000m hdg=270.000000
Starting sketch ‘Rover’
Starting SITL input
Using Irlock at port : 9035
bind port 5790 for 0
Serial port 0 on TCP port 5790” AND
“Setting SIM_SPEEDUP=10.000000
Setting SYSID_THISMAV=2
Home: 33.810313 -118.393867 alt=0.000000m hdg=270.000000
Starting sketch ‘Rover’
Starting SITL input
Using Irlock at port : 9015
bind port 5770 for 0
Serial port 0 on TCP port 5770
Waiting for connection …
Connection on serial port 5770
Loaded defaults from …/Tools/autotest/default_params/rover.parm,…/Tools/autotest/default_params/motorboat.parm
bind port 5772 for 2”
So I think each has it’s own SYSID and port