CoMIncPlaneConstr.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2022 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
8 
9 #include <mc_rtc/deprecated.h>
10 
11 #include <mc_rbdyn/polygon_utils.h>
12 
13 #include <mc_rtc/void_ptr.h>
14 
15 namespace mc_solver
16 {
17 
25 {
26 public:
27  CoMIncPlaneConstr(const mc_rbdyn::Robots & robots, unsigned int robotIndex, double dt);
28 
29  void addToSolverImpl(QPSolver & solver) override;
30 
31  void removeFromSolverImpl(QPSolver & solver) override;
32 
34  void setActiveJoints(const std::vector<std::string> & joints);
35 
37  void setInactiveJoints(const std::vector<std::string> & joints);
38 
40  void resetActiveJoints();
41 
42  MC_RTC_DEPRECATED inline void set_planes(QPSolver & solver,
43  const std::vector<mc_rbdyn::Plane> & planes,
44  const std::vector<Eigen::Vector3d> & speeds = {},
45  const std::vector<Eigen::Vector3d> & normalsDots = {},
46  double iDist = 0.05,
47  double sDist = 0.01,
48  double damping = 0.1,
49  double dampingOff = 0.)
50  {
51  setPlanes(solver, planes, speeds, normalsDots, iDist, sDist, damping, dampingOff);
52  }
53 
54  void setPlanes(QPSolver & solver,
55  const std::vector<mc_rbdyn::Plane> & planes,
56  const std::vector<Eigen::Vector3d> & speeds = {},
57  const std::vector<Eigen::Vector3d> & normalsDots = {},
58  double iDist = 0.05,
59  double sDist = 0.01,
60  double damping = 0.1,
61  double dampingOff = 0.);
62 
63 private:
72  mc_rtc::void_ptr constraint_;
73 };
74 
75 } // namespace mc_solver
mc_rbdyn::Robots
Definition: Robots.h:15
void_ptr.h
ConstraintSet.h
mc_solver::QPSolver
Definition: QPSolver.h:85
polygon_utils.h
mc_solver::ConstraintSet
This class is a basis to wrap Constraint functions from Tasks. The aim of such wrappers should be two...
Definition: ConstraintSet.h:20
mc_solver::CoMIncPlaneConstr
Definition: CoMIncPlaneConstr.h:24
mc_rtc::void_ptr
std::unique_ptr< void, void(*)(void *)> void_ptr
Definition: void_ptr.h:14
mc_solver::CoMIncPlaneConstr::set_planes
MC_RTC_DEPRECATED void set_planes(QPSolver &solver, const std::vector< mc_rbdyn::Plane > &planes, const std::vector< Eigen::Vector3d > &speeds={}, const std::vector< Eigen::Vector3d > &normalsDots={}, double iDist=0.05, double sDist=0.01, double damping=0.1, double dampingOff=0.)
Definition: CoMIncPlaneConstr.h:42
deprecated.h
mc_solver
Definition: Contact.h:17
MC_SOLVER_DLLAPI
#define MC_SOLVER_DLLAPI
Definition: api.h:50