def test_interpolate_trajectories_unequal_limits(self):
     different_limits = Limits(-2, 3, 2)
     other_trajectory = JointTrajectory(self.joint_name, different_limits,
                                        self.setpoints, self.duration)
     with self.assertRaises(SubgaitInterpolationError):
         JointTrajectory.interpolate_joint_trajectories(
             self.joint_trajectory, other_trajectory, 0.5)
 def setUp(self):
     self.joint_name = "test_joint"
     self.limits = Limits(-1, 1, 2)
     self.duration = Duration(seconds=2.0)
     self.times = [Duration(), self.duration / 2.0, self.duration]
     self.setpoints = [
         Setpoint(t, 2 * t.seconds, t.seconds / 2.0) for t in self.times
     ]
     self.joint_trajectory = JointTrajectory(self.joint_name, self.limits,
                                             self.setpoints, self.duration)
示例#3
0
 def setUp(self):
     self.limits = Limits(0, 1, 2, 3, 4, 5)
示例#4
0
 def test_unequal_operator_5(self):
     # fifth entry different
     self.assertNotEqual(self.limits, Limits(0, 1, 2, 3, 5, 5))
示例#5
0
 def test_unequal_operator(self):
     # sixth entry different
     self.assertNotEqual(self.limits, Limits(0, 1, 2, 3, 4, 6))
示例#6
0
 def test_unequal_operator_4(self):
     # fourth entry different
     self.assertNotEqual(self.limits, Limits(0, 1, 2, 4, 4, 5))
示例#7
0
 def test_unequal_operator_3(self):
     # third entry different
     self.assertNotEqual(self.limits, Limits(0, 1, 3, 3, 4, 5))
示例#8
0
 def test_unequal_operator_2(self):
     # second entry different
     self.assertNotEqual(self.limits, Limits(0, 2, 2, 3, 4, 5))
示例#9
0
 def test_unequal_operator_1(self):
     # first entry different
     self.assertNotEqual(self.limits, Limits(1, 1, 2, 3, 4, 5))
示例#10
0
 def test_equal_operator(self):
     self.assertEqual(self.limits, Limits(0, 1, 2, 3, 4, 5))