diff --git a/src/motion_creator.py b/src/motion_creator.py index 8c7e4f4..df3bbc6 100755 --- a/src/motion_creator.py +++ b/src/motion_creator.py @@ -5,6 +5,7 @@ import rospy from geometry_msgs.msg import Twist from rospy import Rate +import time class Robot: @@ -86,9 +87,9 @@ def shutdown(self): def run(self): r = Rate(self.rate, reset=self._reset) - print self.rate counter = 0 + # s_time = time.time() while not rospy.core.is_shutdown() and not self._shutdown: if self._shutdown: @@ -107,6 +108,8 @@ def run(self): break raise + # print self._period, time.time() - s_time + class SystemTasks: def __init__(self, robot_groups): @@ -128,7 +131,7 @@ def add_task(self, seconds, robot_group, robot_id=None, stop=False, **vel_comman self.add_task(0, robot_group, robot_id=robot_id) def run(self): - rate = Rate(1) + rate = Rate(10) while not rospy.is_shutdown() and len(self.tasks) > 0: for key, robot_tasks in self.tasks.items():