Using gazebo_gps_plugin

Hi,

I’m trying to modify the gazebo_gps_plugin.cpp as suggested in SITL GPS spoofing - hil/gps topic doesn't work? in order to create gps spoofing. But I can’t understand how to I make my installed px4 use those plugins.

Currently I’m running in one terminal the command “./QGroundControl.AppImage” and in a different terminal “make px4_sitl gazebo” but it seems like the changes I make in the plugin do not affect at all.

This is the first time I try to use px4 and gazebo, can someone refer me to a tutorial that explains how to properly integrate the plugins?

Also, on a different note, is there a way to get logs from the gazebo ? In order to check the spoofing I’ll want to compare the track of the px4 in 2 flights , one with spoofing and one without and I’m not sure if the logs received from QGroundControl will help in that case.

Is your end goal to set the GPS location in the gazebo world?

My end goal is to modify the gps info arriving from the QgroundControl, so there will be a difference between the gps calculated in the control computer and the actual gps in the gazebo world.

My understanding is that gps info goes from the gazebo simulation to QGroundControl. So I think your request

to modify the gps info arriving from the QgroundControl

May be challenging because I think the information is flowing the other way.