Esempio n. 1
0
    def test_send_two_goals_parallel(self):
        timer1 = TimerGoal()
        timer2 = TimerGoal()
        timer1.duration = 1.0
        timer2.duration = 1.0

        start = time.time()
        # Send both goals
        gh1 = self.client.send_goal(timer1)
        gh2 = self.client.send_goal(timer2)
        result1 = self.client.wait_for_result(
            gh1, timeout=rospy.Duration.from_sec(1.1))
        result2 = self.client.wait_for_result(
            gh2, timeout=rospy.Duration.from_sec(1.1))
        end = time.time()
        duration = end - start

        self.assertEqual(result1, True)
        self.assertEqual(result2, True)
Esempio n. 2
0
 def test_is_tracking_goal(self):
     timer = TimerGoal()
     timer.duration = 0.1
     gh1 = self.client.send_goal(timer)
     tracking = self.client.is_tracking_goal(gh1)
     self.assertEqual(tracking, True)
Esempio n. 3
0
 def test_get_goal_id(self):
     timer = TimerGoal()
     timer.duration = 0.1
     gh1 = self.client.send_goal(timer)
     goal_id = self.client.goal_id(gh1)
     self.assertIsNotNone(goal_id)