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)
def setUp(self): self.limits = Limits(0, 1, 2, 3, 4, 5)
def test_unequal_operator_5(self): # fifth entry different self.assertNotEqual(self.limits, Limits(0, 1, 2, 3, 5, 5))
def test_unequal_operator(self): # sixth entry different self.assertNotEqual(self.limits, Limits(0, 1, 2, 3, 4, 6))
def test_unequal_operator_4(self): # fourth entry different self.assertNotEqual(self.limits, Limits(0, 1, 2, 4, 4, 5))
def test_unequal_operator_3(self): # third entry different self.assertNotEqual(self.limits, Limits(0, 1, 3, 3, 4, 5))
def test_unequal_operator_2(self): # second entry different self.assertNotEqual(self.limits, Limits(0, 2, 2, 3, 4, 5))
def test_unequal_operator_1(self): # first entry different self.assertNotEqual(self.limits, Limits(1, 1, 2, 3, 4, 5))
def test_equal_operator(self): self.assertEqual(self.limits, Limits(0, 1, 2, 3, 4, 5))