Can't Get Multi-Vehicle Simulation Running JMAVSim

Hello,

I followed the instructions on the dev guide for multi vehicle simulation, but it doesn’t work fully. Single vehicle works fine. Running the first vehicle in multi-vehicle works fine. When running the 2nd, with “./Tools/jmavsim_run.sh -p 14561”, the vehicle doesn’t work correctly. It shows up in QGC, but reports an error for fetching parameters, and is permanently waiting for GPS fix. I notice that in the PX4 output, simulation 1 ends with a “INIT MAVLINK” output. Simulation 2 never reaches this point.

Can anyone point me to what I might be doing wrong?

Thanks

CG

What PX4 version are you using?

I followed the CygWin tool chain installation instructions and checked the tick box for cloning the latest firmware from the repo, so I assume the current dev build?

I’ll try and get a known version of the repo and report back.

Updated to Release 1.9.0, then reattempted. See attached screenshot.

make sure to follow the instructions for 1.9 when you use 1.9. There have been some changes.

I had a look but as far as I can see from the dev guide, the multi-vehicle simulation instructions are the same for 1.9 vs 1.8?

So I’ve reverted my Firmware repo to v1.8.2 and tried the JMAVSim multi vehicle simulation again. Building and running the simulation with

make posix jmavsim

works as expected. Running the simulation with

./Tools/jmavsim_run.sh

results in the simulation starting up, but no INIT MAVLink message, and no connection to QGC for any of the simulations.

Julian, could you perhaps point me in the direction of which instructions changed for v1.9? I can then reattempt with the latest version.

Thanks

CG

I don’t know if this worked for 1.8.2, I would suggest to check using 1.9.0, that’s what I have been testing recently.

The instructions for 1.9.0 are: https://dev.px4.io/v1.9.0/en/simulation/multi_vehicle_jmavsim.html

and you can see that 4. is different:

./Tools/jmavsim_run.sh -p 4561 -l

Thanks Julian. I’m quite sure those instructions have updated since the first time I looked! Regardless, multi-vehicle JMAVSim now works correctly following those instructions.

Many Thanks

CG

1 Like