1 import cpp2pybind11, sys, gc
4 a = pinocchio.SE3.Random()
5 b = pinocchio.SE3.Random()
6 assert cpp2pybind11.multiply_se3_1(a, b) == a * b
7 assert cpp2pybind11.multiply_se3(a,b) == a * b
8 assert cpp2pybind11.no_wrapper.multiply_se3(a, b) == a * b
9 assert cpp2pybind11.multiply_se3(a) == a
17 n = sys.getrefcount(v)
18 print(
"ref count of", what, idv, n)
20 m = cpp2pybind11.make_model()
22 print(cpp2pybind11.get_ptr(m))
26 cpp2pybind11.testModel1(m)
28 assert m.name.startswith(
"testModel1")
30 addr2 = cpp2pybind11.testModel2(m, 1)
32 assert m.name.startswith(
"testModel2")
34 addr3 = cpp2pybind11.testModel3(m, 2)
38 mm = cpp2pybind11.return_same_model_broken(m)
39 assert cpp2pybind11.get_ptr(m) != cpp2pybind11.get_ptr(mm)
41 mm = cpp2pybind11.return_same_model(m)
47 assert cpp2pybind11.get_ptr(m) == cpp2pybind11.get_ptr(mm)
def print_ref_count(v, what="")
JointIndex id(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdVisitor to get the index of the joint in the kinematic chain...