Skip to content

Commit

Permalink
[ImpedanceTask] Allow to set the limits of deltaComp from the task co…
Browse files Browse the repository at this point in the history
…nfigurations.
  • Loading branch information
mmurooka committed May 23, 2024
1 parent 418f74f commit 655c717
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/mc_tasks/ImpedanceTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,30 @@ void ImpedanceTask::load(mc_solver::QPSolver & solver, const mc_rtc::Configurati
if(config.has("gains")) { gains_ = config("gains"); }
if(config.has("wrench")) { targetWrench(config("wrench")); }
if(config.has("cutoffPeriod")) { cutoffPeriod(config("cutoffPeriod")); }
if(config.has("deltaCompPoseLinLimit"))
{
deltaCompPoseLinLimit_ = std::max(static_cast<double>(config("deltaCompPoseLinLimit")), 0.0);
}
if(config.has("deltaCompPoseAngLimit"))
{
deltaCompPoseAngLimit_ = std::max(static_cast<double>(config("deltaCompPoseAngLimit")), 0.0);
}
if(config.has("deltaCompVelLinLimit"))
{
deltaCompVelLinLimit_ = std::max(static_cast<double>(config("deltaCompVelLinLimit")), 0.0);
}
if(config.has("deltaCompVelAngLimit"))
{
deltaCompVelAngLimit_ = std::max(static_cast<double>(config("deltaCompVelAngLimit")), 0.0);
}
if(config.has("deltaCompAccelLinLimit"))
{
deltaCompAccelLinLimit_ = std::max(static_cast<double>(config("deltaCompAccelLinLimit")), 0.0);
}
if(config.has("deltaCompAccelAngLimit"))
{
deltaCompAccelAngLimit_ = std::max(static_cast<double>(config("deltaCompAccelAngLimit")), 0.0);
}
TransformTask::load(solver, config);
// The TransformTask::load function above only sets
// the TrajectoryTaskGeneric's target, but not the compliance target, so we
Expand Down

0 comments on commit 655c717

Please sign in to comment.