33 from std_srvs.srv
import Empty
34 from gazebo_msgs.srv
import GetPhysicsProperties, GetPhysicsPropertiesResponse
41 self.physics_properties.pause =
True 43 rospy.wait_for_service(
'/gazebo/get_physics_properties')
45 rospy.wait_for_service(
'/gazebo/unpause_physics')
49 rospy.logwarn(
"start gazebo simulation")
56 if __name__ ==
'__main__':
57 rospy.init_node(
'start_simulator', anonymous=
True)
58 rospy.logwarn(
"wait for gazebo startup")
63 while not rospy.is_shutdown()
and start_gazebo_simulator.physics_properties.pause
is True:
65 start_gazebo_simulator.call_start_simulation()
66 except Exception
as e:
67 print(
"Unexpected error:", e)
def call_start_simulation(self)
get_physics_properties_service