17#ifndef __tsid_python_measured_6d_wrench_hpp__ 18#define __tsid_python_measured_6d_wrench_hpp__ 23#include "pinocchio/multibody/data.hpp" 27namespace bp = boost::python;
29template <
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) {
82 Measured6dWrench& self, pinocchio::Data& data) {
83 return self.computeJointTorques(data);
88 Measured6dWrench& self,
const typename Measured6dWrench::Vector6& fext) {
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)
Definition constraint-bound.hpp:26
Definition constraint-bound.hpp:25
Definition measured-6d-wrench.hpp:32
void visit(PyClass &cl) const
Definition measured-6d-wrench.hpp:34
static void setName(Measured6dWrench &self, const std::string &name)
Definition measured-6d-wrench.hpp:76
static Measured6dWrench::Vector computeJointTorques(Measured6dWrench &self, pinocchio::Data &data)
Definition measured-6d-wrench.hpp:81
static std::string getName(Measured6dWrench &self)
Definition measured-6d-wrench.hpp:73
static void useLocalFrame(Measured6dWrench &self, bool local_frame)
Definition measured-6d-wrench.hpp:99
static void setMeasuredContactForce(Measured6dWrench &self, const typename Measured6dWrench::Vector6 &fext)
Definition measured-6d-wrench.hpp:87
static Measured6dWrench::Vector6 getMeasuredContactForce(Measured6dWrench &self)
Definition measured-6d-wrench.hpp:93
static void expose(const std::string &class_name)
Definition measured-6d-wrench.hpp:104