Verified Commit dea51413 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

test/python: test shared memory

parent d85fdfb7
......@@ -111,6 +111,13 @@ class TestSE3Bindings(unittest.TestCase):
bma = amb.inverse()
self.assertTrue(np.allclose(bma.act(p), (bMa.dot(p_homogeneous))[0:3]))
def test_member(self):
M = pin.SE3.Random()
trans = M.translation
M.translation[2] = 1.
self.assertTrue(trans[2] == M.translation[2])
def test_conversions(self):
def compute (m):
tq_vec = pin.SE3ToXYZQUAT (m)
......
......@@ -33,12 +33,18 @@ class TestForceBindings(unittest.TestCase):
f.linear = lin
self.assertTrue(np.allclose(f.linear, lin))
f.linear[1] = 1.
self.assertTrue(v.linear[1] == 1.)
def test_set_angular(self):
f = pin.Force.Zero()
ang = rand(3)
f.angular = ang
self.assertTrue(np.allclose(f.angular, ang))
f.angular[1] = 1.
self.assertTrue(f.angular[1] == 1.)
def test_set_vector(self):
f = pin.Force.Zero()
vec = rand(6)
......
......@@ -33,12 +33,18 @@ class TestMotionBindings(unittest.TestCase):
v.linear = lin
self.assertTrue(np.allclose(v.linear, lin))
v.linear[1] = 1.
self.assertTrue(v.linear[1] == 1.)
def test_set_angular(self):
v = pin.Motion.Zero()
ang = rand(3)
v.angular = ang
self.assertTrue(np.allclose(v.angular, ang))
v.angular[1] = 1.
self.assertTrue(v.angular[1] == 1.)
def test_set_vector(self):
v = pin.Motion.Zero()
vec = rand(6)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment