JSON sensor issue - SITL/GAZEBO


I’m trying to have Arduplane/SITL/Gazebo “Garden” on a WSL Ubuntu 22.04
I followed the doc https://ardupilot.org/dev/docs/sitl-with-gazebo.html

  • To have Gazebo running, I had to change the command (it’s due to a graphic card issue, I found that in the Gazebo forum)
gz sim -v4 -r zephyr_runway.sdf

I use this one instead:

gz sim zephyr_runway.sdf ign gazebo --render-engine ogre

And Gazebo seems to work

For SITL, in the doc:

sim_vehicle.py -v ArduPlane -f gazebo-zephyr --model JSON --map --console

SITL/Mavproxy is starting , but it seems that the JSON sensor are not working, so nothing happen and I’ve got these errors messages:

Usually I’m not using JSON for SITL, first time because of Gazebo, I didn’t find a way to make it work, so thanks for your help

Hello @Nicolas_T, it appears that the SITL instance is not connecting to the simulation running in Gazebo. It could be that the ardupilot_gazebo plugin is not being found.

Could you run the Gazebo server and GUI separately with the following commands and post the logs:


gz sim -v4 -s -r --render-engine ogre zephyr_runway.sdf


gz sim -v4 -g --render-engine ogre

If you see a message saying the ArduPilotPlugin is not found you’ll need to export
GZ_SIM_SYSTEM_PLUGIN_PATH with the path to the plugin.

Also note the -r flag on the server - this starts the simulation running. There will be no connection while the simulation is paused (which is the default start state).

1 Like

Hi Rhys,

It works fine, that’s so great, many thanks for your help !!


1 Like