31 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
78 double stiffness = 5.0,
79 double weight = 1000.0);
128 targetCoP(Eigen::Vector2d::Zero());
132 const Eigen::Vector2d &
targetCoP()
const {
return targetCoP_; }
137 Eigen::Vector3d cop_s;
138 cop_s << targetCoP_, 0.;
139 sva::PTransformd X_0_s = frame_->position();
140 return X_0_s.translation() + X_0_s.rotation().transpose() * cop_s;
151 const Eigen::Vector3d &
targetForce()
const {
return targetForce_; }
166 const auto & X_0_rh = frame_->position();
167 targetForce(X_0_rh.dualMul(sva::ForceVecd(Eigen::Vector3d::Zero(), targetForceW)).force());
183 Eigen::Vector2d targetCoP_ = Eigen::Vector2d::Zero();
184 Eigen::Vector3d targetForce_ = Eigen::Vector3d::Zero();
186 bool useTargetPressure_ =
false;
#define MC_TASKS_DLLAPI
Definition: api.h:50
Definition: StabilizerStandingState.h:12
Definition: RobotFrame.h:22
Simplify access to values hold within a JSON file.
Definition: Configuration.h:166
Logs controller data to disk.
Definition: Logger.h:30
Definition: StateBuilder.h:28
Definition: QPSolver.h:86
const sva::ForceVecd & targetWrench() const
Get the target wrench in the control frame.
Definition: AdmittanceTask.h:117
void targetWrenchW(const sva::ForceVecd &wrenchW)
Set the target wrench in world frame.
Definition: AdmittanceTask.h:123
Track center-of-pressure (CoP) references at contact.
Definition: CoPTask.h:29
void reset() override
Reset the task.
Eigen::Vector3d measuredCoPW() const
Measured CoP in world frame.
Definition: CoPTask.h:120
void useTargetPressure(bool s) noexcept
Wether to compute the desired torque with the target pressure (true) of the measured one (false)
Definition: CoPTask.h:105
void addToGUI(mc_rtc::gui::StateBuilder &gui) override
const Eigen::Vector2d & targetCoP() const
Get target CoP in the control frame.
Definition: CoPTask.h:132
const sva::ForceVecd & targetWrench() const
Get target wrench in the control frame.
Definition: CoPTask.h:173
Eigen::Vector3d targetCoPW() const
Get target CoP in the world frame.
Definition: CoPTask.h:135
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CoPTask(const mc_rbdyn::RobotFrame &frame, double stiffness=5.0, double weight=1000.0)
Initialize a new CoP task.
std::function< bool(const mc_tasks::MetaTask &, std::string &)> buildCompletionCriteria(double dt, const mc_rtc::Configuration &config) const override
void addToLogger(mc_rtc::Logger &logger) override
void targetForceW(const Eigen::Vector3d &targetForceW)
Set target force in the world frame.
Definition: CoPTask.h:164
const Eigen::Vector3d & targetForce() const
Get target force in the control frame.
Definition: CoPTask.h:151
CoPTask(const std::string &robotSurface, const mc_rbdyn::Robots &robots, unsigned robotIndex, double stiffness=5.0, double weight=1000.0)
Initialize a new CoP task.
void targetCoP(const Eigen::Vector2d &targetCoP)
Set target CoP in the control frame.
Definition: CoPTask.h:148
Eigen::Vector2d measuredCoP() const
Measured CoP in target frame.
Definition: CoPTask.h:115
void load(mc_solver::QPSolver &solver, const mc_rtc::Configuration &config) override
Load parameters from a Configuration object.
bool useTargetPressure() const noexcept
Wether the computeddesired torque is done with the target pressure (true) of the measured one (false)
Definition: CoPTask.h:110
void setZeroTargetWrench()
Set targent wrench to zero.
Definition: CoPTask.h:125
void targetForce(const Eigen::Vector3d &targetForce)
Set target force in the control frame.
Definition: CoPTask.h:158
Hybrid position-force control on a contacting end-effector.
Definition: DampingTask.h:37