ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Isn't /gazebo/reset_models
a service, not a topic?
2 | No.2 Revision |
Isn't /gazebo/reset_models
a service, not a topic?
I am sorry, could you please help me by telling what should I type into my for loop in order to get the model poses reset?
I don't know about "get model poses reset", but for invoking the /gazebo/reset_simulation
service, the following should work:
from std_srvs.srv import Empty
# maybe do some 'wait for service' here
reset_models = rospy.ServiceProxy('/gazebo/reset_simulation', Empty)
# invoke
reset_models()
See also the Writing a Simple Service and Client (Python) tutorial, specifically the Writing the Client Node section.
3 | No.3 Revision |
Isn't /gazebo/reset_models
a service, not a topic?
I am sorry, could you please help me by telling what should I type into my for loop in order to get the model poses reset?
I don't know about "get model poses reset", but for invoking the /gazebo/reset_simulation
service, the following should work:
import rospy
from std_srvs.srv import Empty
# maybe do some 'wait for service' here
reset_models = rospy.ServiceProxy('/gazebo/reset_simulation', Empty)
# invoke
reset_models()
See also the Writing a Simple Service and Client (Python) tutorial, specifically the Writing the Client Node section.
4 | No.4 Revision |
Isn't /gazebo/reset_models
a service, not a topic?
I am sorry, could you please help me by telling what should I type into my for loop in order to get the model poses reset?
I don't know about "get model poses reset", but for invoking the /gazebo/reset_simulation
service, the following should work:
import rospy
from std_srvs.srv import Empty
# maybe do some 'wait for service' here
reset_models reset_simulation = rospy.ServiceProxy('/gazebo/reset_simulation', Empty)
# invoke
reset_models()
reset_simulation()
See also the Writing a Simple Service and Client (Python) tutorial, specifically the Writing the Client Node section.