5 #ifndef __pinocchio_python_joints_variant_hpp__ 6 #define __pinocchio_python_joints_variant_hpp__ 8 #include <boost/algorithm/string/replace.hpp> 10 #include <boost/python.hpp> 12 #include "pinocchio/multibody/joint/joint-collection.hpp" 26 std::string className = boost::replace_all_copy(T::classname(),
"<",
"_");
27 boost::replace_all(className,
">",
"");
31 template<
typename VariantType>
34 static result_type
convert(VariantType
const & jv)
42 return boost::python::incref(boost::python::object(t).ptr());
52 bp::class_<T>(sanitizedClassname<T>().c_str(),
53 sanitizedClassname<T>().c_str(),
58 bp::implicitly_convertible<T,pinocchio::JointData>();
67 expose_joint_model<T>(
68 bp::class_<T>(sanitizedClassname<T>().c_str(),
69 sanitizedClassname<T>().c_str(),
74 bp::implicitly_convertible<T,pinocchio::JointModel>();
82 #endif // ifndef __pinocchio_python_joints_variant_hpp__
std::string sanitizedClassname()
static result_type convert(VariantType const &jv)
Set the Python method str and repr to use the overloading operator<<.
void def(const char *name, Func func)
Main pinocchio namespace.
result_type operator()(T const &t) const