41 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
55 double stiffness = 5.0,
56 double weight = 1000.0,
57 bool showTarget =
true,
58 bool showPose =
true);
80 double stiffness = 5.0,
81 double weight = 1000.0,
82 bool showTarget =
true,
83 bool showPose =
true);
144 if((maxLinearVel.array() <= 0.).any())
150 maxLinearVel_ = maxLinearVel;
154 const Eigen::Vector3d &
maxLinearVel() const noexcept {
return maxLinearVel_; }
159 if((maxAngularVel.array() <= 0.).any())
165 maxAngularVel_ = maxAngularVel;
169 const Eigen::Vector3d &
maxAngularVel() const noexcept {
return maxAngularVel_; }
199 Eigen::Vector3d maxAngularVel_ = {0.1, 0.1, 0.1};
200 Eigen::Vector3d maxLinearVel_ = {0.1, 0.1, 0.1};
202 double velFilterGain_ = 0.8;
214 bool showTarget_ =
true;
215 bool showPose_ =
true;
#define MC_TASKS_DLLAPI
Definition: api.h:50
double clamp(double value, double lower, double upper)
Definition: clamp.h:29
void error(const S &format, Args &&... args)
Definition: logging.h:65
Definition: StabilizerStandingState.h:12
ForceVec< double > ForceVecd
MotionVec< double > MotionVecd
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:88
Hybrid position-force control on a contacting end-effector.
Definition: AdmittanceTask.h:39
void reset() override
Reset the task.
void load(mc_solver::QPSolver &solver, const mc_rtc::Configuration &config) override
Load parameters from a Configuration object.
void maxAngularVel(const Eigen::Vector3d &maxAngularVel)
Set the maximum angular velocity of the task.
Definition: AdmittanceTask.h:157
sva::PTransformd surfacePose() const
Get the current pose of the control frame in the inertial frame.
Definition: AdmittanceTask.h:107
AdmittanceTask(const std::string &robotSurface, const mc_rbdyn::Robots &robots, unsigned robotIndex, double stiffness=5.0, double weight=1000.0, bool showTarget=true, bool showPose=true)
Initialize a new admittance task.
void velFilterGain(double gain)
Set the gain of the low-pass filter on the reference velocity.
Definition: AdmittanceTask.h:175
void refVelB(const sva::MotionVecd &velB)
Set the reference body velocity.
Definition: AdmittanceTask.h:193
void addToGUI(mc_rtc::gui::StateBuilder &gui) override
sva::PTransformd targetPose()
Get the target pose of the control frame in the world frame.
Definition: AdmittanceTask.h:110
void admittance(const sva::ForceVecd &admittance)
Set the admittance coefficients of the task.
Definition: AdmittanceTask.h:104
void maxLinearVel(const Eigen::Vector3d &maxLinearVel)
Set the maximum translation velocity of the task.
Definition: AdmittanceTask.h:142
void addToSolver(mc_solver::QPSolver &solver) override
void targetPose(const sva::PTransformd &X_0_target)
Set target pose (position and orientation) of the frame in the world frame.
Definition: AdmittanceTask.h:117
void targetWrench(const sva::ForceVecd &wrench)
Set the target wrench in the control frame.
Definition: AdmittanceTask.h:136
const sva::ForceVecd & admittance() const
Get the admittance coefficients of the task.
Definition: AdmittanceTask.h:97
sva::PTransformd poseError()
Transform from current frame pose to target.
Definition: AdmittanceTask.h:120
sva::ForceVecd measuredWrench() const
Get the measured wrench in the control frame.
Definition: AdmittanceTask.h:139
void addToLogger(mc_rtc::Logger &logger) override
EIGEN_MAKE_ALIGNED_OPERATOR_NEW AdmittanceTask(const mc_rbdyn::RobotFrame &frame, double stiffness=5.0, double weight=1000.0, bool showTarget=true, bool showPose=true)
Initialize a new admittance task.
double timestep_
Definition: AdmittanceTask.h:201
const Eigen::Vector3d & maxLinearVel() const noexcept
Definition: AdmittanceTask.h:154
const sva::ForceVecd & targetWrench() const
Get the target wrench in the control frame.
Definition: AdmittanceTask.h:123
void update(mc_solver::QPSolver &) override
Update the task.
void targetWrenchW(const sva::ForceVecd &wrenchW)
Set the target wrench in world frame.
Definition: AdmittanceTask.h:129
const Eigen::Vector3d & maxAngularVel() const noexcept
Definition: AdmittanceTask.h:169
double velFilterGain() const noexcept
Return the gain of the low-pass filter on the reference velocity.
Definition: AdmittanceTask.h:178