Px4 SITL Gazebo ROS works ok in empty world but not in a custom world

#1

Hi, I’m trying to simulate a boat with an iris quadrotor in Gazebo, using ROS.
Iris controller is a px4 in SITL
The boat is a differential boat from this project:


USV_SIM provide a gazebo simulation with realistic water conditions.
I manage to spawn an IRIS on the boat deck, launching mavros and px4 SITL.
The problem is that when I arm the iris, it try to takeoff but uncontrolled. I saw some message in mavros informing a warning:
EKF (WARN [lib__ecl] EKF GPS fusion timeout - reset to GPS
I’m sure that that is the problem. I run rostopic echo /mavros/local_position/pose and, with the iris siting on the boat decj, I saw that X and Y position diverge and when the previous message is shown in mavros, the pose reset to x=0, Y=0.

I made another test. I rosrun gazebo_ros gazebo and in another terminal run the same launch file for spawning the IRIS. Now I can arm motors, and made a takeoff without problem and the lib_ecl warning is not showing in this scenario.

So I need to debug why launching gazebo with usv_sim package makes the EKF/GPS/whatever to not work.

how can I get a log of the px4 message to attach here?

Thank

1 Like