Hello,
I am working on integrating a Deep Learning (DL) model into PX4 SITL for GPS-denied navigation. I have three related questions:
Q1. DL Model Training Data
I want to train a DL model on IMU and ground truth data. Currently, I record data with rosbag
during SITL missions using QGroundControl.
-
As input I use:
/mavros/imu/data_raw
-
As ground truth I use:
/gazebo/model_states
-
I trained a CNN-LSTM model on this data.
My question: Are these the correct MAVROS topics for training (input: IMU, output: ground truth position/orientation)? Or should I consider other topics like
/mavros/local_position/pos?
Q2. GPS-denied Simulation
I want to turn off GPS in PX4 SITL so that the drone only relies on IMU + my DL model (via vision pose).
What is the recommended way to disable GPS in PX4 v1.13 SITL with Gazebo Classic?
-
Should I remove the GPS plugin from
iris.sdf
? -
Or just set
EKF2_AID_MASK
to disable GPS aiding?
Q3. Using DL Model in Simulation
My DL model runs as a ROS node:
-
Subscribes to
/mavros/imu/data_raw
-
Publishes predicted position/orientation to
/mavros/vision_pose/pose
In SITL I run:
-
Terminal 1: Gazebo empty world
-
Terminal 2: PX4 SITL (
make px4_sitl_default gazebo
) -
Terminal 3: MAVROS (
roslaunch mavros px4.launch
) -
Terminal 4: DL model node (cnn_lstm.py)
-
Terminal 5: Plotting node (plot_trajectory.py)
-
Terminal 6: Mission node (simple takeoff, move forward, land)
For Vision Pose I set in PX4 shell:
param set EKF2_AID_MASK 24
param set EKF2_HGT_MODE 3
For GPS I use:
param set EKF2_AID_MASK 1
param set EKF2_HGT_MODE 0
Question: Are these the correct parameters to let PX4 use my DL model (via
/mavros/vision_pose/pose
) instead of GPS? Do I need to set anything else to stabilize the drone in GPS-denied conditions?
Summary:
-
Q1: Correct MAVROS topics for IMU + ground truth training
-
Q2: How to properly disable GPS in SITL
-
Q3: Correct parameter setup for Vision Pose + DL model integration
Any guidance or corrections from the community would be very helpful
Thanks!