# Revision history [back]

### Resetting gazebo simulation gives problems

Hi all,

I am try to perform quadcoptor simulation using the hector_quadcoptor package. I am trying to reset the simulation after after the quad falls down. Resetting the simulation is successful but it requires a lot of time for the messages to be published on topics after the reset.

The code snippet below shows the function where I am calling the services.

def resetSim(self):
rospy.wait_for_service('/gazebo/reset_world')
rospy.wait_for_service('/gazebo/reset_simulation')
try:
self.reset_proxy()
except rospy.ServiceException as e:
print ("/gazebo/reset_simulation service call failed")


Following is the node snippet where I am waiting for messages from some topics:

    while poseData is None:
try:
# poseData = rospy.wait_for_message('/ground_truth_to_tf/pose', PoseStamped, timeout=5)
poseData = rospy.wait_for_message('/ground_truth/state', Odometry, timeout=5)
except: