We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8dc188 commit 8b0fd30Copy full SHA for 8b0fd30
robot_smach_states/src/robot_smach_states/utility.py
@@ -339,6 +339,18 @@ def execute(self, userdata=None):
339
return "not_yet"
340
341
342
+class RateSleep(smach.State):
343
+ def __init__(self, rate: float):
344
+ smach.State.__init__(self, outcomes=["slept"])
345
+
346
+ check_type(rate, float, int)
347
+ self.rate = rospy.Rate(rate)
348
349
+ def execute(self, ud=None):
350
+ self.rate.sleep()
351
+ return "slept"
352
353
354
class WaitForDesignator(smach.State):
355
"""
356
Waits for a given designator to answer. It will retry to resolve the designator a given number of times, with
0 commit comments