Verified Commit 34e63e97 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

python: expose operator{==,!=} for joints

parent 1d2d3130
//
// Copyright (c) 2015-2020 CNRS INRIA
// Copyright (c) 2015-2021 CNRS INRIA
//
#ifndef __pinocchio_python_joint_variants_hpp__
......@@ -34,6 +34,9 @@ namespace pinocchio
.add_property("nv",&get_nv)
.def("setIndexes",&JointModelDerived::setIndexes)
.def("shortname",&JointModelDerived::shortname)
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
}
......@@ -72,6 +75,9 @@ namespace pinocchio
.add_property("Dinv",&get_Dinv)
.add_property("UDinv",&get_UDinv)
.def("shortname",&JointDataDerived::shortname)
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
}
......
......@@ -33,6 +33,9 @@ namespace pinocchio
.add_property("nv",&getNv)
.def("setIndexes",&JointModel::setIndexes)
.def("shortname",&JointModel::shortname)
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
}
......
......@@ -114,7 +114,7 @@ namespace pinocchio
}
template<>
inline bp::class_<JointModelComposite>& expose_joint_model<JointModelComposite> (bp::class_<JointModelComposite> & cl)
bp::class_<JointModelComposite> & expose_joint_model<JointModelComposite>(bp::class_<JointModelComposite> & cl)
{
return cl
.def(bp::init<const size_t> (bp::args("self","size"),
......@@ -142,6 +142,10 @@ namespace pinocchio
"Add a joint to the vector of joints."
)[bp::return_internal_reference<>()]
)
.def(bp::self == bp::self)
.def(bp::self != bp::self)
;
}
} // namespace python
......
Markdown is supported
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