Skip to content

Commit

Permalink
add 6 seconds sleep to allow gazebo to start
Browse files Browse the repository at this point in the history
  • Loading branch information
marioney committed May 18, 2020
1 parent 4090303 commit 2e0f679
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/create_unknown_obstacles.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ def check_obstacle_existence(obstacle_name):
# Initialize a ROS Node
rospy.init_node('spawn_unknown_obstacles')
rospack = RosPack()

rospy.sleep(6.0)

# Read parameters
goal_nr = rospy.get_param("~goal_nr", 1)
n_osbtacles = rospy.get_param("~obstacles", 1)

if n_osbtacles == 0:
rospy.signal_shutdown(0)
rospy.loginfo("Adding obstacles: " + str(n_osbtacles))

try:
dict = load(file(rospack.get_path('metacontrol_experiments')+'/yaml/obstacle_positions_G'+ str(goal_nr) + '.yaml', 'r'))
Expand All @@ -64,7 +64,7 @@ def check_obstacle_existence(obstacle_name):
obstacle_pose_array.append(obst_pose)
except rospy.ROSInterruptException:
rospy.loginfo("Error loading yaml file")

rospy.loginfo("Adding obstacles.")

try:
Expand Down

0 comments on commit 2e0f679

Please sign in to comment.