WipingMixImpVelColController.cpp
Go to the documentation of this file.
1 /**
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Jianfeng Gao ( jianfeng dot gao at kit dot edu )
17  * @date 2024
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
23 
25 #include <RobotAPI/components/units/RobotUnit/RobotUnit.h> // FIXME avoid this
26 
28 
30 {
31  NJointControllerRegistration<NJointWipingMixImpVelColMPController>
33  "NJointWipingMixImpVelColMPController");
34 
36  const RobotUnitPtr& robotUnit,
37  const NJointControllerConfigPtr& config,
38  const VirtualRobot::RobotPtr& robot) :
41  {
42  ARMARX_IMPORTANT << getClassName() + " construction done";
43  }
44 
45  std::string
47  {
48  return "NJointWipingMixImpVelColMPController";
49  }
50 
51  void
54  const Ice::Current& iceCurrent)
55  {
57  {
58  for (auto& pair : limb)
59  {
60  pair.second->rtFirstRun.store(true);
61  }
62  }
63  }
64 
65  void
68  const Ice::Current& iceCurrent)
69  {
70  const auto adaptionCfg = arondto::WipingAdaptionConfigs::FromAron(dto);
71 
72  bool valid = true;
73 
74  for (auto& pair : limb)
75  {
76  auto search = adaptionCfg.cfg.find(pair.first);
77  if (search == adaptionCfg.cfg.end())
78  {
79  ARMARX_ERROR << "Arm " << pair.first << " is not included in the adaption config";
80  valid = false;
81  }
82  }
83 
84  if (valid)
85  {
86  bufferAdaptationConfigUserToNonRt.getWriteBuffer() = adaptionCfg;
87  bufferAdaptationConfigUserToNonRt.commitWrite();
88  ARMARX_INFO << "Updated adaptation config";
89 
90  adaptionReady.store(true);
91  }
92  else
93  {
94  ARMARX_ERROR << "Failed to update adaption config";
95  }
96  }
97 
98  void
100  {
103 
104  for (const auto& pair : limb)
105  {
107  status.kpImpedance = pair.second->rtConfig.kpImpedance;
108  status.kpCartesianVel = pair.second->rtConfig.kpCartesianVel;
109  status.desiredPose = pair.second->rtConfig.desiredPose;
110  adaptionStatus[pair.first] = status;
111  }
112  }
113 
114  void
116  {
117  if (not adaptionReady.load())
118  {
119  return;
120  }
121  adaptionCfg = bufferAdaptationConfigUserToNonRt.getUpToDateReadBuffer();
122 
123  std::lock_guard<std::recursive_mutex> lock(mtx_mps);
124  auto [rtTargetSafe, ftSafe] = additionalTaskUpdateStatus();
125 
126  // when ft guard is enabled and rt is not safe due to ft trigger, then we stop the corresponding mp
127  std::map<std::string, bool> flagMPToStop;
128  for (auto& pair : limb)
129  {
130  flagMPToStop[pair.first] = limb.at(pair.first)->controller.ftsensor.ftSafe.load();
131  }
132 
133  const double timeScalingFactor =
134  adaptionCfg.timeScalingFactor.has_value()
135  ? fmin(fmax(adaptionCfg.timeScalingFactor.value(), 0.25), 4.)
136  : 1.;
137 
138  const double sizeScalingFactor =
139  adaptionCfg.sizeScalingFactor.has_value() ? adaptionCfg.sizeScalingFactor.value() : 1.;
140 
141  std::map<std::string, bool> mpRunning;
142  for (auto& _mp : mps)
143  {
144  const auto mpNodeSet = _mp.second.mp->getNodeSetName();
145  auto search = flagMPToStop.find(mpNodeSet);
146  if (search != flagMPToStop.end() and flagMPToStop.at(mpNodeSet) and
147  _mp.second.mp->isRunning() and
148  (limb.at(mpNodeSet)->controller.ftsensor.isForceGuardEnabled() or
149  limb.at(mpNodeSet)->controller.ftsensor.isTorqueGuardEnabled()))
150  {
151  _mp.second.mp->stop();
152  ARMARX_INFO << "Due to force/torque safe guard, MP " << _mp.second.mp->getMPName()
153  << " is stopped at " << _mp.second.mp->getCanonicalValue();
154  }
155  mpRunning[_mp.second.mp->getMPName()] = _mp.second.mp->isRunning();
156  if (_mp.second.mp->isFinished())
157  {
158  continue;
159  }
160  if (_mp.second.mp->getRole() == "taskspace")
161  {
162  auto& arm = limb.at(_mp.second.mp->getNodeSetName());
163  if (_mp.second.mp->isFirstRun())
164  {
165  ARMARX_INFO << "checking TSMP initial status ...";
166  /// Here we check if the TSMP start pose is too far away from the current pose, if so, we would
167  /// prefer to reset the mp start from the current pose.
168  const std::vector<double> mpStart = _mp.second.mp->getStartVec();
169  const auto mpStartPose = common::dVecToMat4(mpStart);
171  arm->rtStatusInNonRT.currentPose,
172  mpStartPose,
173  "current pose",
174  "TSMP initial start pose",
175  arm->nonRtConfig.safeDistanceMMToGoal,
176  arm->nonRtConfig.safeRotAngleDegreeToGoal,
177  _mp.second.mp->getMPName() + "mp_set_target"))
178  {
180  << "-- deviation from current pose too large, reset MP start pose";
181  _mp.second.mp->validateInitialState(
182  common::mat4ToDVec(arm->rtStatusInNonRT.desiredPose));
183  }
184  ARMARX_INFO << "done";
185  }
186  mp::TSMPInputPtr in = std::dynamic_pointer_cast<mp::TSMPInput>(_mp.second.input);
187  in->pose = arm->rtStatusInNonRT.currentPose;
188  in->vel = arm->rtStatusInNonRT.currentTwist;
189  in->deltaT = arm->rtStatusInNonRT.deltaT * timeScalingFactor;
190  }
191  else if (_mp.second.mp->getRole() == "nullspace")
192  {
193  auto& arm = limb.at(_mp.second.mp->getNodeSetName());
194  mp::JSMPInputPtr in = std::dynamic_pointer_cast<mp::JSMPInput>(_mp.second.input);
195  ARMARX_CHECK_EQUAL(arm->rtStatusInNonRT.numJoints,
196  arm->rtStatusInNonRT.jointPos.size());
197  in->angleRadian = arm->rtStatusInNonRT.jointPos;
198  in->angularVel = arm->rtStatusInNonRT.qvelFiltered;
199  in->deltaT = arm->rtStatusInNonRT.deltaT * timeScalingFactor;
200  }
201  else if (_mp.second.mp->getRole() == "hand")
202  {
203  auto& hand = hands->hands.at(_mp.second.mp->getNodeSetName());
204  mp::JSMPInputPtr in = std::dynamic_pointer_cast<mp::JSMPInput>(_mp.second.input);
205  in->angleRadian =
206  hand->bufferRTToNonRT.getUpToDateReadBuffer().jointPosition.value();
207  in->deltaT = hand->bufferRTToNonRT.getReadBuffer().deltaT * timeScalingFactor;
208  }
209  }
210  if (not rtTargetSafe)
211  {
213 
214  // return;
215  // Make sure that you do not call additionalTaskSetTarget before return;
216  // since we overwrite the arm->nonRtConfig in additionalTaskUpdateStatus() with user config, which does not
217  // align with the up-to-date mp status. userConfig is only updated to align with MP status everytime a MP
218  // finishes execution. Only then, user can use this controller as if no mp is there.
219  }
220  runMPs(rtTargetSafe);
221 
222  /// set mp target to nonRT config data structure
223  for (auto& _mp : mps)
224  {
225  if (not mpRunning.at(_mp.second.mp->getMPName()))
226  {
227  continue;
228  }
229  for (auto& ftGuard : mpConfig.ftGuard)
230  {
231  if (ftGuard.mpName == _mp.second.mp->getMPName())
232  {
233  bool const forceGuard =
234  (ftGuard.force.has_value() and
235  ftGuard.force.value() >= _mp.second.mp->getCanonicalValue());
236  bool const torqueGuard =
237  (ftGuard.torque.has_value() and
238  ftGuard.torque.value() >= _mp.second.mp->getCanonicalValue());
239 
240  auto& arm = limb.at(_mp.second.mp->getNodeSetName());
241  bool const resetForce =
242  not arm->controller.ftsensor.isForceGuardEnabled() and forceGuard;
243  bool const resetTorque =
244  not arm->controller.ftsensor.isTorqueGuardEnabled() and torqueGuard;
245  if (resetForce or resetTorque)
246  {
247  ARMARX_INFO << "Triggering force torque safety guard for "
248  << arm->kinematicChainName << " at can value "
249  << _mp.second.mp->getCanonicalValue();
250  }
251 
252  arm->nonRtConfig.ftConfig.enableSafeGuardForce = forceGuard;
253  arm->nonRtConfig.ftConfig.enableSafeGuardTorque = torqueGuard;
254  arm->controller.ftsensor.enableSafeGuard(resetForce, resetTorque);
255  }
256  }
257 
258  if (_mp.second.mp->getRole() == "taskspace")
259  {
260  const auto& nodeSetName = _mp.second.mp->getNodeSetName();
261  auto& cfg = adaptionCfg.cfg.at(nodeSetName);
262  auto& s = adaptionStatus.at(nodeSetName);
263  auto& arm = limb.at(nodeSetName);
264  mp::TSMPOutputPtr out =
265  std::dynamic_pointer_cast<mp::TSMPOutput>(_mp.second.output);
266 
267  /// Note that here we only report warning but still set target to RT, we rely on MP phase stop and
268  /// RT safety mechanism to stop or pause the action if needed
269  arm->nonRtConfig.desiredPose = s.desiredPose;
271  arm->rtStatusInNonRT.currentPose,
272  arm->nonRtConfig.desiredPose,
273  "current pose",
274  "desiredPose for RT",
275  arm->nonRtConfig.safeDistanceMMToGoal,
276  arm->nonRtConfig.safeRotAngleDegreeToGoal,
277  _mp.second.mp->getMPName() + "mp_set_target");
278  arm->nonRtConfig.desiredTwist = out->vel;
279 
280  /// Note: use force to generate acceleration target and aggregate to the target velocity
281  if (arm->rtStatusInNonRT.rtTargetSafe)
282  {
283  const float desiredVelZ =
284  cfg.kpf * (cfg.targetForce - arm->rtStatusInNonRT.currentForceTorque(2));
285  arm->nonRtConfig.desiredTwist(2) -= desiredVelZ;
286  }
287  arm->nonRtConfig.desiredTwist.tail<3>().setZero();
288 
289  const float dT = static_cast<float>(arm->rtStatusInNonRT.deltaT);
290 
291  /// check phase stop
292  auto& adaptKImp = s.kpImpedance;
293  auto& adaptKVel = s.kpCartesianVel;
294 
295  const Eigen::Vector2f& currentForceXY =
296  arm->rtStatusInNonRT.currentForceTorque.head<2>();
297  if (currentForceXY.norm() > cfg.deadZoneForce)
298  {
299  // Gradually decrease kp until zero
300  const Eigen::Vector2f dragForce =
301  currentForceXY - cfg.deadZoneForce * currentForceXY / currentForceXY.norm();
302  adaptKImp.head<2>().array() -= dT * cfg.adaptForceCoeff * dragForce.norm();
303  adaptKVel.head<2>().array() -= dT * cfg.adaptForceCoeff * dragForce.norm();
304  }
305  else
306  {
307  // Gradually increase kp until original value
308  adaptKImp.head<2>().array() += fabs(dT * cfg.adaptCoeff);
309  adaptKVel.head<2>().array() += fabs(dT * cfg.adaptCoeff);
310  }
311 
312  // Clip between 0. and original Kp
313  adaptKImp.head<2>() = adaptKImp.head<2>()
314  .array()
315  .min(arm->nonRtConfig.kpImpedance.head<2>().array())
316  .max(0.0);
317  adaptKVel.head<2>() = adaptKVel.head<2>()
318  .array()
319  .min(arm->nonRtConfig.kpCartesianVel.head<2>().array())
320  .max(0.0);
321 
322  arm->nonRtConfig.kpImpedance = adaptKImp;
323  arm->nonRtConfig.kpCartesianVel = adaptKVel;
324 
325  // Scaling inverting trajectory
326  arm->nonRtConfig.desiredTwist.head<2>() *= sizeScalingFactor * timeScalingFactor;
327 
328  /// Note: integrate the target pose
329  arm->nonRtConfig.desiredPose.block<3, 1>(0, 3) +=
330  dT * arm->nonRtConfig.desiredTwist.head<3>();
331 
332  // Optionally restrict the workspace
333  if (cfg.minX.has_value())
334  {
335  arm->nonRtConfig.desiredPose(0, 3) =
336  fmax(arm->nonRtConfig.desiredPose(0, 3), *cfg.minX);
337  }
338  if (cfg.maxX.has_value())
339  {
340  arm->nonRtConfig.desiredPose(0, 3) =
341  fmin(arm->nonRtConfig.desiredPose(0, 3), *cfg.maxX);
342  }
343  if (cfg.minY.has_value())
344  {
345  arm->nonRtConfig.desiredPose(1, 3) =
346  fmax(arm->nonRtConfig.desiredPose(1, 3), *cfg.minY);
347  }
348  if (cfg.maxY.has_value())
349  {
350  arm->nonRtConfig.desiredPose(1, 3) =
351  fmin(arm->nonRtConfig.desiredPose(1, 3), *cfg.maxY);
352  }
353  if (cfg.minZ.has_value())
354  {
355  arm->nonRtConfig.desiredPose(2, 3) =
356  fmax(arm->nonRtConfig.desiredPose(2, 3), *cfg.minZ);
357  }
358 
359  if (cfg.desiredUserPosition.has_value() and not cfg.desiredUserPosition->isZero())
360  {
361  if (not(*cfg.desiredUserPosition - s.lastDesiredUserPosition).isZero())
362  {
363  if (s.openDistanceToDesiredUserPosition > 0.)
364  {
365  ARMARX_INFO << "Didn't reach previously defined desired position "
366  << s.lastDesiredUserPosition;
367  }
368  s.lastDesiredUserPosition = *cfg.desiredUserPosition;
369  const Eigen::Vector2f distance =
370  s.lastDesiredUserPosition -
371  arm->nonRtConfig.desiredPose.block<2, 1>(0, 3);
372  s.openDistanceToDesiredUserPosition = distance.norm();
373  ARMARX_INFO << "Initialized new desired user position at "
374  << s.lastDesiredUserPosition << " which is "
375  << s.openDistanceToDesiredUserPosition
376  << " mm from current desired position";
377  }
378 
379  if (s.openDistanceToDesiredUserPosition > 0.)
380  {
381  Eigen::Vector2f desiredLinearVelocity =
382  s.lastDesiredUserPosition -
383  arm->nonRtConfig.desiredPose.block<2, 1>(0, 3);
384  desiredLinearVelocity = dT * cfg.kpLinear * desiredLinearVelocity /
385  desiredLinearVelocity.norm();
386  s.openDistanceToDesiredUserPosition -= desiredLinearVelocity.norm();
387  arm->nonRtConfig.desiredPose.block<2, 1>(0, 3) += desiredLinearVelocity;
388  if (s.openDistanceToDesiredUserPosition < 0.)
389  {
390  ARMARX_INFO << "Reached desired user position "
391  << s.lastDesiredUserPosition;
392  }
393  }
394  }
395 
396  /// Note: checking the duration that arm is tooFar to indicate a new location for intended wiping
397  if (tooFar)
398  {
399  const Eigen::Vector2f currentXY =
400  arm->rtStatusInNonRT.currentPose.block<2, 1>(0, 3);
401  if ((s.lastPosition - currentXY).norm() < cfg.changePositionTolerance)
402  {
403  s.changeTimer += dT;
404  }
405  else
406  {
407  s.lastPosition = currentXY;
408  s.changeTimer = 0;
409  }
410 
411  if (s.changeTimer > cfg.changeTimerThreshold)
412  {
413  arm->nonRtConfig.desiredPose.block<2, 1>(0, 3) = currentXY;
414  // isPhaseStop = false; /// Check if desiredPose above in report deviation is correct
415  s.changeTimer = 0;
416  ARMARX_INFO << "Updated desired position to "
417  << arm->nonRtConfig.desiredPose.block<3, 1>(0, 3).transpose();
418  }
419  }
420  else
421  {
422  s.changeTimer = 0;
423  }
424 
425  s.desiredPose = arm->nonRtConfig.desiredPose;
426  }
427  else if (_mp.second.mp->getRole() == "nullspace")
428  {
429  auto& arm = limb.at(_mp.second.mp->getNodeSetName());
430  mp::JSMPOutputPtr out =
431  std::dynamic_pointer_cast<mp::JSMPOutput>(_mp.second.output);
432  ARMARX_CHECK_EQUAL(arm->rtStatusInNonRT.numJoints, out->angleRadian.size());
433  arm->nonRtConfig.desiredNullspaceJointAngles.value() = out->angleRadian;
434  }
435  else if (_mp.second.mp->getRole() == "hand")
436  {
437  mp::JSMPOutputPtr out =
438  std::dynamic_pointer_cast<mp::JSMPOutput>(_mp.second.output);
439  auto& hand = hands->hands.at(_mp.second.mp->getNodeSetName());
440  mp::JSMPInputPtr in = std::dynamic_pointer_cast<mp::JSMPInput>(_mp.second.input);
441  ARMARX_CHECK_EQUAL(hand->targetNonRT.jointPosition.value().size(),
442  out->angleRadian.size());
443  hand->targetNonRT.jointPosition.value() = out->angleRadian;
444  }
445  if (mpRunning.at(_mp.second.mp->getMPName()) and _mp.second.mp->isFinished())
446  {
447  ARMARX_INFO << "reset buffer for nonRtConfig of " << _mp.second.mp->getMPName();
448  for (auto& pair : limb)
449  {
450  auto& arm = pair.second;
451  arm->bufferConfigUserToNonRt.reinitAllBuffers(arm->nonRtConfig);
452  }
453  for (auto& pair : limb)
454  {
455  userConfig.limbs.at(pair.first) = pair.second->nonRtConfig;
456  }
457  if (hands)
458  {
459  hands->reinitBuffer(userConfig.hands);
460  }
461  }
462  }
464  }
465 } // namespace armarx::control::njoint_mp_controller::task_space
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::userConfig
ConfigDict userConfig
Definition: MixedImpedanceVelocityController.h:182
armarx::TripleBuffer::getWriteBuffer
T & getWriteBuffer()
Definition: TripleBuffer.h:92
ARMARX_IMPORTANT
#define ARMARX_IMPORTANT
Definition: Logging.h:190
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::limb
std::map< std::string, ArmPtr > limb
Definition: MixedImpedanceVelocityController.h:179
armarx::control::common::mp::JSMPInputPtr
std::shared_ptr< JSMPInput > JSMPInputPtr
Definition: JSMP.h:47
RobotUnit.h
armarx::TripleBuffer::commitWrite
void commitWrite()
Definition: TripleBuffer.h:163
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::handleRTNotSafeInNonRT
void handleRTNotSafeInNonRT()
Definition: MixedImpedanceVelocityController.cpp:260
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::controllableNodeSets
std::map< std::string, VirtualRobot::RobotNodeSetPtr > controllableNodeSets
Definition: MixedImpedanceVelocityController.h:184
armarx::control::common::detectAndReportPoseDeviationWarning
bool detectAndReportPoseDeviationWarning(const Eigen::Matrix4f &pose1, const Eigen::Matrix4f &pose2, const std::string &namePose1, const std::string &namePose2, float positionThrMM, float angleThrDeg, const std::string &who)
Definition: utils.cpp:646
armarx::max
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:297
armarx::control::njoint_controller::task_space::NJointTaskspaceCollisionAvoidanceMixedImpedanceVelocityController
Brief description of class NJointTaskspaceCollisionAvoidanceMixedImpedanceVelocityController.
Definition: CollisionAvoidanceMixedImpedanceVelocityController.h:55
armarx::control::njoint_mp_controller::task_space::NJointWipingMixImpVelColMPController::rtPreActivateController
void rtPreActivateController() override
NJointControllerBase interface.
Definition: WipingMixImpVelColController.cpp:99
armarx::control::common::mp::MPPool::runMPs
void runMPs(const bool rtSafe)
Definition: MPPool.cpp:87
armarx::control::common::mp::JSMPOutputPtr
std::shared_ptr< JSMPOutput > JSMPOutputPtr
Definition: JSMP.h:48
armarx::control::common::mp::MPPool::resetMPs
bool resetMPs(const ::armarx::aron::data::dto::DictPtr &dto, const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &rnsMap)
Definition: MPPool.cpp:528
armarx::status
status
Definition: FiniteStateMachine.h:244
armarx::control::common::mp::TSMPOutputPtr
std::shared_ptr< TSMPOutput > TSMPOutputPtr
Definition: TSMP.h:47
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController
Brief description of class NJointTaskspaceMixedImpedanceVelocityController.
Definition: MixedImpedanceVelocityController.h:50
WipingMixImpVelColController.h
armarx::control::common::mp::MPPool::mtx_mps
std::recursive_mutex mtx_mps
Definition: MPPool.h:130
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::additionalTaskUpdateStatus
std::tuple< bool, bool > additionalTaskUpdateStatus()
Definition: MixedImpedanceVelocityController.cpp:224
armarx::control::njoint_mp_controller::task_space::NJointWipingMixImpVelColMPController::NJointWipingMixImpVelColMPController
NJointWipingMixImpVelColMPController(const RobotUnitPtr &robotUnit, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: WipingMixImpVelColController.cpp:35
armarx::control::common::dVecToMat4
Eigen::Matrix4f dVecToMat4(const mplib::core::DVec &dvec)
create Eigen:Matrix4f from 7D double vector.
Definition: utils.cpp:230
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:196
utils.h
armarx::control::njoint_mp_controller::task_space
This file is part of ArmarX.
Definition: AdmittanceController.cpp:29
armarx::control::common::MPType::hand
@ hand
armarx::aron::data::DictPtr
std::shared_ptr< Dict > DictPtr
Definition: Dict.h:41
armarx::control::njoint_mp_controller::task_space::NJointWipingMixImpVelColMPController::updateAdaptiveConfig
void updateAdaptiveConfig(const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: WipingMixImpVelColController.cpp:66
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:181
armarx::control::njoint_controller::task_space::NJointTaskspaceCollisionAvoidanceMixedImpedanceVelocityController::rtPreActivateController
void rtPreActivateController() override
NJointControllerBase interface.
Definition: CollisionAvoidanceMixedImpedanceVelocityController.cpp:630
IceUtil::Handle< class RobotUnit >
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::hands
core::HandControlPtr hands
Definition: MixedImpedanceVelocityController.h:183
armarx::control::njoint_mp_controller::task_space::NJointWipingMixImpVelColMPController::getClassName
std::string getClassName(const Ice::Current &=Ice::emptyCurrent) const override
Definition: WipingMixImpVelColController.cpp:46
armarx::control::common::mat4ToDVec
mplib::core::DVec mat4ToDVec(const Eigen::Matrix4f &mat)
convert Eigen:Matrix4f to 7D double vector.
Definition: utils.cpp:252
distance
double distance(const Point &a, const Point &b)
Definition: point.hpp:95
armarx::control::njoint_mp_controller::task_space::NJointWipingMixImpVelColMPController::updateMPConfig
void updateMPConfig(const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: WipingMixImpVelColController.cpp:52
armarx::control::common::mp::MPPool::mps
std::map< std::string, MPInputOutput > mps
Definition: MPPool.h:129
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::additionalTaskSetTarget
void additionalTaskSetTarget()
Definition: MixedImpedanceVelocityController.cpp:247
armarx::control::common::mp::TSMPInputPtr
std::shared_ptr< TSMPInput > TSMPInputPtr
Definition: TSMP.h:46
armarx::TripleBuffer::getUpToDateReadBuffer
const T & getUpToDateReadBuffer() const
Definition: TripleBuffer.h:116
ARMARX_CHECK_EQUAL
#define ARMARX_CHECK_EQUAL(lhs, rhs)
This macro evaluates whether lhs is equal (==) rhs and if it turns out to be false it will throw an E...
Definition: ExpressionException.h:130
armarx::transpose
std::vector< std::vector< T > > transpose(const std::vector< std::vector< T >> &src, Thrower thrower)
Definition: SimoxCSpace.cpp:772
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::robotUnit
RobotUnitPtr robotUnit
Definition: MixedImpedanceVelocityController.h:181
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
NJointControllerRegistry.h
armarx::control::njoint_mp_controller::task_space::NJointWipingMixImpVelColMPController::AdaptionStatus
Definition: WipingMixImpVelColController.h:54
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19
armarx::control::njoint_mp_controller::task_space::NJointWipingMixImpVelColMPController::additionalTask
void additionalTask() override
Definition: WipingMixImpVelColController.cpp:115
armarx::control::common::mp::MPPool::mpConfig
MPListConfig mpConfig
this variable is only needed when constructing the MP instances, therefore you don't need to use trip...
Definition: MPPool.h:136
armarx::control::njoint_mp_controller::task_space::registrationControllerNJointWipingMixImpVelColMPController
NJointControllerRegistration< NJointWipingMixImpVelColMPController > registrationControllerNJointWipingMixImpVelColMPController("NJointWipingMixImpVelColMPController")