How to run rospy node independently on simulation time when use_sim_time is set?

asked 2019-07-10 05:49:30 -0600

kump gravatar image

On a ROS core I run a Gazebo simulation, so the use_sim_time parameter is set to true. And I'm also running a subscriber and publisher node written in python and I need the callback function to keep working even after the simulation was paused.

As I understand, if I use rospy.spin() method, the node works only as long as the simulation is running. The issue is I want to use information provided by this node to unpause the simulation once it was paused, so I need this node to run and recieve the messages even during the time the simulation is paused.

How can I achieve this?

edit retag flag offensive close merge delete