Skip to content
Snippets Groups Projects
Commit 503309b9 authored by Valenza Florian's avatar Valenza Florian
Browse files

[Python] Updating Python tests to corresponds to the API ( e.g we add frames...

[Python] Updating Python tests to corresponds to the API ( e.g we add frames for every link and joint we encounter in urdf )
parent 0d12f01f
No related branches found
No related tags found
No related merge requests found
......@@ -24,19 +24,19 @@ class TestFrameBindings(unittest.TestCase):
robot = RobotWrapper(romeo_model_path, hint_list, se3.JointModelFreeFlyer())
def test_type_get_set(self):
f = self.robot.model.frames[1]
f = self.robot.model.frames[2]
self.assertTrue(f.type == se3.FrameType.JOINT)
f.type = se3.FrameType.BODY
self.assertTrue(f.type == se3.FrameType.BODY)
def test_name_get_set(self):
f = self.robot.model.frames[1]
f = self.robot.model.frames[2]
self.assertTrue(f.name == 'LHipYaw')
f.name = 'new_hip_frame'
self.assertTrue(f.name == 'new_hip_frame')
def test_parent_get_set(self):
f = self.robot.model.frames[1]
f = self.robot.model.frames[2]
self.assertTrue(f.parent == 2)
f.parent = 5
self.assertTrue(f.parent == 5)
......@@ -44,7 +44,7 @@ class TestFrameBindings(unittest.TestCase):
def test_placement_get_set(self):
m = se3.SE3(self.m3ones, np.array([0,0,0],np.double))
new_m = se3.SE3(rand([3,3]), rand(3))
f = self.robot.model.frames[1]
f = self.robot.model.frames[2]
self.assertTrue(np.allclose(f.placement.homogeneous, m.homogeneous))
f.placement = new_m
self.assertTrue(np.allclose(f.placement.homogeneous, new_m.homogeneous))
......
......@@ -26,7 +26,7 @@ class TestGeometryObjectBindings(unittest.TestCase):
def test_name_get_set(self):
col = self.robot.collision_model.geometryObjects[1]
self.assertTrue(col.name == 'LHipPitchLink')
self.assertTrue(col.name == 'LHipPitchLink_0')
col.name = 'new_collision_name'
self.assertTrue(col.name == 'new_collision_name')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment