17 #ifndef __tsid_python_measured_6d_wrench_hpp__
18 #define __tsid_python_measured_6d_wrench_hpp__
23 #include "pinocchio/multibody/data.hpp"
29 template <
typename Measured6dWrench>
31 :
public boost::python::def_visitor<
32 Measured6dWrenchPythonVisitor<Measured6dWrench> > {
33 template <
class PyClass>
37 .def(
bp::init<std::string,
typename Measured6dWrench::RobotWrapper &,
39 (bp::arg(
"name"), bp::arg(
"robot"), bp::arg(
"frameName")),
40 "Constructor for Measured6dwrench"))
45 "Get or set the name of the measured-6Dwrench instance")
48 .def(
"computeJointTorques",
51 "Compute the joint torques from the measured contact force")
54 .def(
"setMeasuredContactForce",
56 bp::args(
"fext"),
"Set the measured contact force")
60 "measuredContactForce",
63 "Get the measured contact force")
67 bp::args(
"local_frame"),
68 "Specify whether to use the local frame for external force and "
73 static std::string
getName(Measured6dWrench &
self) {
return self.name(); }
76 static void setName(Measured6dWrench &
self,
const std::string &
name) {
83 return self.computeJointTorques(
data);
89 self.setMeasuredContactForce(fext);
94 Measured6dWrench &
self) {
95 return self.getMeasuredContactForce();
100 self.useLocalFrame(local_frame);
104 static void expose(
const std::string &class_name) {
105 std::string doc =
"Bindings for tsid::contacts::Measured6dwrench";
106 bp::class_<Measured6dWrench>(
class_name.c_str(), doc.c_str(), bp::no_init)
114 #endif // __tsid_python_measured_6d_wrench_hpp__