Skip to content

Commit

Permalink
added init for each possible child class of contact base in the bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcostanzi committed Jan 7, 2025
1 parent c27be4b commit eb03d05
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/tsid/bindings/python/tasks/task-contact-force-equality.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ struct TaskContactForceEqualityPythonVisitor
contacts::ContactBase &>((bp::arg("name"), bp::arg("robot"),
bp::arg("dt"), bp::arg("contact")),
"Default Constructor"))
.def(
bp::init<std::string, robots::RobotWrapper &, double,
contacts::Contact6d &>((bp::arg("name"), bp::arg("robot"),
bp::arg("dt"), bp::arg("contact")),
"Constructor with Contact6d"))
.def(
bp::init<std::string, robots::RobotWrapper &, double,
contacts::ContactPoint &>((bp::arg("name"), bp::arg("robot"),
bp::arg("dt"), bp::arg("contact")),
"Constructor with ContactPoint"))
.def(
bp::init<std::string, robots::RobotWrapper &, double,
contacts::ContactTwoFramePositions &>((bp::arg("name"), bp::arg("robot"),
bp::arg("dt"), bp::arg("contact")),
"Constructor with ContactTwoFramePositions"))
.add_property("dim", &TaskContactForceEquality::dim,
"return dimension size")
.def("setReference",
Expand Down
3 changes: 3 additions & 0 deletions include/tsid/tasks/task-contact-force-equality.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#include "tsid/trajectories/trajectory-base.hpp"
#include "tsid/math/constraint-equality.hpp"
#include "tsid/contacts/contact-base.hpp"
#include "tsid/contacts/contact-6d.hpp"
#include "tsid/contacts/contact-point.hpp"
#include "tsid/contacts/contact-two-frame-positions.hpp"

namespace tsid {
namespace tasks {
Expand Down

0 comments on commit eb03d05

Please sign in to comment.