ROS2 nodes don't "step" when Gazebo simulation is stepped forward
We have a simulated robotic system running ROS2 Foxy, and we've noticed that the nodes relying on the Gazebo ROS interface remain frozen when we step the simulation forward by N iterations. Things work as expected when the simulation is unpaused, but when we pause the simulation and try to advance the simulation manually, we can see the Gazebo simulation time progresses but none of the ROS interfaces do anything.
For instance, we can look at the /clock
topic, see that new timestamps are getting published while the simulation is unpaused, pause the simulation and no new messages are published, step the simulation in Gazebo forward by 10 seconds, and unpause the simulation and we see a sudden jump in the time being published to the new time.
We quickly tried this same experiment in ROS1 Melodic and did not have the same issue.
Has anyone encountered this issue before, or does anyone have any tips on getting ROS2 nodes to continue to function when a gazebo_ros simulation is stepped forward?