contact-phase.hpp
Go to the documentation of this file.
1 // Copyright (c) 2015-2018, CNRS
2 // Authors: Justin Carpentier <jcarpent@laas.fr>
3 
4 #ifndef __multicontact_api_python_scenario_contact_phase_hpp__
5 #define __multicontact_api_python_scenario_contact_phase_hpp__
6 
7 #include <pinocchio/fwd.hpp>
8 // Include pinocchio before everything else
9 #include <ndcurves/python/python_definitions.h>
10 
11 #include <boost/python/suite/indexing/map_indexing_suite.hpp>
12 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
13 #include <eigenpy/eigenpy.hpp>
14 #include <typeinfo>
15 
19 
20 namespace multicontact_api {
21 namespace python {
22 
23 namespace bp = boost::python;
24 
25 template <typename ContactPhase>
27  : public bp::def_visitor<ContactPhasePythonVisitor<ContactPhase> > {
28  typedef typename ContactPhase::Scalar Scalar;
30  typedef typename ContactPhase::SE3 SE3;
31  typedef typename ContactPhase::t_strings t_strings;
32  typedef typename ContactPhase::curve_ptr curve_ptr;
33  typedef typename ContactPhase::curve_SE3_ptr curve_SE3_ptr;
34  typedef typename ContactPhase::point3_t point3_t;
35  typedef typename ContactPhase::point6_t point6_t;
36  typedef typename ContactPhase::pointX_t pointX_t;
37  typedef ndcurves::t_pointX_t t_pointX_t;
38  typedef ndcurves::t_time_t t_time_t;
39  typedef ndcurves::pointX_list_t pointX_list_t;
40  typedef ndcurves::time_waypoints_t time_waypoints_t;
41 
42  // call macro for all ContactPhase methods that can be overloaded
44  ContactPhase::isConsistent, 0, 1)
45 
46  template <class PyClass>
47  void visit(PyClass& cl) const {
48  cl.def(bp::init<>(bp::arg(""), "Default constructor."))
49  .def(bp::init<Scalar, Scalar>(bp::args("t_init", "t_final"),
50  "Constructor with time interval."))
51  .def(bp::init<ContactPhase>(bp::arg("other"), "Copy contructor."))
52  .add_property("timeInitial", &getTimeInitial, &setTimeInitial,
53  "The time at the begining of this contact phase.")
54  .add_property("timeFinal", &getTimeFinal, &setTimeFinal,
55  "The time at the end of this contact phase.")
56  .add_property("duration", &getDuration, &setDuration,
57  "The duration this contact phase.")
58  // expose public members :
59  .add_property(
60  "c_init",
61  bp::make_getter(&ContactPhase::m_c_init,
62  bp::return_value_policy<bp::return_by_value>()),
63  bp::make_setter(&ContactPhase::m_c_init),
64  "Initial 3D position of the center of mass for this contact phase")
65  .add_property(
66  "dc_init",
67  bp::make_getter(&ContactPhase::m_dc_init,
68  bp::return_value_policy<bp::return_by_value>()),
69  bp::make_setter(&ContactPhase::m_dc_init),
70  "Initial linear velocity of the center of mass for this contact "
71  "phase")
72  .add_property(
73  "ddc_init",
74  bp::make_getter(&ContactPhase::m_ddc_init,
75  bp::return_value_policy<bp::return_by_value>()),
76  bp::make_setter(&ContactPhase::m_ddc_init),
77  "Initial linear acceleration of the center of mass for this "
78  "contact phase")
79  .add_property(
80  "L_init",
81  bp::make_getter(&ContactPhase::m_L_init,
82  bp::return_value_policy<bp::return_by_value>()),
83  bp::make_setter(&ContactPhase::m_L_init),
84  "Initial angular momentum for this contact phase")
85  .add_property(
86  "dL_init",
87  bp::make_getter(&ContactPhase::m_dL_init,
88  bp::return_value_policy<bp::return_by_value>()),
89  bp::make_setter(&ContactPhase::m_dL_init),
90  "Initial angular momentum derivative for this contact phase")
91  .add_property(
92  "q_init",
93  bp::make_getter(&ContactPhase::m_q_init,
94  bp::return_value_policy<bp::return_by_value>()),
95  bp::make_setter(&ContactPhase::m_q_init),
96  "Initial whole body configuration of this phase")
97  .add_property(
98  "c_final",
99  bp::make_getter(&ContactPhase::m_c_final,
100  bp::return_value_policy<bp::return_by_value>()),
101  bp::make_setter(&ContactPhase::m_c_final),
102  "Final 3D position of the center of mass for this contact phase")
103  .add_property(
104  "dc_final",
105  bp::make_getter(&ContactPhase::m_dc_final,
106  bp::return_value_policy<bp::return_by_value>()),
107  bp::make_setter(&ContactPhase::m_dc_final),
108  "Final linear velocity of the center of mass for this contact "
109  "phase")
110  .add_property(
111  "ddc_final",
112  bp::make_getter(&ContactPhase::m_ddc_final,
113  bp::return_value_policy<bp::return_by_value>()),
114  bp::make_setter(&ContactPhase::m_ddc_final),
115  "Final linear acceleration of the center of mass for this contact "
116  "phase")
117  .add_property(
118  "L_final",
119  bp::make_getter(&ContactPhase::m_L_final,
120  bp::return_value_policy<bp::return_by_value>()),
121  bp::make_setter(&ContactPhase::m_L_final),
122  "Final angular momentum for this contact phase")
123  .add_property(
124  "dL_final",
125  bp::make_getter(&ContactPhase::m_dL_final,
126  bp::return_value_policy<bp::return_by_value>()),
127  bp::make_setter(&ContactPhase::m_dL_final),
128  "Final angular momentum derivative for this contact phase")
129  .add_property(
130  "q_final",
131  bp::make_getter(&ContactPhase::m_q_final,
132  bp::return_value_policy<bp::return_by_value>()),
133  bp::make_setter(&ContactPhase::m_q_final),
134  "Final whole body configuration of this phase")
135  .def_readwrite("q_t", &ContactPhase::m_q)
136  .def_readwrite("dq_t", &ContactPhase::m_dq)
137  .def_readwrite("ddq_t", &ContactPhase::m_ddq)
138  .def_readwrite("tau_t", &ContactPhase::m_tau)
139  .def_readwrite("c_t", &ContactPhase::m_c)
140  .def_readwrite("dc_t", &ContactPhase::m_dc)
141  .def_readwrite("ddc_t", &ContactPhase::m_ddc)
142  .def_readwrite("L_t", &ContactPhase::m_L)
143  .def_readwrite("dL_t", &ContactPhase::m_dL)
144  .def_readwrite("wrench_t", &ContactPhase::m_wrench)
145  .def_readwrite("zmp_t", &ContactPhase::m_zmp)
146  .def_readwrite("root_t", &ContactPhase::m_root)
147  // accessor to map with key
148  .def("contactForce", &contactForcesFromKey, bp::arg("effector_name"),
149  "Return a pointer to the contact force trajectory for this "
150  "effector.\n"
151  "Throw a ValueError if the effector is not in contact.")
152  .def("contactNormalForce", &contactNormalForcesFromKey,
153  bp::arg("effector_name"),
154  "Return a pointer to the contact normal force trajectory for this "
155  "effector.\n"
156  "Throw a ValueError if the effector is not in contact.")
157  .def("effectorTrajectory", &effectorTrajectoriesFromKey,
158  bp::arg("effector_name"),
159  "Return a pointer to the effector trajectory (in SE3) for this "
160  "effector.\n"
161  "Throw a ValueError if the effector is in contact.")
162  .def("contactPatch", &contactPatchFromKey, bp::arg("effector_name"),
163  bp::return_internal_reference<>(),
164  "Return the ContactPatch object for this effector.\n"
165  "Throw a ValueError if the effector is not in contact.")
166  // Bindings of the maps:
167  .def("contactPatches", &contactPatchesAsDict,
168  "Return a CONST dict EffectorName:ContactPatch")
169  .def("contactForces", &contactForcesAsDict,
170  "Return a CONST dict EffectorName:contact force")
171  .def("contactNormalForces", &contactNormalForcesAsDict,
172  "Return a CONST dict EffectorName:contact normal force")
173  .def("effectorTrajectories", &effectorTrajectoriesAsDict,
174  "Return a CONST dict EffectorName:effector trajectory")
175  // adding trajectory to map :
176  .def("addContactForceTrajectory",
177  &ContactPhase::addContactForceTrajectory,
178  bp::args("effector_name", "trajectory"),
179  "Add a trajectory to the map of contact forces.\n"
180  "If a trajectory already exist for this effector, it is "
181  "overwritted.\n"
182  "Throw invalid_argument if eeName is not defined in contact for "
183  "this phase.\n"
184  "Return false if a trajectory already existed (and have been "
185  "overwrited) true otherwise.")
186  .def("addContactNormalForceTrajectory",
187  &ContactPhase::addContactNormalForceTrajectory,
188  bp::args("effector_name", "trajectory"),
189  "Add a trajectory to the map of contact normal forces.\n"
190  "If a trajectory already exist for this effector, it is "
191  "overwritted.\n"
192  "Throw a ValueError if eeName is not defined in contact for this "
193  "phase.\n"
194  "Throw a ValueError if trajectory is not of dimension 1.\n"
195  "Return false if a trajectory already existed (and have been "
196  "overwrited) true otherwise.")
197  .def("addEffectorTrajectory", &ContactPhase::addEffectorTrajectory,
198  bp::args("effector_name", "trajectory"),
199  "Add a trajectory to the map of effector trajectories.\n"
200  "If a trajectory already exist for this effector, it is "
201  "overwritted.\n"
202  "Throw a ValueError if eeName is defined in contact for this "
203  "phase.\n"
204  "Return false if a trajectory already existed (and have been "
205  "overwrited) true otherwise.")
206  // contacts
207  .def("addContact", &ContactPhase::addContact,
208  bp::args("effector_name", "patch"),
209  "Add a new contact patch for effector_name to this contact phase\n"
210  "If a contact phase already exist for this effector, it is "
211  "overwritted.\n"
212  "If an end effector trajectory exist for this contact, it is "
213  "removed.\n"
214  "Return false if a contact for this effector already existed (and "
215  "have been overwrited) true otherwise.")
216  .def("removeContact", &ContactPhase::removeContact,
217  bp::arg("effector_name"),
218  "Remove the contact for effector_name.\n"
219  "This will also remove the contact_patch, all the contact_forces "
220  "and contact_normal_forces related to "
221  "this contact.\n"
222  "Return true if the effector was in contact, false otherwise")
223  .def("numContacts", &ContactPhase::numContacts,
224  "Returns the number of active contacts.")
225  .def("isEffectorInContact", &ContactPhase::isEffectorInContact,
226  bp::arg("effector_name"),
227  "Returns True if the given effector_name is in contact for this "
228  "phase, False otherwise.")
229  .def("effectorsInContact", &effectorsInContactAsList,
230  "Returns the names of the effectors in contact.")
231  .def("effectorHaveAtrajectory", &ContactPhase::effectorHaveAtrajectory,
232  bp::arg("effector_name"),
233  "Returns True if the given effector_name have an "
234  "effector_trajectory defined in this phase, False "
235  "otherwise.")
236  .def("effectorsWithTrajectory", &effectorsWithTrajectoryAsList,
237  "Returns the names of the effectors for which an end effector "
238  "trajectory have been defined in this phase.")
239  .def("isConsistent", &ContactPhase::isConsistent,
240  isConsistent_overloads(bp::arg("throw_if_invalid"),
241  "isConsistent check if all the members of "
242  "the phase are consistent together.\n"
243  "if throw_if_invalid == True it raise an "
244  "error instead of returning False."))
245  .def("getContactsBroken", &getContactsBrokenAsList, bp::arg("to"),
246  "return the list of effectors in contact in '*this' but not in "
247  "contact in 'to'")
248  .def("getContactsCreated", &getContactsCreatedAsList, bp::arg("to"),
249  "getContactsCreated return the list of effectors in contact in "
250  "'to' but not in contact in '*this'")
251  .def("getContactsRepositioned", &getContactsRepositionedAsList,
252  bp::arg("to"),
253  "return the list of effectors in contact both in 'to' and '*this' "
254  "but not at the same placement")
255  .def("getContactsVariations", &getContactsVariationsAsList,
256  bp::arg("to"),
257  "return the list of all the effectors whose contacts differ "
258  "between *this and to")
259  .def("setCOMtrajectoryFromPoints", &setCOMtrajectoryFromPoints,
260  bp::args("COM_positions", "COM_velocities", "COM_accelerations",
261  "times"),
262  "set the c,dc and ddc curves from a list of discrete"
263  "COM positions, velocity and accelerations.\n"
264  "The trajectories are build with first order polynomials "
265  "connecting each discrete points given.\n"
266  "This method also set the initial/final values for c, dc and ddc "
267  "from the first and last discrete point "
268  "given.")
269  .def("setAMtrajectoryFromPoints", &setAMtrajectoryFromPoints,
270  bp::args("AM_values", "AM_derivatives", "times"),
271  "set the L and d_L curves from a list of discrete Angular "
272  "velocity values and their derivatives.\n"
273  "The trajectories are build with first order polynomials "
274  "connecting each discrete points given.\n"
275  "This method also set the initial/final values for L, and dL from "
276  "the first and last discrete point "
277  "given.")
278  .def("setJointsTrajectoryFromPoints", &setJointsTrajectoryFromPoints,
279  bp::args("Joints_poisitions", "Joints_velocities",
280  "Joints_accelerations", "times"),
281  "set the q,dq and ddq curves from a list of discrete joints "
282  "positions, velocity and accelerations."
283  "The trajectories are build with first order polynomials "
284  "connecting each discrete points given.\n"
285  "This method also set initial/final values for q from the first "
286  "and last discrete point given.\n")
287  .def(bp::self == bp::self)
288  .def(bp::self != bp::self)
289  .def("copy", &copy, "Returns a copy of *this.");
290  }
291 
292  static void expose(const std::string& class_name) {
293  std::string doc = "Contact Phase";
294  bp::class_<ContactPhase>(class_name.c_str(), doc.c_str(), bp::no_init)
298 
299  ENABLE_SPECIFIC_MATRIX_TYPE(point3_t);
300  ENABLE_SPECIFIC_MATRIX_TYPE(point6_t);
301  ENABLE_SPECIFIC_MATRIX_TYPE(pointX_t);
302  }
303 
304  protected:
305  // define getter and setter (because they are overloaded in c++)
307  return self.timeInitial();
308  }
309  static void setTimeInitial(ContactPhase& self, const Scalar& time) {
310  self.timeInitial(time);
311  }
312  static Scalar getTimeFinal(ContactPhase& self) { return self.timeFinal(); }
313  static void setTimeFinal(ContactPhase& self, const Scalar& time) {
314  self.timeFinal(time);
315  }
316  static Scalar getDuration(ContactPhase& self) { return self.duration(); }
317  static void setDuration(ContactPhase& self, const Scalar& time) {
318  self.duration(time);
319  }
320 
321  // accessor to map with key:
323  const std::string& eeName) {
324  return self.contactForces(eeName);
325  }
327  const std::string& eeName) {
328  return self.contactNormalForces(eeName);
329  }
331  const std::string& eeName) {
332  return self.effectorTrajectories(eeName);
333  }
335  const std::string& eeName) {
336  return self.contactPatch(eeName);
337  }
338 
339  // Converts a C++ vector to a python list
340  // Note : lot of overhead, should not be used for large vector and/or
341  // operations called frequently. prefer the direct bindings with
342  // std_vector_strings for this cases.
343  template <class T>
344  static bp::list toPythonList(std::vector<T> vector) {
345  typename std::vector<T>::const_iterator iter;
346  boost::python::list list;
347  for (iter = vector.begin(); iter != vector.end(); ++iter) {
348  list.append(*iter);
349  }
350  return list;
351  }
352  static bp::list effectorsInContactAsList(ContactPhase& self) {
353  return toPythonList<std::string>(self.effectorsInContact());
354  }
356  return toPythonList<std::string>(self.effectorsWithTrajectory());
357  }
358  static bp::list getContactsBrokenAsList(ContactPhase& self,
359  const ContactPhase& to) {
360  return toPythonList<std::string>(self.getContactsBroken(to));
361  }
362  static bp::list getContactsCreatedAsList(ContactPhase& self,
363  const ContactPhase& to) {
364  return toPythonList<std::string>(self.getContactsCreated(to));
365  }
367  const ContactPhase& to) {
368  return toPythonList<std::string>(self.getContactsRepositioned(to));
369  }
371  const ContactPhase& to) {
372  return toPythonList<std::string>(self.getContactsVariations(to));
373  }
374 
375  // Converts a C++ map to a python dict
376  // Note : lot of overhead, should not be used for large map and/or operations
377  // called frequently. prefer the direct bindings with std_map_* for this
378  // cases.
379  template <class T>
380  static bp::dict toPythonDict(std::map<std::string, T> map) {
381  typename std::map<std::string, T>::const_iterator iter;
382  bp::dict dict;
383  for (iter = map.begin(); iter != map.end(); ++iter) {
384  dict[iter->first] = iter->second;
385  }
386  return dict;
387  }
388 
389  static bp::dict contactPatchesAsDict(ContactPhase& self) {
390  return toPythonDict<ContactPatch>(self.contactPatches());
391  }
392  static bp::dict contactForcesAsDict(ContactPhase& self) {
393  return toPythonDict<curve_ptr>(self.contactForces());
394  }
395  static bp::dict contactNormalForcesAsDict(ContactPhase& self) {
396  return toPythonDict<curve_ptr>(self.contactNormalForces());
397  }
398  static bp::dict effectorTrajectoriesAsDict(ContactPhase& self) {
399  return toPythonDict<curve_SE3_ptr>(self.effectorTrajectories());
400  }
401 
403  ContactPhase& self, const pointX_list_t& points,
404  const pointX_list_t& points_derivative,
405  const pointX_list_t& points_second_derivative,
406  const time_waypoints_t& time_points) {
407  t_pointX_t points_list =
408  ndcurves::vectorFromEigenArray<pointX_list_t, t_pointX_t>(points);
409  t_pointX_t points_derivative_list =
410  ndcurves::vectorFromEigenArray<pointX_list_t, t_pointX_t>(
411  points_derivative);
412  t_pointX_t points_second_derivative_list =
413  ndcurves::vectorFromEigenArray<pointX_list_t, t_pointX_t>(
414  points_second_derivative);
415  t_time_t time_points_list =
416  ndcurves::vectorFromEigenVector<time_waypoints_t, t_time_t>(
417  time_points);
418  self.setCOMtrajectoryFromPoints(points_list, points_derivative_list,
419  points_second_derivative_list,
420  time_points_list);
421  return;
422  }
423 
425  ContactPhase& self, const pointX_list_t& points,
426  const pointX_list_t& points_derivative,
427  const pointX_list_t& points_second_derivative,
428  const time_waypoints_t& time_points) {
429  t_pointX_t points_list =
430  ndcurves::vectorFromEigenArray<pointX_list_t, t_pointX_t>(points);
431  t_pointX_t points_derivative_list =
432  ndcurves::vectorFromEigenArray<pointX_list_t, t_pointX_t>(
433  points_derivative);
434  t_pointX_t points_second_derivative_list =
435  ndcurves::vectorFromEigenArray<pointX_list_t, t_pointX_t>(
436  points_second_derivative);
437  t_time_t time_points_list =
438  ndcurves::vectorFromEigenVector<time_waypoints_t, t_time_t>(
439  time_points);
440  self.setJointsTrajectoryFromPoints(points_list, points_derivative_list,
441  points_second_derivative_list,
442  time_points_list);
443  return;
444  }
445 
447  const pointX_list_t& points,
448  const pointX_list_t& points_derivative,
449  const time_waypoints_t& time_points) {
450  t_pointX_t points_list =
451  ndcurves::vectorFromEigenArray<pointX_list_t, t_pointX_t>(points);
452  t_pointX_t points_derivative_list =
453  ndcurves::vectorFromEigenArray<pointX_list_t, t_pointX_t>(
454  points_derivative);
455  t_time_t time_points_list =
456  ndcurves::vectorFromEigenVector<time_waypoints_t, t_time_t>(
457  time_points);
458  self.setAMtrajectoryFromPoints(points_list, points_derivative_list,
459  time_points_list);
460  return;
461  }
462 
463  static ContactPhase copy(const ContactPhase& self) {
464  return ContactPhase(self);
465  }
466 };
467 } // namespace python
468 } // namespace multicontact_api
469 
470 #endif // ifndef __multicontact_api_python_scenario_contact_phase_hpp__
ContactPhaseTpl< double > ContactPhase
Definition: fwd.hpp:22
ContactPatchTpl< double > ContactPatch
Definition: fwd.hpp:18
Definition: ellipsoid.hpp:12
static ContactPatch & contactPatchFromKey(ContactPhase &self, const std::string &eeName)
Definition: contact-phase.hpp:334
static bp::dict contactNormalForcesAsDict(ContactPhase &self)
Definition: contact-phase.hpp:395
ContactPhase::SE3 SE3
Definition: contact-phase.hpp:30
static void setDuration(ContactPhase &self, const Scalar &time)
Definition: contact-phase.hpp:317
static void setCOMtrajectoryFromPoints(ContactPhase &self, const pointX_list_t &points, const pointX_list_t &points_derivative, const pointX_list_t &points_second_derivative, const time_waypoints_t &time_points)
Definition: contact-phase.hpp:402
ContactPhase::point6_t point6_t
Definition: contact-phase.hpp:35
ContactPhase::Scalar Scalar
Definition: contact-phase.hpp:28
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(isConsistent_overloads, ContactPhase::isConsistent, 0, 1) template< class PyClass > void visit(PyClass &cl) const
Definition: contact-phase.hpp:43
static void setTimeInitial(ContactPhase &self, const Scalar &time)
Definition: contact-phase.hpp:309
ndcurves::t_time_t t_time_t
Definition: contact-phase.hpp:38
static bp::dict contactForcesAsDict(ContactPhase &self)
Definition: contact-phase.hpp:392
ndcurves::pointX_list_t pointX_list_t
Definition: contact-phase.hpp:39
static bp::list getContactsCreatedAsList(ContactPhase &self, const ContactPhase &to)
Definition: contact-phase.hpp:362
static Scalar getDuration(ContactPhase &self)
Definition: contact-phase.hpp:316
static bp::list toPythonList(std::vector< T > vector)
Definition: contact-phase.hpp:344
ContactPhase::curve_SE3_ptr curve_SE3_ptr
Definition: contact-phase.hpp:33
static bp::list getContactsVariationsAsList(ContactPhase &self, const ContactPhase &to)
Definition: contact-phase.hpp:370
ContactPhase::point3_t point3_t
Definition: contact-phase.hpp:34
static bp::list effectorsWithTrajectoryAsList(ContactPhase &self)
Definition: contact-phase.hpp:355
static Scalar getTimeFinal(ContactPhase &self)
Definition: contact-phase.hpp:312
static curve_ptr contactForcesFromKey(ContactPhase &self, const std::string &eeName)
Definition: contact-phase.hpp:322
ContactPhase::pointX_t pointX_t
Definition: contact-phase.hpp:36
static bp::dict toPythonDict(std::map< std::string, T > map)
Definition: contact-phase.hpp:380
static ContactPhase copy(const ContactPhase &self)
Definition: contact-phase.hpp:463
static void expose(const std::string &class_name)
Definition: contact-phase.hpp:292
ndcurves::t_pointX_t t_pointX_t
Definition: contact-phase.hpp:37
static bp::list getContactsRepositionedAsList(ContactPhase &self, const ContactPhase &to)
Definition: contact-phase.hpp:366
static bp::dict effectorTrajectoriesAsDict(ContactPhase &self)
Definition: contact-phase.hpp:398
static Scalar getTimeInitial(ContactPhase &self)
Definition: contact-phase.hpp:306
ContactPhase::t_strings t_strings
Definition: contact-phase.hpp:31
ContactPhase::curve_ptr curve_ptr
Definition: contact-phase.hpp:32
static void setAMtrajectoryFromPoints(ContactPhase &self, const pointX_list_t &points, const pointX_list_t &points_derivative, const time_waypoints_t &time_points)
Definition: contact-phase.hpp:446
static curve_SE3_ptr effectorTrajectoriesFromKey(ContactPhase &self, const std::string &eeName)
Definition: contact-phase.hpp:330
static void setJointsTrajectoryFromPoints(ContactPhase &self, const pointX_list_t &points, const pointX_list_t &points_derivative, const pointX_list_t &points_second_derivative, const time_waypoints_t &time_points)
Definition: contact-phase.hpp:424
static bp::list getContactsBrokenAsList(ContactPhase &self, const ContactPhase &to)
Definition: contact-phase.hpp:358
static void setTimeFinal(ContactPhase &self, const Scalar &time)
Definition: contact-phase.hpp:313
static bp::dict contactPatchesAsDict(ContactPhase &self)
Definition: contact-phase.hpp:389
static curve_ptr contactNormalForcesFromKey(ContactPhase &self, const std::string &eeName)
Definition: contact-phase.hpp:326
ContactPhase::ContactPatch ContactPatch
Definition: contact-phase.hpp:29
static bp::list effectorsInContactAsList(ContactPhase &self)
Definition: contact-phase.hpp:352
ndcurves::time_waypoints_t time_waypoints_t
Definition: contact-phase.hpp:40
Set the Python method str and repr to use the overloading operator<<.
Definition: printable.hpp:19