MixedImpedanceVelocityController.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  * @package ...
17  * @author Jianfeng Gao ( jianfeng dot gao at kit dot edu )
18  * @date 2024
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
24 
25 #include <VirtualRobot/MathTools.h>
26 #include <VirtualRobot/Nodes/RobotNode.h>
27 #include <VirtualRobot/RobotNodeSet.h>
28 
30 #include <ArmarXCore/core/PackagePath.h> // for GUI
34 
40 
41 #include <armarx/control/common/aron_conversions.h> // for GUI
44 
46 {
47  NJointControllerRegistration<NJointTaskspaceMixedImpedanceVelocityController>
49  "NJointTaskspaceMixedImpedanceVelocityController");
50 
51  void
53  ArmPtr& arm,
54  Config& cfg,
55  VirtualRobot::RobotPtr& nonRtRobotPtr)
56  {
57  arm->kinematicChainName = nodeSetName;
58  VirtualRobot::RobotNodeSetPtr rtRns =
59  rtGetRobot()->getRobotNodeSet(arm->kinematicChainName);
60  VirtualRobot::RobotNodeSetPtr nonRtRns =
61  nonRtRobotPtr->getRobotNodeSet(arm->kinematicChainName);
62  ARMARX_CHECK_EXPRESSION(rtRns) << arm->kinematicChainName;
63  ARMARX_CHECK_EXPRESSION(nonRtRns) << arm->kinematicChainName;
64  ARMARX_IMPORTANT << "Creating Taskspace Impedance controller with kinematic chain: "
65  << arm->kinematicChainName << " with num of joints: (RT robot) "
66  << rtRns->getSize() << ", and (non-RT robot) " << nonRtRns->getSize();
67 
68  std::vector<size_t> jointIDTorqueMode;
69  std::vector<size_t> jointIDVelocityMode;
70  arm->jointNames.clear();
71  for (size_t i = 0; i < rtRns->getSize(); ++i)
72  {
73  std::string jointName = rtRns->getNode(i)->getName();
74  arm->jointNames.push_back(jointName);
75 
76  bool foundControlDevice = false;
77  auto it = std::find(
78  cfg.jointNameListTorque.begin(), cfg.jointNameListTorque.end(), jointName);
79  if (it != cfg.jointNameListTorque.end())
80  {
81  ControlTargetBase* ct = useControlTarget(jointName, ControlModes::Torque1DoF);
83  auto* casted_ct = ct->asA<ControlTarget1DoFActuatorTorque>();
84  ARMARX_CHECK_EXPRESSION(casted_ct);
85  arm->targetsTorque.push_back(casted_ct);
86  jointIDTorqueMode.push_back(i);
87  foundControlDevice = true;
88  }
89 
90  it = std::find(
91  cfg.jointNameListVelocity.begin(), cfg.jointNameListVelocity.end(), jointName);
92  if (it != cfg.jointNameListVelocity.end())
93  {
94  ControlTargetBase* ct = useControlTarget(jointName, ControlModes::Velocity1DoF);
96  auto* casted_ct = ct->asA<ControlTarget1DoFActuatorVelocity>();
97  ARMARX_CHECK_EXPRESSION(casted_ct);
98  arm->targetsVel.push_back(casted_ct);
99  jointIDVelocityMode.push_back(i);
100  foundControlDevice = true;
101  }
102  if (not foundControlDevice)
103  {
104  auto namesTorque = armarx::control::common::sVecToString(cfg.jointNameListTorque);
105  auto namesVelocity =
106  armarx::control::common::sVecToString(cfg.jointNameListVelocity);
107  ARMARX_ERROR << "Does not found valid control device for joint name: " << jointName
108  << "Please check torque controlled joints: [" << namesTorque
109  << "] and velocity controlled joints: [" << namesVelocity << "].";
110  }
111 
112  const SensorValueBase* sv = useSensorValue(jointName);
114  arm->sensorDevices.append(sv, jointName);
115  };
116  ARMARX_DEBUG << "Number of torque controlled joints " << jointIDTorqueMode.size();
117  ARMARX_DEBUG << "Number of velocity controlled joints " << jointIDVelocityMode.size();
118  ARMARX_CHECK_EQUAL(rtRns->getNodeNames().size(),
119  jointIDTorqueMode.size() + jointIDVelocityMode.size());
120 
121  arm->controller.initialize(nonRtRns, rtRns, jointIDTorqueMode, jointIDVelocityMode);
122  arm->controller.ftsensor.initialize(rtRns, robotUnit, cfg.ftConfig);
123 
124  validateConfigData(cfg, arm);
125  arm->rtConfig = cfg;
126  arm->nonRtConfig = cfg;
127  arm->rtStatus.reset(rtRns->getSize(), jointIDTorqueMode.size(), jointIDVelocityMode.size());
128  }
129 
132  const NJointControllerConfigPtr& config,
133  const VirtualRobot::RobotPtr&) :
134  robotUnit(robotUnit)
135  {
137 
138  ConfigPtrT cfg = ConfigPtrT::dynamicCast(config);
140  userConfig.fromAron(cfg->config);
141 
143  nonRtRobot = robotUnit->cloneRobot();
144  robotUnit->updateVirtualRobot(nonRtRobot);
145 
146  for (auto& pair : userConfig.limbs)
147  {
148  limb.emplace(pair.first, std::make_unique<ArmData>());
149  limbInit(pair.first, limb.at(pair.first), pair.second, nonRtRobot);
150  controllableNodeSets.emplace(pair.first, nonRtRobot->getRobotNodeSet(pair.first));
151  }
152 
153  if (not userConfig.hands.empty())
154  {
155  hands = std::make_shared<core::HandControlBase>(nonRtRobot, userConfig.hands);
156  for (auto& pair : userConfig.hands)
157  {
158  for (auto& jointName : hands->hands.at(pair.first)->jointNames)
159  {
160  hands->appendDevice(pair.first,
161  useSensorValue(jointName),
162  useControlTarget(jointName, ControlModes::Position1DoF),
163  jointName);
164  }
165  ARMARX_INFO << "construction of hand "
166  << hands->hands.at(pair.first)->kinematicChainName;
167  controllableNodeSets.emplace(pair.first, nonRtRobot->getRobotNodeSet(pair.first));
168  }
169  }
170  }
171 
172  std::string
174  {
175  return "NJointTaskspaceMixedImpedanceVelocityController";
176  }
177 
178  void
180  {
181  std::string taskName = getClassName() + "AdditionalTask";
182  runTask(taskName,
183  [&]
184  {
186  4); // please don't set this to 0 as it is the rtRun/control thread
189 
190  CycleUtil c(1);
191  getObjectScheduler()->waitForObjectStateMinimum(eManagedIceObjectStarted);
192  ARMARX_IMPORTANT << "Create a new thread for " << getClassName();
193  while (getState() == eManagedIceObjectStarted)
194  {
195  if (isControllerActive())
196  {
197  additionalTask();
198  }
199  c.waitForCycleDuration();
200  }
201  });
202  }
203 
204  void
206  {
207  arm->bufferConfigNonRtToRt.getWriteBuffer() = arm->nonRtConfig;
208  arm->bufferConfigNonRtToRt.commitWrite();
209  }
210 
211  void
213  {
214  bool rtSafe = additionalTaskUpdateStatus();
216  if (not rtSafe)
217  {
219  }
220  }
221 
222  bool
224  {
225  robotUnit->updateVirtualRobot(nonRtRobot);
226  bool rtSafe = true;
227  for (auto& pair : limb)
228  {
229  auto& arm = pair.second;
230  arm->nonRtConfig = arm->bufferConfigUserToNonRt.getUpToDateReadBuffer();
231  arm->rtStatusInNonRT = arm->bufferRtStatusToNonRt.getUpToDateReadBuffer();
232  rtSafe = rtSafe and pair.second->rtStatusInNonRT.rtSafe;
233  }
234  if (hands)
235  {
236  hands->nonRTUpdateStatus();
237  }
238  return rtSafe;
239  }
240 
241  void
243  {
244  for (auto& pair : limb)
245  {
246  limbNonRT(pair.second);
247  }
248  if (hands)
249  {
250  hands->nonRTSetTarget();
251  }
252  }
253 
254  void
256  {
257  for (auto& pair : limb)
258  {
259  if (not pair.second->rtReady)
260  continue;
261 
262  if (not pair.second->rtStatusInNonRT.rtTargetSafe)
263  {
264  pair.second->rtStatusInNonRT =
265  pair.second->bufferRtStatusToNonRt.getUpToDateReadBuffer();
267  pair.second->rtStatusInNonRT.currentPose,
268  pair.second->nonRtConfig.desiredPose,
269  "current pose",
270  "desired pose");
271  }
272  }
273  }
274 
275  /// -------------------------------- Real time cotnrol -----------------------------------------
276  void
278  const double deltaT)
279  {
280  arm->rtConfig = arm->bufferConfigNonRtToRt.getUpToDateReadBuffer();
281  arm->rtStatus.deltaT = deltaT;
282  arm->rtStatus.accumulateTime += deltaT;
283 
284  arm->controller.ftsensor.updateStatus(arm->rtConfig.ftConfig,
285  arm->rtStatus.currentForceTorque,
286  arm->rtStatus.deltaT,
287  arm->rtFirstRun.load());
288  arm->rtStatus.safeFTGuardOffset.head<3>() =
289  arm->controller.ftsensor.getSafeGuardForceOffset();
290 
291  arm->sensorDevices.updateJointValues(
292  arm->rtStatus.jointPos, arm->rtStatus.jointVel, arm->rtStatus.jointTor);
293  // rtGetRobot()->getRobotNodeSet(arm->kinematicChainName)
294 
295 
296  arm->bufferRtStatusToNonRt.getWriteBuffer() = arm->rtStatus;
297  arm->bufferRtStatusToNonRt.commitWrite();
298  arm->bufferRtStatusToUser.getWriteBuffer() = arm->rtStatus;
299  arm->bufferRtStatusToUser.commitWrite();
300  }
301 
302  void
304  ArmPtr& arm,
305  const size_t nDoFTorque,
306  const size_t nDoFVelocity,
307  const Eigen::VectorXf& targetTorque,
308  const Eigen::VectorXf& targetVelocity)
309  {
310  for (size_t i = 0; i < nDoFTorque; i++)
311  {
312  auto jointIdx = arm->controller.jointIDTorqueMode[i];
313  arm->targetsTorque.at(i)->torque = targetTorque(jointIdx);
314  if (!arm->targetsTorque.at(i)->isValid())
315  {
316  arm->targetsTorque.at(i)->torque = 0;
317  }
318  }
319  for (size_t i = 0; i < nDoFVelocity; i++)
320  {
321  auto jointIdx = arm->controller.jointIDVelocityMode[i];
322  arm->targetsVel.at(i)->velocity = targetVelocity(jointIdx);
323  // if (!targets.at(i)->isValid() || fabs(targets.at(i)->velocity) > cfg->maxJointVelocity)
324  if (!arm->targetsVel.at(i)->isValid())
325  {
326  arm->targetsVel.at(i)->velocity = 0;
327  }
328  }
329  arm->bufferRtStatusToOnPublish.getWriteBuffer() = arm->rtStatus;
330  arm->bufferRtStatusToOnPublish.commitWrite();
331 
332  arm->bufferConfigRtToOnPublish.getWriteBuffer() = arm->rtConfig;
333  arm->bufferConfigRtToOnPublish.commitWrite();
334 
335  arm->bufferConfigRtToUser.getWriteBuffer() = arm->rtConfig;
336  arm->bufferConfigRtToUser.commitWrite();
337 
338  if (arm->rtFirstRun.load())
339  {
340  arm->rtFirstRun.store(false);
341  arm->rtReady.store(true);
342  }
343  }
344 
345  void
347  {
348  double time_measure = IceUtil::Time::now().toMicroSecondsDouble();
349  limbRTUpdateStatus(arm, deltaT);
350  double time_update_status = IceUtil::Time::now().toMicroSecondsDouble() - time_measure;
351 
352  arm->controller.run(arm->rtConfig, arm->rtStatus);
353  double time_run_rt = IceUtil::Time::now().toMicroSecondsDouble() - time_measure;
354 
355  limbRTSetTarget(arm,
356  arm->rtStatus.nDoFTorque,
357  arm->rtStatus.nDoFVelocity,
358  arm->rtStatus.desiredJointTorques,
359  arm->rtStatus.desiredJointVelocity);
360 
361  double time_set_target = IceUtil::Time::now().toMicroSecondsDouble() - time_measure;
362  time_measure = IceUtil::Time::now().toMicroSecondsDouble() - time_measure;
363 
364  if (time_measure > 200)
365  {
366  ARMARX_RT_LOGF_WARN("---- rt too slow: "
367  "time_update_status: %.2f\n"
368  "run_rt_limb: %.2f\n"
369  "set_target_limb: %.2f\n"
370  "time all: %.2f\n",
371  time_update_status, // 0-1 us
372  time_run_rt - time_update_status, //
373  time_set_target - time_run_rt, //
374  time_measure)
375  .deactivateSpam(1.0f); // 0-1 us
376  }
377  }
378 
379  void
381  const IceUtil::Time& /*sensorValuesTimestamp*/,
382  const IceUtil::Time& timeSinceLastIteration)
383  {
384  double deltaT = timeSinceLastIteration.toSecondsDouble();
385  for (auto& pair : limb)
386  {
387  limbRT(pair.second, deltaT);
388  }
389  if (hands)
390  {
391  hands->updateRTStatus(deltaT);
392  hands->setTargets();
393  }
394  }
395 
396  /// ------------------------------ update/get config -------------------------------------------
397  void
400  const Ice::Current& iceCurrent)
401  {
402  auto prevCfg = userConfig;
403  userConfig.fromAron(dto);
404 
405  for (auto& pair : userConfig.limbs)
406  {
407  validateConfigData(pair.second, limb.at(pair.first));
409  pair.second.desiredPose,
410  prevCfg.limbs.at(pair.first).desiredPose,
411  "new desired pose",
412  "previous desired pose",
413  pair.second.safeDistanceMMToGoal,
414  pair.second.safeRotAngleDegreeToGoal,
415  "updateConfig_" + pair.first))
416  {
417  ARMARX_INFO << "use the existing target pose";
418  pair.second.desiredPose = prevCfg.limbs.at(pair.first).desiredPose;
419  }
420  limb.at(pair.first)->bufferConfigUserToNonRt.getWriteBuffer() = pair.second;
421  limb.at(pair.first)->bufferConfigUserToNonRt.commitWrite();
422  }
423  if (hands)
424  {
425  hands->updateConfig(userConfig.hands);
426  }
427  }
428 
431  {
432  for (auto& pair : limb)
433  {
434  userConfig.limbs.at(pair.first) =
435  pair.second->bufferConfigRtToUser.getUpToDateReadBuffer();
436  }
437  if (hands)
438  {
439  hands->getConfig(userConfig.hands);
440  }
441  return userConfig.toAronDTO();
442  }
443 
444  void
446  const std::string& nodeSetName,
447  const bool forceGuard,
448  const bool torqueGuard,
449  const Ice::Current& iceCurrent)
450  {
451  auto it = userConfig.limbs.find(nodeSetName);
452  if (it != userConfig.limbs.end())
453  {
454  it->second.ftConfig.enableSafeGuardForce = forceGuard;
455  it->second.ftConfig.enableSafeGuardTorque = torqueGuard;
456  limb.at(nodeSetName)->controller.ftsensor.enableSafeGuard(forceGuard, torqueGuard);
458  << "reset safe guard with force torque sensors: safe? "
459  << limb.at(nodeSetName)->controller.ftsensor.isSafe(it->second.ftConfig);
460  limb.at(nodeSetName)->bufferConfigUserToNonRt.getWriteBuffer() = it->second;
461  limb.at(nodeSetName)->bufferConfigUserToNonRt.commitWrite();
462  }
463  else
464  {
465  ARMARX_WARNING << "no robot node set with name " << nodeSetName
466  << " found in the controllers.";
467  }
468  }
469 
470  /// -------------------------------- Other interaces -------------------------------------------
471  bool
473  const std::string& nodeSetName,
474  const Ice::Current& iceCurrent)
475  {
476  auto it = userConfig.limbs.find(nodeSetName);
477  if (it != userConfig.limbs.end())
478  {
479  return limb.at(nodeSetName)->controller.ftsensor.ftSafe.load();
480  }
481 
482  ARMARX_WARNING << "no robot node set with name " << nodeSetName
483  << " found in the controllers.";
484  return false;
485  }
486 
487  Ice::FloatSeq
489  const Ice::Current& iceCurrent)
490  {
491  std::vector<float> tcpVel;
492  auto& arm = limb.at(rns);
493  auto s = arm->bufferRtStatusToUser.getUpToDateReadBuffer();
494  for (int i = 0; i < s.currentTwist.size(); i++)
495  {
496  tcpVel.push_back(s.currentTwist[i]);
497  }
498  return tcpVel;
499  }
500 
501  bool
503  const TargetPoseMap& targetPoseMap,
504  const TargetNullspaceMap& targetNullspaceMap,
505  const Ice::Current& iceCurrent)
506  {
507  for (auto& pair : userConfig.limbs)
508  {
509  for (size_t i = 0; i < 4; ++i)
510  {
511  for (int j = 0; j < 4; ++j)
512  {
513  pair.second.desiredPose(i, j) = targetPoseMap.at(pair.first)[i][j];
514  }
515  }
516  if (targetNullspaceMap.at(pair.first).size() > 0)
517  {
518  const size_t nDoF = pair.second.desiredNullspaceJointAngles.value().size();
519  ARMARX_CHECK_EQUAL(targetNullspaceMap.at(pair.first).size(), nDoF)
520  << "the joint numbers does not match";
521  for (size_t i = 0; i < nDoF; ++i)
522  {
523  pair.second.desiredNullspaceJointAngles.value()(i) =
524  targetNullspaceMap.at(pair.first)[i];
525  }
526  }
527  limb.at(pair.first)->bufferConfigUserToNonRt.getWriteBuffer() = pair.second;
528  limb.at(pair.first)->bufferConfigUserToNonRt.commitWrite();
529  }
530  return true;
531  }
532 
533  void
535  ArmPtr& arm)
536  {
537  const auto nDoF = arm->controller.numOfJoints;
538 
539  const auto checkSize = [nDoF](const auto& v) { ARMARX_CHECK_EQUAL(v.rows(), nDoF); };
540  const auto checkNonNegative = [](const auto& v) { ARMARX_CHECK((v.array() >= 0).all()); };
541 
542  if (!configData.desiredNullspaceJointAngles.has_value())
543  {
544  if (!isControllerActive())
545  {
546  ARMARX_INFO << "No user defined nullspace target, reset to zero with "
547  << VAROUT(nDoF);
548  configData.desiredNullspaceJointAngles = Eigen::VectorXf::Zero(nDoF);
549  arm->reInitPreActivate.store(true);
550  }
551  else
552  {
553  auto currentValue =
554  arm->bufferConfigRtToUser.getUpToDateReadBuffer().desiredNullspaceJointAngles;
556  << "Controller is active, but no user defined nullspace target. \n"
557  "You should first get up-to-date config of this controller and then update "
558  "it:\n"
559  " auto cfg = ctrl->getConfig(); \n"
560  " cfg.desiredPose = xxx;\n"
561  " ctrl->updateConfig(cfg);\n"
562  "Now, I decide by myself to use the existing values of nullspace target\n"
563  << currentValue.value();
564  configData.desiredNullspaceJointAngles = currentValue;
565  }
566  }
567  ARMARX_CHECK_GREATER(configData.safeDistanceMMToGoal, 100.0f);
568  checkSize(configData.desiredNullspaceJointAngles.value());
569  checkSize(configData.kdNullspaceTorque);
570  checkSize(configData.kpNullspaceTorque);
571  checkSize(configData.kdNullspaceVel);
572  checkSize(configData.kpNullspaceVel);
573 
574  checkNonNegative(configData.kdNullspaceTorque);
575  checkNonNegative(configData.kpNullspaceTorque);
576  checkNonNegative(configData.kpNullspaceVel);
577  checkNonNegative(configData.kdNullspaceVel);
578  checkNonNegative(configData.kdImpedance);
579  checkNonNegative(configData.kpImpedance);
580  }
581 
582  void
584  ArmPtr& arm,
585  const DebugObserverInterfacePrx& debugObs)
586  {
587  StringVariantBaseMap datafields;
588  auto rtData = arm->bufferConfigRtToOnPublish.getUpToDateReadBuffer();
589  auto rtStatus = arm->bufferRtStatusToOnPublish.getUpToDateReadBuffer();
590 
591  common::debugEigenVec(datafields, "kpImpedance", rtData.kpImpedance);
592  common::debugEigenVec(datafields, "kdImpedance", rtData.kdImpedance);
593  if (rtData.desiredNullspaceJointAngles.has_value())
594  {
595  common::debugEigenVec(datafields,
596  "desiredNullspaceJointAngles",
597  rtData.desiredNullspaceJointAngles.value());
598  }
599 
600  common::debugEigenVec(datafields, "jointPos", rtStatus.jointPos);
601  common::debugEigenVec(datafields, "jointVel", rtStatus.jointVel);
602  common::debugEigenVec(datafields, "qvelFiltered", rtStatus.qvelFiltered);
603 
604  common::debugEigenPose(datafields, "current_pose", rtStatus.currentPose);
605  common::debugEigenPose(datafields, "desired_pose", rtStatus.desiredPose);
606  float positionError =
607  (common::getPos(rtStatus.currentPose) - common::getPos(rtStatus.desiredPose)).norm();
608  float angleError =
609  common::getDeltaAngleBetweenPose(rtStatus.currentPose, rtStatus.desiredPose);
610  datafields["poseError_position"] = new Variant(positionError);
611  datafields["poseError_angle"] = new Variant(angleError);
612  datafields["poseError_threshold_position"] = new Variant(rtData.safeDistanceMMToGoal);
613  datafields["poseError_threshold_angle"] = new Variant(rtData.safeRotAngleDegreeToGoal);
614 
615  common::debugEigenVec(datafields, "current_twist", rtStatus.currentTwist);
616  common::debugEigenVec(datafields, "poseErrorImp", rtStatus.poseErrorImp);
617 
618  common::debugEigenVec(datafields, "currentForceTorque", rtStatus.currentForceTorque);
619  common::debugEigenVec(datafields, "safeFTGuardOffset", rtStatus.safeFTGuardOffset);
620 
621  float currentForceNorm = rtStatus.currentForceTorque.head<3>().norm();
622  float currentTorqueNorm = rtStatus.currentForceTorque.tail<3>().norm();
623  float safeForceGuardOffsetNorm = rtStatus.safeFTGuardOffset.head<3>().norm();
624  float safeTorqueGuardOffsetNorm = rtStatus.safeFTGuardOffset.tail<3>().norm();
625  datafields["currentForceTorqueNorm"] = new Variant(currentForceNorm);
626  datafields["currentTorqueTorqueNorm"] = new Variant(currentTorqueNorm);
627  datafields["safeForceGuardOffsetNorm"] = new Variant(safeForceGuardOffsetNorm);
628  datafields["safeTorqueGuardOffsetNorm"] = new Variant(safeTorqueGuardOffsetNorm);
629  datafields["safeForceGuardDifference"] =
630  new Variant(currentForceNorm - safeForceGuardOffsetNorm);
631  datafields["safeTorqueGuardDifference"] =
632  new Variant(currentTorqueNorm - safeTorqueGuardOffsetNorm);
633  datafields["safeForceGuardThreshold"] =
634  new Variant(rtData.ftConfig.safeGuardForceThreshold);
635  datafields["safeTorqueGuardThreshold"] =
636  new Variant(rtData.ftConfig.safeGuardTorqueThreshold);
637 
638  common::debugEigenVec(datafields, "forceImpedance", rtStatus.forceImpedance);
639  common::debugEigenVec(datafields, "cartesianVelTarget", rtStatus.cartesianVelTarget);
640 
641  common::debugEigenVec(datafields, "desiredJointTorques", rtStatus.desiredJointTorques);
642  common::debugEigenVec(datafields, "desiredJointVelocity", rtStatus.desiredJointVelocity);
643  common::debugEigenVec(datafields, "nullspaceTorque", rtStatus.nullspaceTorque);
644  common::debugEigenVec(datafields, "nullspaceVelocity", rtStatus.nullspaceVelocity);
645  debugObs->setDebugChannel(getClassName() + "_" + arm->kinematicChainName, datafields);
646 
647  viz::Layer layer = arviz.layer(getClassName() + "_" + arm->kinematicChainName);
648  layer.add(viz::Arrow("tsImpForce")
649  .fromTo(common::getPos(rtStatus.currentPose),
650  common::getPos(rtStatus.currentPose) +
651  rtStatus.forceImpedance.head<3>() * 5.0)
653  arviz.commit(layer);
654  }
655 
656  void
658  const SensorAndControl&,
660  const DebugObserverInterfacePrx& debugObs)
661  {
662  for (auto& pair : limb)
663  {
664  if (not pair.second->rtReady.load())
665  continue;
666  limbPublish(pair.second, debugObs);
667  }
668  }
669 
670  void
672  {
673  for (auto& pair : limb)
674  {
675  pair.second->rtReady.store(false);
676  }
677  }
678 
679  void
681  {
682  VirtualRobot::RobotNodeSetPtr rns = rtGetRobot()->getRobotNodeSet(arm->kinematicChainName);
683  Eigen::Matrix4f currentPose = rns->getTCP()->getPoseInRootFrame();
684  auto quat = VirtualRobot::MathTools::eigen4f2quat(currentPose);
685  ARMARX_RT_LOGF_INFO("rt preactivate controller with target pose\n\n "
686  "[ %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f ].",
687  currentPose(0, 3),
688  currentPose(1, 3),
689  currentPose(2, 3),
690  quat.w,
691  quat.x,
692  quat.y,
693  quat.z);
694 
695  if (arm->reInitPreActivate.load())
696  {
697  arm->rtConfig.desiredNullspaceJointAngles.value() = rns->getJointValuesEigen();
698  arm->rtConfig.desiredPose = currentPose;
699 
700  arm->bufferConfigUserToNonRt.reinitAllBuffers(arm->rtConfig);
701  arm->reInitPreActivate.store(false);
702  }
703  {
704  arm->nonRtConfig = arm->rtConfig;
705  arm->bufferConfigNonRtToRt.reinitAllBuffers(arm->rtConfig);
706  arm->bufferConfigRtToOnPublish.reinitAllBuffers(arm->rtConfig);
707  arm->bufferConfigRtToUser.reinitAllBuffers(arm->rtConfig);
708  }
709  {
710  arm->sensorDevices.updateJointValues(
711  arm->rtStatus.jointPos, arm->rtStatus.jointVel, arm->rtStatus.jointTor);
712  arm->rtStatus.rtPreActivate(currentPose);
713 
714  arm->rtStatusInNonRT = arm->rtStatus;
715  arm->nonRTDeltaT = 0.0;
716  arm->nonRTAccumulateTime = 0.0;
717  arm->bufferRtStatusToOnPublish.reinitAllBuffers(arm->rtStatus);
718  arm->bufferRtStatusToNonRt.reinitAllBuffers(arm->rtStatus);
719  arm->bufferRtStatusToUser.reinitAllBuffers(arm->rtStatus);
720  }
721 
722  arm->controller.preactivateInit(rns);
723  }
724 
725  void
727  {
728  for (auto& pair : limb)
729  {
730  ARMARX_RT_LOGF_INFO("rtPreActivateController for %s", pair.first.c_str());
731  limbReInit(pair.second);
732  userConfig.limbs.at(pair.first) = pair.second->rtConfig;
733  }
734  if (hands)
735  {
736  hands->rtPreActivate();
737  }
738  }
739 
740  void
742  {
743  // for (auto& pair : limb)
744  // {
745  // pair.second->controller.isInitialized.store(false);
746  // }
747  }
748 
749  /// ----------------------------------- GUI Widget ---------------------------------------------
752  const VirtualRobot::RobotPtr& robot,
753  const std::map<std::string, ConstControlDevicePtr>& controlDevices,
754  const std::map<std::string, ConstSensorDevicePtr>&)
755  {
756  using namespace armarx::WidgetDescription;
757  HBoxLayoutPtr layout = new HBoxLayout;
758 
759 
760  ::armarx::WidgetDescription::WidgetSeq widgets;
761 
762  /// select default config
763  LabelPtr label = new Label;
764  label->text = "select a controller config";
765 
766  StringComboBoxPtr cfgBox = new StringComboBox;
767  cfgBox->name = "config_box";
768  cfgBox->defaultIndex = 0;
769  cfgBox->multiSelect = false;
770 
771  cfgBox->options = std::vector<std::string>{"default", "default_right", "default_right_a7"};
772  ARMARX_TRACE;
773 
774  layout->children.emplace_back(label);
775  layout->children.emplace_back(cfgBox);
776  ARMARX_TRACE;
777 
778  layout->children.insert(layout->children.end(), widgets.begin(), widgets.end());
779  ARMARX_INFO_S << "Layout done";
780  return layout;
781  }
782 
786  {
787  auto cfgName = values.at("config_box")->getString();
788  const armarx::PackagePath configPath(
789  "armarx_control",
790  "controller_config/NJointTaskspaceMixedImpedanceVelocityController/" + cfgName +
791  ".json");
792  ARMARX_INFO_S << "Loading config from " << configPath.toSystemPath();
793  ARMARX_CHECK(std::filesystem::exists(configPath.toSystemPath()));
794 
795  auto cfgDTO = armarx::readFromJson<ConfigDict>(configPath.toSystemPath());
796 
797  ARMARX_TRACE;
798  return new ConfigurableNJointControllerConfig{cfgDTO.toAronDTO()};
799  }
800 
801 } // namespace armarx::control::njoint_controller::task_space
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::userConfig
ConfigDict userConfig
Definition: MixedImpedanceVelocityController.h:174
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::rtPreActivateController
void rtPreActivateController() override
This function is called before the controller is activated.
Definition: MixedImpedanceVelocityController.cpp:726
armarx::control::njoint_controller::task_space::registrationControllerNJointTaskspaceMixedImpedanceVelocityController
NJointControllerRegistration< NJointTaskspaceMixedImpedanceVelocityController > registrationControllerNJointTaskspaceMixedImpedanceVelocityController("NJointTaskspaceMixedImpedanceVelocityController")
armarx::ControlTargetBase::asA
const T * asA() const
Definition: ControlTargetBase.h:76
ArVizComponentPlugin.h
armarx::Variant
The Variant class is described here: Variants.
Definition: Variant.h:223
armarx::viz::Client::commit
CommitResult commit(StagedCommit const &commit)
Definition: Client.cpp:89
ARMARX_RT_LOGF_INFO
#define ARMARX_RT_LOGF_INFO(...)
Definition: ControlThreadOutputBuffer.h:344
SingleTypeVariantList.h
armarx::control::common::debugEigenPose
void debugEigenPose(StringVariantBaseMap &datafields, const std::string &name, Eigen::Matrix4f pose)
Definition: utils.cpp:113
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::getClassName
std::string getClassName(const Ice::Current &=Ice::emptyCurrent) const override
Definition: MixedImpedanceVelocityController.cpp:173
armarx::control::ethercat::RTUtility::RT_THREAD_PRIORITY
static constexpr int RT_THREAD_PRIORITY
The thread priority for rt-threads.
Definition: RTUtility.h:24
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::rtRun
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
Definition: MixedImpedanceVelocityController.cpp:380
armarx::NJointControllerBase::useSynchronizedRtRobot
const VirtualRobot::RobotPtr & useSynchronizedRtRobot(bool updateCollisionModel=false)
Requests a VirtualRobot for use in rtRun *.
Definition: NJointController.cpp:293
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::onPublish
void onPublish(const SensorAndControl &, const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &) override
Definition: MixedImpedanceVelocityController.cpp:657
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:110
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:171
armarx::SensorValueBase
The SensorValueBase class.
Definition: SensorValueBase.h:40
armarx::ControlTargetBase
Brief description of class JointControlTargetBase.
Definition: ControlTargetBase.h:47
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::ConfigPtrT
ConfigurableNJointControllerConfigPtr ConfigPtrT
Definition: MixedImpedanceVelocityController.h:56
RobotUnit.h
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::handleRTNotSafeInNonRT
void handleRTNotSafeInNonRT()
Definition: MixedImpedanceVelocityController.cpp:255
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::controllableNodeSets
std::map< std::string, VirtualRobot::RobotNodeSetPtr > controllableNodeSets
Definition: MixedImpedanceVelocityController.h:176
armarx::NJointControllerBase::useControlTarget
ControlTargetBase * useControlTarget(const std::string &deviceName, const std::string &controlMode)
Declares to calculate the ControlTarget for the given ControlDevice in the given ControlMode when rtR...
Definition: NJointController.cpp:410
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::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::updateTargetPose
bool updateTargetPose(const TargetPoseMap &targetPoseMap, const TargetNullspaceMap &targetNullspaceMap, const Ice::Current &=Ice::emptyCurrent) override
Definition: MixedImpedanceVelocityController.cpp:502
armarx::control::njoint_controller::task_space
Definition: AdmittanceController.cpp:43
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::additionalTask
virtual void additionalTask()
Definition: MixedImpedanceVelocityController.cpp:212
armarx::control::ethercat::RTUtility::pinThreadToCPU
static bool pinThreadToCPU(unsigned int cpu)
Pins the calling thread to the CPU with the given id.
Definition: RTUtility.cpp:52
ARMARX_CHECK_GREATER
#define ARMARX_CHECK_GREATER(lhs, rhs)
This macro evaluates whether lhs is greater (>) than rhs and if it turns out to be false it will thro...
Definition: ExpressionException.h:116
armarx::CycleUtil
This util class helps with keeping a cycle time during a control cycle.
Definition: CycleUtil.h:40
armarx::ManagedIceObject::getState
int getState() const
Retrieve current state of the ManagedIceObject.
Definition: ManagedIceObject.cpp:769
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::viz::Arrow
Definition: Elements.h:196
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
armarx::NJointControllerBase::ConfigPtrT
NJointControllerConfigPtr ConfigPtrT
Definition: NJointControllerBase.h:587
aron_conversions.h
MixedImpedanceVelocityController.h
armarx::viz::Layer::add
void add(ElementT const &element)
Definition: Layer.h:31
armarx::control::common::reportPoseDeviationWarning
void reportPoseDeviationWarning(const std::string &who, const Eigen::Matrix4f &pose1, const Eigen::Matrix4f &pose2, const std::string &namePose1, const std::string &namePose2)
Definition: utils.cpp:623
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::limbInit
void limbInit(const std::string nodeSetName, ArmPtr &arm, Config &cfg, VirtualRobot::RobotPtr &nonRtRobotPtr)
Definition: MixedImpedanceVelocityController.cpp:52
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::validateConfigData
void validateConfigData(Config &config, ArmPtr &arm)
Definition: MixedImpedanceVelocityController.cpp:534
ARMARX_CHECK
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
Definition: ExpressionException.h:82
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::getConfig
::armarx::aron::data::dto::DictPtr getConfig(const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MixedImpedanceVelocityController.cpp:430
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::NJointControllerBase::rtGetRobot
const VirtualRobot::RobotPtr & rtGetRobot()
TODO make protected and use attorneys.
Definition: NJointControllerBase.h:846
armarx::detail::ControlThreadOutputBufferEntry
Definition: ControlThreadOutputBuffer.h:182
visionx::voxelgrid::Label
uint32_t Label
Type of an object label.
Definition: types.h:6
armarx::control::TargetNullspaceMap
dictionary< string, Ice::FloatSeq > TargetNullspaceMap
Definition: ControllerInterface.ice:40
armarx::WidgetDescription
Definition: DefaultWidgetDescriptions.cpp:27
ARMARX_TRACE
#define ARMARX_TRACE
Definition: trace.h:77
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::limbNonRT
void limbNonRT(ArmPtr &arm)
Definition: MixedImpedanceVelocityController.cpp:205
armarx::PackagePath::toSystemPath
static std::filesystem::path toSystemPath(const data::PackagePath &pp)
Definition: PackagePath.cpp:47
armarx::NJointControllerBase::isControllerActive
bool isControllerActive(const Ice::Current &=Ice::emptyCurrent) const final override
Definition: NJointControllerBase.h:778
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::enableSafeGuardForceTorque
void enableSafeGuardForceTorque(const std::string &nodeSetName, const bool forceGuard, const bool torqueGuard, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MixedImpedanceVelocityController.cpp:445
armarx::NJointControllerBase::runTask
void runTask(const std::string &taskName, Task &&task)
Executes a given task in a separate thread from the Application ThreadPool.
Definition: NJointControllerBase.h:754
ARMARX_DEBUG
#define ARMARX_DEBUG
Definition: Logging.h:184
armarx::control::common::getPos
Eigen::Block< Eigen::Matrix4f, 3, 1 > getPos(Eigen::Matrix4f &matrix)
Definition: utils.cpp:212
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::NJointTaskspaceMixedImpedanceVelocityController
NJointTaskspaceMixedImpedanceVelocityController(const RobotUnitPtr &robotUnit, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: MixedImpedanceVelocityController.cpp:131
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::limbRTUpdateStatus
void limbRTUpdateStatus(ArmPtr &arm, const double deltaT)
-----------------------------— Real time cotnrol --------------------------------------—
Definition: MixedImpedanceVelocityController.cpp:277
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::isSafeForceTorque
bool isSafeForceTorque(const std::string &nodeSetName, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
-----------------------------— Other interaces ----------------------------------------—
Definition: MixedImpedanceVelocityController.cpp:472
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::limbReInit
void limbReInit(ArmPtr &arm)
Definition: MixedImpedanceVelocityController.cpp:680
armarx::control::common::getDeltaAngleBetweenPose
float getDeltaAngleBetweenPose(const Eigen::Matrix4f &pose1, const Eigen::Matrix4f &pose2)
Definition: utils.cpp:605
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::getTCPVel
Ice::FloatSeq getTCPVel(const std::string &rns, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MixedImpedanceVelocityController.cpp:488
ArmarXObjectScheduler.h
ControlTarget1DoFActuator.h
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:196
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::additionalTaskUpdateStatus
bool additionalTaskUpdateStatus()
Definition: MixedImpedanceVelocityController.cpp:223
armarx::control::ethercat::RTUtility::elevateThreadPriority
static bool elevateThreadPriority(int priority)
Elevate the thread priority of the calling thread to the given priority.
Definition: RTUtility.cpp:17
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::nonRtRobot
VirtualRobot::RobotPtr nonRtRobot
Definition: MixedImpedanceVelocityController.h:172
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::limbRT
void limbRT(ArmPtr &arm, const double deltaT)
Definition: MixedImpedanceVelocityController.cpp:346
armarx::control::common::debugEigenVec
void debugEigenVec(StringVariantBaseMap &datafields, const std::string &name, Eigen::VectorXf vec)
Definition: utils.cpp:125
utils.h
CycleUtil.h
armarx::RemoteGui::Client::HBoxLayout
Definition: Widgets.h:160
armarx::control::NJointTaskspaceMixedImpedanceVelocityControllerInterface::calibrateFTSensor
void calibrateFTSensor()
ft sensor
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::onInitNJointController
void onInitNJointController() override
NJointControllerBase interface.
Definition: MixedImpedanceVelocityController.cpp:179
NJointController.h
armarx::aron::data::DictPtr
std::shared_ptr< Dict > DictPtr
Definition: Dict.h:41
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::rtPostDeactivateController
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
Definition: MixedImpedanceVelocityController.cpp:741
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::limbRTSetTarget
void limbRTSetTarget(ArmPtr &arm, const size_t nDoFTorque, const size_t nDoFVelocity, const Eigen::VectorXf &targetTorque, const Eigen::VectorXf &targetVelocity)
Definition: MixedImpedanceVelocityController.cpp:303
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::updateConfig
void updateConfig(const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
NJointController interface.
Definition: MixedImpedanceVelocityController.cpp:398
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition: CtrlUtil.h:39
ARMARX_CHECK_EXPRESSION
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
Definition: ExpressionException.h:73
TimeUtil.h
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::GenerateConfigDescription
static WidgetDescription::WidgetPtr GenerateConfigDescription(const VirtualRobot::RobotPtr &, const std::map< std::string, ConstControlDevicePtr > &, const std::map< std::string, ConstSensorDevicePtr > &)
--------------------------------— GUI Widget ------------------------------------------—
Definition: MixedImpedanceVelocityController.cpp:751
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:181
armarx::ArVizComponentPluginUser::arviz
armarx::viz::Client arviz
Definition: ArVizComponentPlugin.h:42
VAROUT
#define VAROUT(x)
Definition: StringHelpers.h:198
IceUtil::Handle< class RobotUnit >
armarx::viz::ElementOps::color
DerivedT & color(Color color)
Definition: ElementOps.h:218
IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface >
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::hands
core::HandControlPtr hands
Definition: MixedImpedanceVelocityController.h:175
armarx::control::TargetPoseMap
dictionary< string, FloatSeqSeq > TargetPoseMap
Definition: ControllerInterface.ice:39
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::GenerateConfigFromVariants
static ConfigPtrT GenerateConfigFromVariants(const StringVariantBaseMap &values)
Definition: MixedImpedanceVelocityController.cpp:784
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::Config
law::TaskspaceMixedImpedanceVelocityController::Config Config
Definition: MixedImpedanceVelocityController.h:57
ARMARX_INFO_S
#define ARMARX_INFO_S
Definition: Logging.h:202
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::limbPublish
void limbPublish(ArmPtr &arm, const DebugObserverInterfacePrx &debugObs)
Definition: MixedImpedanceVelocityController.cpp:583
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::ArmPtr
std::unique_ptr< ArmData > ArmPtr
Definition: MixedImpedanceVelocityController.h:104
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::additionalTaskSetTarget
void additionalTaskSetTarget()
Definition: MixedImpedanceVelocityController.cpp:242
armarx::control::common::sVecToString
std::string sVecToString(const std::vector< std::string > &vec, const std::string &delimiter)
Definition: utils.cpp:318
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_WARNING
#define ARMARX_WARNING
Definition: Logging.h:193
armarx::viz::Client::layer
Layer layer(std::string const &name) const
Definition: Client.cpp:80
ARMARX_RT_LOGF_WARN
#define ARMARX_RT_LOGF_WARN(...)
Definition: ControlThreadOutputBuffer.h:350
armarx::PackagePath
Definition: PackagePath.h:52
armarx::viz::Layer
Definition: Layer.h:12
armarx::control::njoint_controller::task_space::NJointTaskspaceMixedImpedanceVelocityController::robotUnit
RobotUnitPtr robotUnit
Definition: MixedImpedanceVelocityController.h:173
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
RTUtility.h
NJointControllerRegistry.h
armarx::ManagedIceObject::getObjectScheduler
ArmarXObjectSchedulerPtr getObjectScheduler() const
Definition: ManagedIceObject.cpp:776
armarx::NJointControllerBase::useSensorValue
const SensorValueBase * useSensorValue(const std::string &sensorDeviceName) const
Get a const ptr to the given SensorDevice's SensorValue.
Definition: NJointController.cpp:383
armarx::green
QColor green()
Definition: StyleSheets.h:72
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19
PackagePath.h
norm
double norm(const Point &a)
Definition: point.hpp:102