ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

how to call pause_physics service

asked 2013-03-24 14:39:37 -0600

mugetsu gravatar image

updated 2013-04-28 23:17:16 -0600

ipso gravatar image

i cant seem to do:


there doesn't seem to be a PausePhysics.srv anywhere under gazebo_msgs/srv

I can see that the service is running in rosservice list, and I'm using groovy.

What should I be doing instead? All I want is a way to toggle physics inside my code.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-03-26 03:02:19 -0600

gazebo/pause_physics is an Empty service (no inputs or output arguments), so doesn't need its own service definition. See this section from the wiki page:

~/pause_physics (std_srvs/Empty)
    Pause physics updates. 

~/unpause_physics (std_srvs/Empty)
    Resume physics updates.

Try this and see if it works:

from std_srvs.srv import Empty

If you need it, gazebo/unpause_physics is also an Empty service.

edit flag offensive delete link more

answered 2018-09-13 14:52:03 -0600

Markus gravatar image
from std_srvs.srv    import Empty, EmptyRequest  
edit flag offensive delete link more

Question Tools


Asked: 2013-03-24 14:39:37 -0600

Seen: 1,825 times

Last updated: Sep 13 '18