We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3fa6f9 commit 32d0c6fCopy full SHA for 32d0c6f
unittest/python/bindings_SE3.py
@@ -2,6 +2,7 @@
2
import pinocchio as pin
3
import numpy as np
4
from pinocchio.utils import eye,zero,rand
5
+from copy import deepcopy, copy
6
7
ones = lambda n: np.ones([n, 1] if isinstance(n, int) else n)
8
@@ -158,5 +159,17 @@ def test_several_init(self):
158
159
s = r.__str__()
160
self.assertTrue(s != '')
161
162
+ def test_copy(self):
163
+ M = pin.SE3.Random()
164
+ Mc = copy(M)
165
+ Mdc = deepcopy(M)
166
+ self.assertTrue(M == Mc)
167
+ self.assertTrue(M == Mdc)
168
+
169
+ Mc.setRandom()
170
+ self.assertFalse(M == Mc)
171
+ Mdc.setRandom()
172
173
174
if __name__ == '__main__':
175
unittest.main()
0 commit comments