Running VIO with GPS active
-
Hi all, I came across a VIO demo video on ModalAI's official youtube channel and found something interesting. The GPS was initially active, but was supposedly turned off with the command "gps stop" midway through the flight mission. However, the true GPS seems to remain active and recorded the actual trajectory of the VIO flight(the curly trajectory) even after "gps stop" was sent(see screenshot from the video below).
I've gone through the voxl-qvio-server source code, but I'm having trouble locating the implementation part of this —could anyone point me in the right direction? We are planning to test the VIO but would be better if we also have GPS on so we can use the geofence for safety purposes and also evaluate the performance with GPS as a groundtruth reference after testing.
-
@Allen-Wu Yes, there are multiple ways to use GPS hardware and data all controlled by PX4. Let me walk you through the possibilities in the order of coarse grain control to fine grain control below:
-
Unplugging the connector to the GPS unit: this will outright disable its capability (also losing magnetometer as well). In this case no gps data will be present in the system nor logged. This applies from power up to power down.
-
Disabling the GPS driver, done by using the PX4Shell and running "gps stop': GPS hardware is still running but data is not used by PX4 subsystems, hence why you still get raw data logged. You can access the PX4Shell via QGC-->[Analyze Tools]-->[MAVlink Console] (type 'help' will show you the command options). This is the scenario in the above video example.
-
Enable/Disable GPS processing: apply PX4 params.
Apply params using these parameters will include GPS data in the position estimate along with VIO. -
Removing GPS data in flight: you can just alter these 2 values to add/remove GPS data in the position estimate.
EKF2_EV_CTRL
EKF2_GPS_CTRL
I'll refer to the QGC/PX4 docs on their function. note altering these in flight can cause jumps in the position estimate causing the drone to have aggressive, unpredictable motions until the position is reestablished.
From your request, it sounds like you want both VIO and GPS running, hence you can just apply option #3 until you're ready to turn off GPS.
-