I simulating an autonomous application on Gazebo-Classic with ROS2 Foxy.
The problem I am facing is that the Micro-XRCE-DDS Agent publishes the PX4 messages with the timestamps taken from the operating system instead of the ones published by Gazebo (simulation time).
Is there a way to make the Micro-XRCE-DDS Agent use the simulation time to populate the timestamps?
Hi @biagio , as far as I know, you can’t do that as the deve dds time sync messages uses the system time clock on the agent side, and this setting is hardcoded.
You can disable it entirely though.
There is a new parameter, available in the main branch, to do that: UXRCE_DDS_SYNCT
On gazebo garden and harmonic, you can use it when the time synchronisation is provided by Gazebo (ROS uses the gz_bridge to sync)
More details in the documentation:
Hi @Benja, thank you very much for the answer!
Sorry for the late reply, your answer saved me a lot of time!