I have tried to send new GPS data to the drone on the topic /mavros/hil/gps, where I set MAV_USEHILGPS=1 and SIM_BLOCK_GPS=1 to be able to see a GPS spoofing happens with QGroundControl. But after some time it goes into failsafe and I don’t understand why it happens?
What is your goal here? Are you trying to test the fail safes of the PX4 Autopilot? Or are you trying to write code to maliciously takeover and bad GPS sensor data to the flight controller?
I have tried in the simulator but my problem with that is currently have a python program that runs parallel and with all the other and I can’t see how I should get access to the simulator so the python program says when and how the simulator gps msg data should be.
I have looked more into it now, and if I change directly the Gazebo GPS plugin would I also change the ground Groundtruth?
For the simulator, is it possible to create a ROS connection to it and from that says when and how the GPS msg should be?
If it’s possible how should It be done in the CMakeLists.txt? (I assume that it’s done in the CMakeLists.txt )
@Jaeyoung-Lim do you know the answer to the question regarding the GPS plugin on gazebo?
@Niknu for ROS 2, you can perhaps leverage the microRTPS bridge, but you would need to modify the logic I pointed you towards, to publish topics, you would essentially need to create your own uORB topic
Did you have any updates on this topic? I am currently trying to accomplish almost the same thing as you, and I will have to work on this GPS module to validate my ML algorithms to detect spoofing.
I have github where I published the work from that. I added new parts to the GPS module to be able to change the coordinates the drone got compared to what they really was.
Thanks for sharing the repository of your thesis! Is the document publicly available? I want to have some insights into what can be improved on your implementation. I’m currently trying to do spoofing detection but with ROS2.
Hi @Niknu , Thank you so much for sharing your work. I know it has been a while, but is there any chance you could share the compiled PDF of your thesis? I’m trying to simulate something similar to your work, but the above document fails to compile.