good afternoon,
I am trying to enable standard VTOL HITL sim in gazebo classic. I am running on voxl2 by modalai in their provided gazebo docker, so I understand that it is a niche setup question. However, I have been getting constant timeout errors for MAG#0 and BARO#0. This makes the vehicle freak out. Notably, when I launch the simulator for a multicopter frame with identical parameters on my PX4, the error does not come up.
I am trying to narrow down the possible cause of the problem and I wonder if there is some difference in how PX4 handles baro/mag data for vtol frame vs quad frame. If not, is there something about standard gazebo classic that differs when running vtol vs multicopter frame?
Some of the things I have looked into so far:
- publication rates for mag/baro by gazebo are 80Hz and 40Hz respectively for both vtol and multicopter frame.
- PX4 logs show “sensor_mag” data at 1Hz and “vehicle_magnetometer” at 2Hz for both vtol and multi copter frames. Not sure why such inconsistency.
- tried enabling and disabling vtol modules on PX4. Specifically, fw_att_control,fw_pos_control, fw_rate_control, vtol_att_control. This seems to have no influence on the data flow and the timeout error. Only the airframe type loaded in gazebo seems to be affecting.
- I tried changing EKF2_MAG_DELAY and EKF2_MAG_CHECK params - no effect.
- Tried adjusting baud rate at which gazebo is communicating mag/baro data to 200Hz/100HZ respcetfully - no effect.
- Lastly, tried adjusting mavlink communication rate on the voxl2 - also no effect.
Some of the next steps I am planning to take:
- try ethernet connection
- if I find how to increase timeout threshold in px4 sourcecode I will try rebuilding my px4 firmware with greater timeout tolerance
Some logs just in case:
- https://review.px4.io/plot_app?log=0ecfd3c1-a368-47a4-81b9-e853d702c9de
- https://review.px4.io/plot_app?log=1cad74f0-a4ed-4477-a1d6-3ee116b41123
- https://review.px4.io/plot_app?log=5045322d-ab9b-44cb-a851-155810819960
- https://review.px4.io/plot_app?log=95523b56-ec76-4ef4-bed0-12b89a69abb5
My original exchange with modalai developers with some extra screenshots and command line prompts:
If you spot anything unusual please let me know and thank you in advance for your help