How can I pass a Gazebo message to PX4 message?

Hello everyone,
I’m coding a gazebo plugin. Gazebo does not have any log file that allows to analyse the messages, the only Gazebo log file is the playback feature that allows to only plot the physical variables. My idea was to send from Gazebo to PX4 the messages I’m interested in through the MAVLINK protocol and then plot them easily in the PX4 log file. Is there a way to do this without modifying the HIL_SENSOR?
Thank you in advance!

Good question. You could use some other MAVLink message, or even the DEBUG_VECT message but then you have to trace the data through all the hops to make sure it ends up in the log.

Alternatively, you could try to log it with timestamps into a separate file and then load that in separately during analysis and sync it based on the timestamps.

1 Like

Thank you for the reply. With ‘other MAVLink message’ do you mean an already existing one(if yes, do you suggest any?) or I should create a new one? I will also analyze the possibility of DEBUG_VECT. Thanks again!

I don’t know what sort of data it is that you want to log but if there is a message that fits it you could use that. Otherwise DEBUG_VECT would work, or adding your own if it’s not just a one off hack.