NJointCartesianWaypointController.cpp
Go to the documentation of this file.
2 
3 #include <iomanip>
4 
6 
13 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
14 
15 namespace armarx
16 {
17  std::ostream&
18  operator<<(std::ostream& out, const NJointCartesianWaypointControllerRuntimeConfig& cfg)
19  {
20  out << "maxPositionAcceleration " << cfg.wpCfg.maxPositionAcceleration << '\n'
21  << "maxOrientationAcceleration " << cfg.wpCfg.maxOrientationAcceleration << '\n'
22  << "maxNullspaceAcceleration " << cfg.wpCfg.maxNullspaceAcceleration << '\n'
23 
24  << "kpJointLimitAvoidance " << cfg.wpCfg.kpJointLimitAvoidance << '\n'
25  << "jointLimitAvoidanceScale " << cfg.wpCfg.jointLimitAvoidanceScale << '\n'
26 
27  << "thresholdPositionNear " << cfg.wpCfg.thresholdPositionNear << '\n'
28  << "thresholdPositionReached " << cfg.wpCfg.thresholdPositionReached << '\n'
29  << "maxPosVel " << cfg.wpCfg.maxPosVel << '\n'
30  << "kpPos " << cfg.wpCfg.kpPos << '\n'
31 
32  << "thresholdOrientationNear " << cfg.wpCfg.thresholdOrientationNear << '\n'
33  << "thresholdOrientationReached " << cfg.wpCfg.thresholdOrientationReached << '\n'
34  << "maxOriVel " << cfg.wpCfg.maxOriVel << '\n'
35  << "kpOri " << cfg.wpCfg.kpOri << '\n'
36 
37  << "forceThreshold " << cfg.forceThreshold << '\n';
38  return out;
39  }
40 
41  NJointControllerRegistration<NJointCartesianWaypointController>
43  "NJointCartesianWaypointController");
44 
45  std::string
47  {
48  return "NJointCartesianWaypointController";
49  }
50 
52  RobotUnit*,
53  const NJointCartesianWaypointControllerConfigPtr& config,
55  {
56  ARMARX_CHECK_NOT_NULL(config);
57 
58  //robot
59  {
60  _rtRobot = useSynchronizedRtRobot();
61  ARMARX_CHECK_NOT_NULL(_rtRobot);
62 
63  _rtRns = _rtRobot->getRobotNodeSet(config->rns);
64  ARMARX_CHECK_NOT_NULL(_rtRns) << "No rns " << config->rns;
65  _rtTcp = _rtRns->getTCP();
66  ARMARX_CHECK_NOT_NULL(_rtTcp) << "No tcp in rns " << config->rns;
67 
68  _rtRobotRoot = _rtRobot->getRootNode();
69  }
70 
71  //sensor
72  {
73  if (!config->ftName.empty())
74  {
75  const auto svalFT = useSensorValue<SensorValueForceTorque>(config->ftName);
76  ARMARX_CHECK_NOT_NULL(svalFT) << "No sensor value of name " << config->ftName;
77  _rtForceSensor = &(svalFT->force);
78  _rtTorqueSensor = &(svalFT->force);
79 
80  const auto sdev = peekSensorDevice(config->ftName);
82 
83  const auto reportFrameName = sdev->getReportingFrame();
84  ARMARX_CHECK_EXPRESSION(!reportFrameName.empty())
85  << VAROUT(sdev->getReportingFrame());
86 
87  _rtFT = _rtRobot->getRobotNode(reportFrameName);
89  << "No sensor report frame '" << reportFrameName << "' in robot";
90  }
91  }
92  //ctrl
93  {
94  _rtJointVelocityFeedbackBuffer =
95  Eigen::VectorXf::Zero(static_cast<int>(_rtRns->getSize()));
96 
97  VirtualRobot::RobotNodePtr referenceFrame = nullptr;
98  if (!config->referenceFrameName.empty())
99  {
100  referenceFrame = _rtRobot->getRobotNode(config->referenceFrameName);
101  ARMARX_CHECK_NOT_NULL(referenceFrame)
102  << "No node with name '" << config->referenceFrameName
103  << "' for referenceFrame in robot";
104  }
105 
106  _rtWpController = std::make_unique<CartesianWaypointController>(
107  _rtRns,
108  _rtJointVelocityFeedbackBuffer,
109  config->runCfg.wpCfg.maxPositionAcceleration,
110  config->runCfg.wpCfg.maxOrientationAcceleration,
111  config->runCfg.wpCfg.maxNullspaceAcceleration,
112  nullptr,
113  referenceFrame);
114 
115  _rtWpController->setConfig({});
116 
117  for (size_t i = 0; i < _rtRns->getSize(); ++i)
118  {
119  std::string jointName = _rtRns->getNode(i)->getName();
120  auto ct = useControlTarget<ControlTarget1DoFActuatorVelocity>(
121  jointName, ControlModes::Velocity1DoF);
122  auto sv = useSensorValue<SensorValue1DoFActuatorVelocity>(jointName);
125 
126  _rtVelTargets.emplace_back(&(ct->velocity));
127  _rtVelSensors.emplace_back(&(sv->velocity));
128  }
129  }
130  //visu
131  {
132  _tripRt2NonRtRobotGP.getWriteBuffer().setIdentity();
133  _tripRt2NonRtRobotGP.commitWrite();
134  }
135  }
136 
137  void
139  {
140  _publishIsAtTarget = false;
141  _rtForceOffset = Eigen::Vector3f::Zero();
142 
143  _publishErrorPos = 0;
144  _publishErrorOri = 0;
145  _publishErrorPosMax = 0;
146  _publishErrorOriMax = 0;
147  _publishForceThreshold = _rtForceThreshold;
148 
149  //feedback
150  {
151 #pragma GCC diagnostic push
152 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
153  for (std::size_t idx = 0; idx < _rtVelSensors.size(); ++idx)
154  {
155  const float* ptr = _rtVelSensors[idx];
156  _rtJointVelocityFeedbackBuffer(idx) = *ptr;
157  }
158  _rtWpController->setCurrentJointVelocity(_rtJointVelocityFeedbackBuffer);
159 #pragma GCC diagnostic pop
160  }
161  }
162 
163  void
165  const IceUtil::Time& timeSinceLastIteration)
166  {
167  auto& rt2nonrtBuf = _tripRt2NonRt.getWriteBuffer();
168 
169  if (_tripBufWpCtrl.updateReadBuffer())
170  {
171  ARMARX_RT_LOGF_IMPORTANT("updates in tripple buffer");
172  auto& r = _tripBufWpCtrl._getNonConstReadBuffer();
173  if (r.cfgUpdated)
174  {
175  r.cfgUpdated = false;
176  _rtWpController->setConfig(r.cfg.wpCfg);
177  _rtForceThreshold = r.cfg.forceThreshold;
178  _publishForceThreshold = _rtForceThreshold;
179  _rtOptimizeNullspaceIfTargetWasReached = r.cfg.optimizeNullspaceIfTargetWasReached;
180  _rtForceThresholdInRobotRootZ = r.cfg.forceThresholdInRobotRootZ;
181  _publishForceThresholdInRobotRootZ = r.cfg.forceThresholdInRobotRootZ;
182  ARMARX_RT_LOGF_IMPORTANT("updated the controller config");
183  }
184  if (r.wpsUpdated)
185  {
186  _rtStopConditionReached = false;
187  _publishIsAtTarget = false;
188  r.wpsUpdated = false;
189  ARMARX_RT_LOGF_IMPORTANT("updated waypoints (# = %u)", r.wps.size());
190  _publishWpsNum = r.wps.size();
191  _rtHasWps = !r.wps.empty();
192  _rtWpController->swapWaypoints(r.wps);
193  if (r.cfg.skipToClosestWaypoint)
194  {
195  _rtWpController->skipToClosestWaypoint(r.skipRad2mmFactor);
196  }
197  }
198  _publishIsAtForceLimit = false;
199  }
200  //run
201  bool reachedTarget = false;
202  bool reachedFtLimit = false;
203 
204  if (_rtForceSensor)
205  {
206  const Eigen::Vector3f ftInRoot =
207  _rtFT->getTransformationTo(_rtRobotRoot).topLeftCorner<3, 3>().transpose() *
208  (*_rtForceSensor);
209  rt2nonrtBuf.ft.force = ftInRoot;
210  rt2nonrtBuf.ft.torque = *_rtTorqueSensor;
211  rt2nonrtBuf.ft.timestampInUs = sensorValuesTimestamp.toMicroSeconds();
212  rt2nonrtBuf.ftInRoot = _rtFT->getPoseInRootFrame();
213 
214  Eigen::Vector3f ftVal = ftInRoot;
215  if (_rtForceThresholdInRobotRootZ)
216  {
217  ftVal(0) = 0;
218  ftVal(1) = 0;
219  }
220  if (_setFTOffset)
221  {
222  _rtForceOffset = ftVal;
223  _setFTOffset = false;
224  _publishIsAtForceLimit = false;
225  }
226  rt2nonrtBuf.ftUsed = ftVal;
227 
228  const float currentForce = std::abs(ftVal.norm() - _rtForceOffset.norm());
229 
230  reachedFtLimit = (_rtForceThreshold >= 0) && currentForce > _rtForceThreshold;
231  _publishForceCurrent = currentForce;
232  _publishIsAtForceLimit = _publishIsAtForceLimit || reachedFtLimit;
233  }
234 
235  _publishWpsCur = _rtHasWps ? _rtWpController->currentWaypointIndex : 0;
236 
237  rt2nonrtBuf.rootPose = _rtRobot->getGlobalPose();
238  rt2nonrtBuf.tcp = _rtTcp->getPoseInRootFrame();
239  if (_rtHasWps)
240  {
241  const float errorPos = _rtWpController->getPositionError();
242  const float errorOri = _rtWpController->getOrientationError();
243 
244  _publishErrorPos = errorPos;
245  _publishErrorOri = errorOri;
246  if (!_rtWpController->isLastWaypoint())
247  {
248  _publishErrorPosMax = _rtWpController->thresholdPositionNear;
249  _publishErrorOriMax = _rtWpController->thresholdOrientationNear;
250  }
251  else
252  {
253  _publishErrorPosMax = _rtWpController->thresholdPositionReached;
254  _publishErrorOriMax = _rtWpController->thresholdOrientationReached;
255  reachedTarget = (errorPos < _rtWpController->thresholdPositionReached) &&
256  (errorOri < _rtWpController->thresholdOrientationReached);
257  }
258  rt2nonrtBuf.tcpTarg = _rtWpController->getCurrentTarget();
259  }
260  else
261  {
262  rt2nonrtBuf.tcpTarg = rt2nonrtBuf.tcp;
263  }
264  _rtStopConditionReached = _rtStopConditionReached || reachedFtLimit ||
265  (reachedTarget && !_rtOptimizeNullspaceIfTargetWasReached);
266  _publishIsAtTarget = _publishIsAtTarget || reachedTarget;
267  if (!_rtHasWps || _rtStopConditionReached)
268  {
269  setNullVelocity();
270  }
271  else
272  {
273  const Eigen::VectorXf& goal =
274  _rtWpController->calculate(timeSinceLastIteration.toSecondsDouble());
275  //write targets
276  ARMARX_CHECK_EQUAL(static_cast<std::size_t>(goal.size()), _rtVelTargets.size());
277  for (std::size_t idx = 0; idx < _rtVelTargets.size(); ++idx)
278  {
279  float* ptr = _rtVelTargets[idx];
280  *ptr = goal(idx);
281  }
282  }
283  _tripRt2NonRt.commitWrite();
284 
285  _tripRt2NonRtRobotGP.getWriteBuffer() = _rtRobot->getGlobalPose();
286  _tripRt2NonRtRobotGP.commitWrite();
287  }
288 
289  void
291  {
292  }
293 
294  bool
296  {
297  return _publishIsAtTarget;
298  }
299 
300  void
302  const NJointCartesianWaypointControllerRuntimeConfig& cfg,
303  const Ice::Current&)
304  {
305  std::lock_guard g{_tripBufWpCtrlMut};
306  auto& w = _tripBufWpCtrl.getWriteBuffer();
307  w.cfgUpdated = true;
308  w.cfg = cfg;
309  _tripBufWpCtrl.commitWrite();
310  ARMARX_IMPORTANT << "set new config\n" << cfg;
311  }
312 
313  void
314  NJointCartesianWaypointController::setWaypoints(const std::vector<Eigen::Matrix4f>& wps,
315  const Ice::Current&)
316  {
317  std::lock_guard g{_tripBufWpCtrlMut};
318  auto& w = _tripBufWpCtrl.getWriteBuffer();
319  w.wpsUpdated = true;
320  w.wps = wps;
321  _tripBufWpCtrl.commitWrite();
322  ARMARX_IMPORTANT << "set new waypoints\n" << wps;
323  }
324 
325  void
327  {
328  std::lock_guard g{_tripBufWpCtrlMut};
329  auto& w = _tripBufWpCtrl.getWriteBuffer();
330  w.wpsUpdated = true;
331  w.wps.clear();
332  w.wps.emplace_back(wp);
333  _tripBufWpCtrl.commitWrite();
334  ARMARX_IMPORTANT << "set new waypoint\n" << wp;
335  }
336 
337  void
338  NJointCartesianWaypointController::setWaypointAx(const Ice::FloatSeq& data, const Ice::Current&)
339  {
340  Eigen::Matrix4f wp(data.data());
341  std::lock_guard g{_tripBufWpCtrlMut};
342  auto& w = _tripBufWpCtrl.getWriteBuffer();
343  w.wpsUpdated = true;
344  w.wps.clear();
345  w.wps.emplace_back(wp);
346  _tripBufWpCtrl.commitWrite();
347  ARMARX_IMPORTANT << "set new waypoint\n" << wp;
348  }
349 
350  void
352  const NJointCartesianWaypointControllerRuntimeConfig& cfg,
353  const std::vector<Eigen::Matrix4f>& wps,
354  const Ice::Current&)
355  {
356  std::lock_guard g{_tripBufWpCtrlMut};
357  auto& w = _tripBufWpCtrl.getWriteBuffer();
358  w.wpsUpdated = true;
359  w.cfgUpdated = true;
360  w.cfg = cfg;
361  w.wps = wps;
362  _tripBufWpCtrl.commitWrite();
363  ARMARX_IMPORTANT << "set new config\n" << cfg << " and new waypoints\n" << wps;
364  }
365 
366  void
368  const NJointCartesianWaypointControllerRuntimeConfig& cfg,
369  const Eigen::Matrix4f& wp,
370  const Ice::Current&)
371  {
372  std::lock_guard g{_tripBufWpCtrlMut};
373  auto& w = _tripBufWpCtrl.getWriteBuffer();
374  w.wpsUpdated = true;
375  w.cfgUpdated = true;
376  w.cfg = cfg;
377  w.wps.clear();
378  w.wps.emplace_back(wp);
379  _tripBufWpCtrl.commitWrite();
380  ARMARX_IMPORTANT << "set new config\n" << cfg << "and a new waypoint\n" << wp;
381  }
382 
383  void
384  NJointCartesianWaypointController::setNullVelocity()
385  {
386  for (auto ptr : _rtVelTargets)
387  {
388  *ptr = 0;
389  }
390  }
391 
392  bool
394  {
395  ARMARX_CHECK_NOT_NULL(_rtForceSensor);
396  return _publishIsAtForceLimit;
397  }
398 
399  FTSensorValue
401  {
402  ARMARX_CHECK_NOT_NULL(_rtForceSensor);
403  std::lock_guard g{_tripRt2NonRtMutex};
404  return _tripRt2NonRt.getUpToDateReadBuffer().ft;
405  }
406 
407  void
409  {
410  ARMARX_CHECK_NOT_NULL(_rtForceSensor);
411  _setFTOffset = true;
412  }
413 
414  void
416  const Ice::Current&)
417  {
418  ; // No longer used ...
419  }
420 
421  void
423  {
424  ; // No longer used ...
425  }
426 
427  void
429  {
430  std::lock_guard g{_tripBufWpCtrlMut};
431  auto& w = _tripBufWpCtrl.getWriteBuffer();
432  w.wpsUpdated = true;
433  w.cfgUpdated = false;
434  w.wps.clear();
435  _tripBufWpCtrl.commitWrite();
436  ARMARX_IMPORTANT << "stop movement by setting 0 waypoints";
437  }
438 
439  void
441  const DebugDrawerInterfacePrx& drawer,
442  const DebugObserverInterfacePrx& obs)
443  {
444  const std::size_t wpsNum = _publishWpsNum;
445  const std::size_t wpsCur = wpsNum ? _publishWpsCur + 1 : 0;
446 
447  const float errorPos = _publishErrorPos;
448  const float errorOri = _publishErrorOri;
449  const float errorPosMax = _publishErrorPosMax;
450  const float errorOriMax = _publishErrorOriMax;
451  const float forceThreshold = _publishForceThreshold;
452  const float forceCurrent = _publishForceCurrent;
453 
454  {
455  StringVariantBaseMap datafields;
456  datafields["WpNum"] = new Variant(static_cast<int>(wpsNum));
457  datafields["WpCur"] = new Variant(static_cast<int>(wpsCur));
458 
459  datafields["errorPos"] = new Variant(errorPos);
460  datafields["errorOri"] = new Variant(errorOri);
461  datafields["errorPosMax"] = new Variant(errorPosMax);
462  datafields["errorOriMax"] = new Variant(errorOriMax);
463 
464  datafields["forceThreshold"] = new Variant(forceThreshold);
465  datafields["forceCurrent"] = new Variant(forceCurrent);
466 
467  obs->setDebugChannel(getInstanceName(), datafields);
468  }
469 
470  ARMARX_INFO << deactivateSpam(1) << std::setprecision(4) << "At waypoint " << wpsCur
471  << " / " << wpsNum << " (last " << _publishIsAtTarget << ", ft limit "
472  << _publishIsAtForceLimit << ", perror " << errorPos << " / " << errorPosMax
473  << ", oerror " << errorOri << " / " << errorOriMax << ')';
474 
475  {
476  std::lock_guard g{_tripRt2NonRtMutex};
477  const auto& buf = _tripRt2NonRt.getUpToDateReadBuffer();
478 
479  const Eigen::Matrix4f fakeGP = _tripRt2NonRtRobotGP.getUpToDateReadBuffer();
480  const Eigen::Matrix4f gp = std::isfinite(fakeGP(0, 0)) ? fakeGP : buf.rootPose;
481 
482  if (buf.tcp != buf.tcpTarg)
483  {
484  const Eigen::Matrix4f gtcp = gp * buf.tcp;
485  const Eigen::Matrix4f gtcptarg = gp * buf.tcpTarg;
486  drawer->setPoseVisu(getName(), "tcp", new Pose(gtcp));
487  drawer->setPoseVisu(getName(), "tcptarg", new Pose(gtcptarg));
488  drawer->setLineVisu(getName(),
489  "tcp2targ",
490  new Vector3(Eigen::Vector3f{gtcp.topRightCorner<3, 1>()}),
491  new Vector3(Eigen::Vector3f{gtcptarg.topRightCorner<3, 1>()}),
492  3,
493  {0, 0, 1, 1});
494  }
495  else
496  {
497  drawer->removePoseVisu(getName(), "tcp");
498  drawer->removePoseVisu(getName(), "tcptarg");
499  drawer->removeLineVisu(getName(), "tcp2targ");
500  }
501  if (_rtForceSensor)
502  {
503  const Eigen::Matrix4f gft = gp * buf.ftInRoot;
504  const Vector3Ptr pos = new Vector3{Eigen::Vector3f{gft.topRightCorner<3, 1>()}};
505  drawer->setArrowVisu(getName(),
506  "force",
507  pos,
508  new Vector3{buf.ft.force.normalized()},
509  {1, 1, 0, 1},
510  buf.ft.force.norm(),
511  2.5);
512  drawer->setArrowVisu(getName(),
513  "forceUsed",
514  pos,
515  new Vector3{buf.ftUsed.normalized()},
516  {1, 0.5, 0, 1},
517  buf.ftUsed.norm(),
518  2.5);
519  }
520  }
521  }
522 
523  int
525  {
526  return _publishWpsCur;
527  }
528 } // namespace armarx
armarx::Variant
The Variant class is described here: Variants.
Definition: Variant.h:224
armarx::NJointControllerBase::peekSensorDevice
ConstSensorDevicePtr peekSensorDevice(const std::string &deviceName) const
Get a const ptr to the given SensorDevice.
Definition: NJointController.cpp:275
armarx::NJointCartesianWaypointController::setCurrentFTAsOffset
void setCurrentFTAsOffset(const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:408
armarx::NJointControllerBase::getInstanceName
std::string getInstanceName(const Ice::Current &=Ice::emptyCurrent) const final override
Definition: NJointControllerBase.h:803
armarx::TripleBuffer::getWriteBuffer
T & getWriteBuffer()
Definition: TripleBuffer.h:90
armarx::NJointControllerBase::useSynchronizedRtRobot
const VirtualRobot::RobotPtr & useSynchronizedRtRobot(bool updateCollisionModel=false)
Requests a VirtualRobot for use in rtRun *.
Definition: NJointController.cpp:293
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
ARMARX_IMPORTANT
#define ARMARX_IMPORTANT
Definition: Logging.h:183
armarx::NJointCartesianWaypointController::NJointCartesianWaypointController
NJointCartesianWaypointController(RobotUnit *robotUnit, const NJointCartesianWaypointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: NJointCartesianWaypointController.cpp:51
SensorDevice.h
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition: basic_types.h:31
armarx::TripleBuffer::commitWrite
void commitWrite()
Definition: TripleBuffer.h:146
armarx::registrationControllerNJointCartesianWaypointController
NJointControllerRegistration< NJointCartesianWaypointController > registrationControllerNJointCartesianWaypointController("NJointCartesianWaypointController")
armarx::WriteBufferedTripleBuffer::commitWrite
void commitWrite()
Definition: TripleBuffer.h:326
ARMARX_CHECK_NOT_NULL
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Definition: ExpressionException.h:206
armarx::WriteBufferedTripleBuffer::updateReadBuffer
bool updateReadBuffer() const
Swaps in the hidden buffer if it contains new data.
Definition: TripleBuffer.h:321
armarx::NJointCartesianWaypointController::setWaypoint
void setWaypoint(const Eigen::Matrix4f &wp, const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:326
trace.h
SensorValueForceTorque.h
armarx::NJointCartesianWaypointController::rtPreActivateController
void rtPreActivateController() override
This function is called before the controller is activated.
Definition: NJointCartesianWaypointController.cpp:138
armarx::NJointCartesianWaypointController::setVisualizationRobotGlobalPose
void setVisualizationRobotGlobalPose(const Eigen::Matrix4f &p, const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:415
armarx::NJointCartesianWaypointController::resetVisualizationRobotGlobalPose
void resetVisualizationRobotGlobalPose(const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:422
NJointCartesianWaypointController.h
armarx::NJointCartesianWaypointController::hasReachedForceLimit
bool hasReachedForceLimit(const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:393
armarx::NJointCartesianWaypointController::getCurrentWaypointIndex
int getCurrentWaypointIndex(const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:524
armarx::NJointCartesianWaypointController::setConfigAndWaypoint
void setConfigAndWaypoint(const NJointCartesianWaypointControllerRuntimeConfig &cfg, const Eigen::Matrix4f &wp, const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:367
armarx::NJointCartesianWaypointController::setConfigAndWaypoints
void setConfigAndWaypoints(const NJointCartesianWaypointControllerRuntimeConfig &cfg, const std::vector< Eigen::Matrix4f > &wps, const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:351
IceInternal::Handle< Vector3 >
std::isfinite
bool isfinite(const std::vector< T, Ts... > &v)
Definition: algorithm.h:327
armarx::detail::ControlThreadOutputBufferEntry
Definition: ControlThreadOutputBuffer.h:177
armarx::NJointCartesianWaypointController::rtPostDeactivateController
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
Definition: NJointCartesianWaypointController.cpp:290
armarx::abs
std::vector< T > abs(const std::vector< T > &v)
Definition: VectorHelpers.h:253
armarx::NJointCartesianWaypointController::onPublish
void onPublish(const SensorAndControl &, const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &) override
Definition: NJointCartesianWaypointController.cpp:440
armarx::WriteBufferedTripleBuffer::_getNonConstReadBuffer
T & _getNonConstReadBuffer()
Definition: TripleBuffer.h:302
armarx::NJointCartesianWaypointController::stopMovement
void stopMovement(const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:428
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
armarx::NJointCartesianWaypointController::getClassName
std::string getClassName(const Ice::Current &=Ice::emptyCurrent) const override
Definition: NJointCartesianWaypointController.cpp:46
armarx::NJointCartesianWaypointController::setWaypoints
void setWaypoints(const std::vector< Eigen::Matrix4f > &wps, const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:314
armarx::Vector3
The Vector3 class.
Definition: Pose.h:112
ControlTarget1DoFActuator.h
armarx::WriteBufferedTripleBuffer::getWriteBuffer
T & getWriteBuffer()
Definition: TripleBuffer.h:280
armarx::NJointCartesianWaypointController::setConfig
void setConfig(const NJointCartesianWaypointControllerRuntimeConfig &cfg, const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:301
ARMARX_RT_LOGF_IMPORTANT
#define ARMARX_RT_LOGF_IMPORTANT(...)
Definition: ControlThreadOutputBuffer.h:341
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
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
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
VAROUT
#define VAROUT(x)
Definition: StringHelpers.h:182
armarx::RobotUnit
The RobotUnit class manages a robot and its controllers.
Definition: RobotUnit.h:180
armarx::NJointCartesianWaypointController::getFTSensorValue
FTSensorValue getFTSensorValue(const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:400
memoryx::KBM::Vector3
Eigen::Vector3d Vector3
Definition: kbm.h:41
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
armarx::operator<<
std::ostream & operator<<(std::ostream &os, const PythonApplicationManager::Paths &paths)
Definition: PythonApplicationManager.cpp:221
armarx::Logging::deactivateSpam
SpamFilterDataPtr deactivateSpam(float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
disables the logging for the current line for the given amount of seconds.
Definition: Logging.cpp:92
armarx::ManagedIceObject::getName
std::string getName() const
Retrieve name of object.
Definition: ManagedIceObject.cpp:107
ControlThreadOutputBuffer.h
armarx::NJointCartesianWaypointController::setWaypointAx
void setWaypointAx(const Ice::FloatSeq &data, const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:338
armarx::NJointCartesianWaypointController::rtRun
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
Definition: NJointCartesianWaypointController.cpp:164
armarx::TripleBuffer::getUpToDateReadBuffer
const T & getUpToDateReadBuffer() const
Definition: TripleBuffer.h:108
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:706
NJointControllerRegistry.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
SensorValue1DoFActuator.h
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
armarx::NJointCartesianWaypointController::hasReachedTarget
bool hasReachedTarget(const Ice::Current &=Ice::emptyCurrent) override
Definition: NJointCartesianWaypointController.cpp:295