FrameTracking.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 RobotAPI::ArmarXObjects::FrameTracking
17  * @author Adrian Knobloch ( adrian dot knobloch at student dot kit dot edu )
18  * @date 2019
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #include "FrameTracking.h"
24 
26 #include <ArmarXCore/interface/core/BasicVectorTypesHelpers.h>
28 
30 
32 
33 #include <time.h>
34 
35 
36 namespace armarx
37 {
39  {
40  usingProxy(getProperty<std::string>("RobotStateComponentName").getValue());
41  usingProxy(getProperty<std::string>("KinematicUnitName").getValue());
42  usingProxy(getProperty<std::string>("KinematicUnitObserverName").getValue());
43  if (!getProperty<std::string>("RemoteGuiName").getValue().empty())
44  {
45  usingProxy(getProperty<std::string>("RemoteGuiName").getValue());
46  }
47 
48  enabled = false;
49  frameName = getProperty<std::string>("FrameOnStartup").getValue();
50 
51  maxYawVelocity = getProperty<float>("MaxYawVelocity").getValue();
52  yawAcceleration = getProperty<float>("YawAcceleration").getValue();
53 
54  maxPitchVelocity = getProperty<float>("MaxPitchVelocity").getValue();
55  pitchAcceleration = getProperty<float>("PitchAcceleration").getValue();
56  }
57 
58 
60  {
61  robotStateComponent = getProxy<RobotStateComponentInterfacePrx>(
62  getProperty<std::string>("RobotStateComponentName").getValue());
63  kinematicUnitInterfacePrx = getProxy<KinematicUnitInterfacePrx>(
64  getProperty<std::string>("KinematicUnitName").getValue());
65  kinematicUnitObserverInterfacePrx = getProxy<KinematicUnitObserverInterfacePrx>(
66  getProperty<std::string>("KinematicUnitObserverName").getValue());
67 
69  headYawJoint = localRobot->getRobotNode(getProperty<std::string>("HeadYawJoint").getValue());
70  if (!headYawJoint || !(headYawJoint->isRotationalJoint() || headYawJoint->isTranslationalJoint()))
71  {
72  ARMARX_ERROR << getProperty<std::string>("HeadYawJoint").getValue() << " is not a valid joint.";
73  getArmarXManager()->asyncShutdown();
74  }
75  headPitchJoint = localRobot->getRobotNode(getProperty<std::string>("HeadPitchJoint").getValue());
76  if (!headPitchJoint || !(headPitchJoint->isRotationalJoint() || headPitchJoint->isTranslationalJoint()))
77  {
78  ARMARX_ERROR << getProperty<std::string>("HeadPitchJoint").getValue() << " is not a valid joint.";
79  getArmarXManager()->asyncShutdown();
80  }
81  cameraNode = localRobot->getRobotNode(getProperty<std::string>("CameraNode").getValue());
82  if (!cameraNode)
83  {
84  ARMARX_ERROR << getProperty<std::string>("CameraNode").getValue() << " is not a valid node.";
85  getArmarXManager()->asyncShutdown();
86  }
87 
89  _enableTracking(getProperty<bool>("EnableTrackingOnStartup").getValue());
90 
91  if (!getProperty<std::string>("RemoteGuiName").getValue().empty())
92  {
93  _remoteGui = getProxy<RemoteGuiInterfacePrx>(getProperty<std::string>("RemoteGuiName").getValue());
95 
96  rootLayoutBuilder.addChild(
97  RemoteGui::makeHBoxLayout().addChild(RemoteGui::makeTextLabel("Tracking: ")).addChild(
98  RemoteGui::makeTextLabel("Enabled")).addChild(
99  RemoteGui::makeCheckBox("enabled").value(enabled)).addChild(
100  RemoteGui::makeTextLabel("Frame")).addChild(
101  RemoteGui::makeComboBox("tracking_frame").options(
102  localRobot->getRobotNodeNames()).addOptions({""}).value(frameName)));
103 
104  rootLayoutBuilder.addChild(
105  RemoteGui::makeHBoxLayout().addChild(RemoteGui::makeTextLabel("Look at frame: ")).addChild(
106  RemoteGui::makeComboBox("frame_look").options(localRobot->getRobotNodeNames()).value(
108  RemoteGui::makeButton("button_look_at_frame").label("look at")));
109 
110  rootLayoutBuilder.addChild(
111  RemoteGui::makeHBoxLayout().addChild(RemoteGui::makeTextLabel("Look at global point: ")).addChild(
112  RemoteGui::makeFloatSpinBox("global_point_x").min(-1000000000).max(1000000000).steps(
113  2 * 1000000000 / 10).value(0.f)).addChild(
114  RemoteGui::makeFloatSpinBox("global_point_y").min(-1000000000).max(1000000000).steps(
115  2 * 1000000000 / 10).value(0.f)).addChild(
116  RemoteGui::makeFloatSpinBox("global_point_z").min(-1000000000).max(1000000000).steps(
117  2 * 1000000000 / 10).value(0.f)).addChild(
118  RemoteGui::makeButton("button_look_at_global_point").label("look at")));
119 
120  rootLayoutBuilder.addChild(RemoteGui::makeHBoxLayout().addChild(
121  RemoteGui::makeTextLabel("Look at point in robot frame: ")).addChild(
122  RemoteGui::makeFloatSpinBox("robot_point_x").min(-1000000000).max(1000000000).steps(
123  2 * 1000000000 / 10).value(0.f)).addChild(
124  RemoteGui::makeFloatSpinBox("robot_point_y").min(-1000000000).max(1000000000).steps(
125  2 * 1000000000 / 10).value(0.f)).addChild(
126  RemoteGui::makeFloatSpinBox("robot_point_z").min(-1000000000).max(1000000000).steps(
127  2 * 1000000000 / 10).value(0.f)).addChild(
128  RemoteGui::makeButton("button_look_at_robot_point").label("look at")));
129 
130  rootLayoutBuilder.addChild(
131  RemoteGui::makeHBoxLayout().addChild(RemoteGui::makeTextLabel("Scan: ")).addChild(
132  RemoteGui::makeTextLabel("yaw from ")).addChild(
133  RemoteGui::makeFloatSpinBox("scan_in_configuration_space_yaw_from").min(
134  headYawJoint->getJointLimitLo()).max(headYawJoint->getJointLimitHi()).steps(
135  static_cast<int>(
136  (headYawJoint->getJointLimitHi() - headYawJoint->getJointLimitLo()) /
137  0.1))).addChild(RemoteGui::makeTextLabel("yaw to ")).addChild(
138  RemoteGui::makeFloatSpinBox("scan_in_configuration_space_yaw_to").min(
139  headYawJoint->getJointLimitLo()).max(headYawJoint->getJointLimitHi()).steps(
140  static_cast<int>(
141  (headYawJoint->getJointLimitHi() - headYawJoint->getJointLimitLo()) /
142  0.1))).addChild(RemoteGui::makeTextLabel("pitch ")).addChild(
143  RemoteGui::makeFloatSpinBox("scan_in_configuration_space_pitch").min(
144  headPitchJoint->getJointLimitLo()).max(headPitchJoint->getJointLimitHi()).steps(
145  static_cast<int>(
146  (headPitchJoint->getJointLimitHi() - headPitchJoint->getJointLimitLo()) /
147  0.1))).addChild(RemoteGui::makeTextLabel("velocity ")).addChild(
148  RemoteGui::makeFloatSpinBox("scan_in_configuration_space_velocity").min(0).max(6).steps(
149  static_cast<int>(6 / 0.1)).value(0.8f)).addChild(
150  RemoteGui::makeButton("button_scan_in_configuration_space").label("scan")));
151 
152  rootLayoutBuilder.addChild(
153  RemoteGui::makeHBoxLayout().addChild(RemoteGui::makeTextLabel("Scan: ")).addChild(
154  RemoteGui::makeTextLabel("from ")).addChild(
155  RemoteGui::makeFloatSpinBox("scan_in_workspace_from_x").min(-1000000000).max(
156  1000000000).steps(2 * 1000000000 / 10).value(0.f)).addChild(
157  RemoteGui::makeFloatSpinBox("scan_in_workspace_from_y").min(-1000000000).max(
158  1000000000).steps(2 * 1000000000 / 10).value(0.f)).addChild(
159  RemoteGui::makeFloatSpinBox("scan_in_workspace_from_z").min(-1000000000).max(
160  1000000000).steps(2 * 1000000000 / 10).value(0.f)).addChild(
161  RemoteGui::makeTextLabel("to ")).addChild(
162  RemoteGui::makeFloatSpinBox("scan_in_workspace_to_x").min(-1000000000).max(
163  1000000000).steps(2 * 1000000000 / 10).value(0.f)).addChild(
164  RemoteGui::makeFloatSpinBox("scan_in_workspace_to_y").min(-1000000000).max(
165  1000000000).steps(2 * 1000000000 / 10).value(0.f)).addChild(
166  RemoteGui::makeFloatSpinBox("scan_in_workspace_to_z").min(-1000000000).max(
167  1000000000).steps(2 * 1000000000 / 10).value(0.f)).addChild(
168  RemoteGui::makeTextLabel("velocity ")).addChild(
169  RemoteGui::makeFloatSpinBox("scan_in_workspace_velocity").min(0).max(6).steps(
170  static_cast<int>(6 / 0.1)).value(0.8f)).addChild(
171  RemoteGui::makeTextLabel("acceleration ")).addChild(
172  RemoteGui::makeFloatSpinBox("scan_in_workspace_acceleration").min(0).max(8).steps(
173  static_cast<int>(8 / 0.1)).value(4.0f)).addChild(
174  RemoteGui::makeButton("button_scan_in_workspace").label("scan")));
175 
176  rootLayoutBuilder.addChild(new RemoteGui::VSpacer());
177 
178  _guiTask = new SimplePeriodicTask<>([this]()
179  {
180  bool oldEnabledGui = _guiTab.getValue<bool>("enabled").get();
181  std::string oldFrameGui = _guiTab.getValue<std::string>(
182  "tracking_frame").get();
183 
185 
186  if (oldEnabledGui == enabled)
187  {
188  // only apply changes of gui if not already changed by ice
189  _enableTracking(_guiTab.getValue<bool>("enabled").get());
190  }
191  _guiTab.getValue<bool>("enabled").set(enabled);
192 
193  if (oldFrameGui == frameName && oldFrameGui !=
194  _guiTab.getValue<std::string>(
195  "tracking_frame").get())
196  {
197  // only apply changes of gui if not already changed by ice
198  setFrame(_guiTab.getValue<std::string>("tracking_frame").get());
199  }
200  _guiTab.getValue<std::string>("tracking_frame").set(frameName);
201 
203 
204  if (_guiTab.getButton("button_look_at_frame").clicked())
205  {
206  lookAtFrame(_guiTab.getValue<std::string>("frame_look").get());
207  }
208 
209  if (_guiTab.getButton("button_look_at_global_point").clicked())
210  {
211  lookAtPointInGlobalFrame(Vector3f{
212  _guiTab.getValue<float>("global_point_x").get(),
213  _guiTab.getValue<float>("global_point_y").get(),
214  _guiTab.getValue<float>("global_point_z").get()});
215  }
216 
217  if (_guiTab.getButton("button_look_at_robot_point").clicked())
218  {
220  Vector3f{_guiTab.getValue<float>("robot_point_x").get(),
221  _guiTab.getValue<float>("robot_point_y").get(),
222  _guiTab.getValue<float>(
223  "robot_point_z").get()});
224  }
225 
226  if (_guiTab.getButton(
227  "button_scan_in_configuration_space").clicked())
228  {
230  "scan_in_configuration_space_yaw_from").get(),
231  _guiTab.getValue<float>(
232  "scan_in_configuration_space_yaw_to").get(),
233  {_guiTab.getValue<float>(
234  "scan_in_configuration_space_pitch").get()},
235  _guiTab.getValue<float>(
236  "scan_in_configuration_space_velocity").get());
237  }
238 
239  if (_guiTab.getButton("button_scan_in_workspace").clicked())
240  {
242  "scan_in_workspace_from_x").get(), _guiTab.getValue<
243  float>(
244  "scan_in_workspace_from_y").get(), _guiTab.getValue<
245  float>("scan_in_workspace_from_z").get()},
246  {_guiTab.getValue<float>(
247  "scan_in_workspace_to_x").get(), _guiTab.getValue<
248  float>(
249  "scan_in_workspace_to_y").get(), _guiTab.getValue<
250  float>(
251  "scan_in_workspace_to_z").get()}},
252  _guiTab.getValue<float>(
253  "scan_in_workspace_velocity").get(),
254  _guiTab.getValue<float>(
255  "scan_in_workspace_acceleration").get());
256  }
257  }, 10);
258 
259  RemoteGui::WidgetPtr rootLayout = rootLayoutBuilder;
260 
261  _remoteGui->createTab(getName(), rootLayout);
263 
264  _guiTask->start();
265  }
266  }
267 
268 
270  {
271  _enableTracking(false);
272  if (_guiTask)
273  {
274  _guiTask->stop();
275  _guiTask = nullptr;
276  }
277  }
278 
279 
281  {
282 
283  }
284 
286  {
288  }
289 
290  void FrameTracking::enableTracking(bool enable, const Ice::Current&)
291  {
292  _enableTracking(enable);
293  }
294 
295  void FrameTracking::setFrame(const std::string& frameName, const Ice::Current&)
296  {
297  if (enabled)
298  {
299  ARMARX_WARNING << "Disable tracking to set new frame.";
300  return;
301  }
302  this->frameName = frameName;
303  }
304 
305  std::string FrameTracking::getFrame(const Ice::Current&) const
306  {
307  return frameName;
308  }
309 
310  void FrameTracking::lookAtFrame(const std::string& frameName, const Ice::Current&)
311  {
312  if (enabled)
313  {
314  ARMARX_WARNING << "Disable tracking to use lookAt functions.";
315  return;
316  }
317  if (!localRobot->hasRobotNode(frameName))
318  {
319  ARMARX_ERROR << frameName << " does not exist.";
320  return;
321  }
324  }
325 
326  void FrameTracking::lookAtPointInGlobalFrame(const Vector3f& point, const Ice::Current&)
327  {
328  if (enabled)
329  {
330  ARMARX_WARNING << "Disable tracking to use lookAt functions.";
331  return;
332  }
334  _lookAtPoint(localRobot->toLocalCoordinateSystemVec(ToEigen(point)));
335  }
336 
337  bool FrameTracking::isLookingAtPointInGlobalFrame(const Vector3f& point, float max_diff, const Ice::Current&)
338  {
339  if (enabled)
340  {
341  ARMARX_WARNING << "Disable tracking to use lookAt functions.";
342  return false;
343  }
345  return _looksAtPoint(localRobot->toLocalCoordinateSystemVec(ToEigen(point)), max_diff);
346  }
347 
348  void FrameTracking::lookAtPointInRobotFrame(const Vector3f& point, const Ice::Current&)
349  {
350  if (enabled)
351  {
352  ARMARX_WARNING << "Disable tracking to use lookAt functions.";
353  return;
354  }
356  _lookAtPoint(ToEigen(point));
357  }
358 
359  void FrameTracking::moveJointsTo(float yaw, float pitch, const Ice::Current&)
360  {
361  const float currentYaw = headYawJoint->getJointValue();
362  const float currentPitch = headPitchJoint->getJointValue();
363 
364  const float currentYawVel = DatafieldRefPtr::dynamicCast(
365  kinematicUnitObserverInterfacePrx->getDatafieldRefByName("jointvelocities",
366  headYawJoint->getName()))->getFloat();
367  const float currentPitchVel = DatafieldRefPtr::dynamicCast(
368  kinematicUnitObserverInterfacePrx->getDatafieldRefByName("jointvelocities",
369  headPitchJoint->getName()))->getFloat();
370 
371  FrameTracking::HeadState headState;
372  headState.currentYawPos = currentYaw;
373  headState.currentYawVel = currentYawVel;
374  headState.currentPitchPos = currentPitch;
375  headState.currentPitchVel = currentPitchVel;
376 
377 
378  headState.desiredYawPos = yaw;
379  headState.desiredPitchPos = pitch;
380  _doPositionControl(headState);
381  struct timespec req = {0, 30 * 1000000L};
382  while (std::abs(headYawJoint->getJointValue() - yaw) > static_cast<float>(M_PI / 180.) ||
383  std::abs(headPitchJoint->getJointValue() - pitch) > static_cast<float>(M_PI / 180.))
384  {
385  ARMARX_INFO << "yaw: " << headYawJoint->getJointValue() << " -> " << yaw << " pitch: "
386  << headPitchJoint->getJointValue() << " -> " << pitch;
388  // sleep for 30 milliseconds
389  nanosleep(&req, nullptr);
390  }
391  auto currentModes = kinematicUnitInterfacePrx->getControlModes();
392  kinematicUnitInterfacePrx->switchControlMode({{headYawJoint->getName(), currentModes[headYawJoint->getName()]},
393  {headPitchJoint->getName(), currentModes[headPitchJoint->getName()]}});
394  }
395 
396  void FrameTracking::scanInConfigurationSpace(float yawFrom, float yawTo, const Ice::FloatSeq& pitchValues,
397  float velocity, const Ice::Current&)
398  {
399  if (enabled)
400  {
401  ARMARX_WARNING << "Disable tracking to use scan functions.";
402  return;
403  }
404  velocity = std::abs(velocity);
405 
407  auto currentModes = kinematicUnitInterfacePrx->getControlModes();
408  kinematicUnitInterfacePrx->switchControlMode({{headYawJoint->getName(), ControlMode::eVelocityControl},
409  {headPitchJoint->getName(), ControlMode::eVelocityControl}});
410 
411  // to initial yaw
412  {
413  bool wasGreater = headYawJoint->getJointValue() > yawFrom;
414  float yawVelocityToInit = wasGreater ? -velocity : velocity;
415  kinematicUnitInterfacePrx->setJointVelocities({{headYawJoint->getName(), yawVelocityToInit},
416  {headPitchJoint->getName(), 0.f}});
417  // if the joint angle was greater before we want to run as long as it is greater
418  // otherwise we want to run as long as it is smaler
419  while ((wasGreater && headYawJoint->getJointValue() > yawFrom) ||
420  (!wasGreater && headYawJoint->getJointValue() < yawFrom))
421  {
423  }
424  }
425 
426  for (const auto& p: pitchValues)
427  {
428  // to pitch value
429  bool wasGreaterP = headPitchJoint->getJointValue() > p;
430  float velocityPitch = wasGreaterP ? -velocity : velocity;
431  kinematicUnitInterfacePrx->setJointVelocities({{headYawJoint->getName(), 0.f},
432  {headPitchJoint->getName(), velocityPitch}});
433  while ((wasGreaterP && headPitchJoint->getJointValue() > p) ||
434  (!wasGreaterP && headPitchJoint->getJointValue() < p))
435  {
437  }
438 
439  // to yaw value
440  bool wasGreaterY = yawFrom > yawTo; // yawFrom == headYawJoint->getJointValue()
441  float velocityYaw = wasGreaterY ? -velocity : velocity;
442  kinematicUnitInterfacePrx->setJointVelocities({{headYawJoint->getName(), velocityYaw},
443  {headPitchJoint->getName(), 0.f}});
444  while ((wasGreaterY && headYawJoint->getJointValue() > yawTo) ||
445  (!wasGreaterY && headYawJoint->getJointValue() < yawTo))
446  {
448  }
449 
450  std::swap(yawFrom, yawTo);
451  }
452  kinematicUnitInterfacePrx->setJointVelocities({{headYawJoint->getName(), 0.f},
453  {headPitchJoint->getName(), 0.f}});
454  kinematicUnitInterfacePrx->switchControlMode({{headYawJoint->getName(), currentModes[headYawJoint->getName()]},
455  {headPitchJoint->getName(), currentModes[headPitchJoint->getName()]}});
456  }
457 
458  void FrameTracking::scanInWorkspace(const Vector3fSeq& points, float maxVelocity, float acceleration,
459  const Ice::Current&)
460  {
461  if (enabled)
462  {
463  ARMARX_WARNING << "Disable tracking to use scan functions.";
464  return;
465  }
467  auto currentModes = kinematicUnitInterfacePrx->getControlModes();
468  kinematicUnitInterfacePrx->switchControlMode({{headYawJoint->getName(), ControlMode::eVelocityControl},
469  {headPitchJoint->getName(), ControlMode::eVelocityControl}});
470  struct timespec req = {0, 30 * 1000000L};
471  for (const auto& p: points)
472  {
473  auto pEigen = localRobot->toLocalCoordinateSystemVec(ToEigen(p));
474  auto target = _calculateJointAngles(pEigen);
475  while (std::abs(target.currentYawPos - target.desiredYawPos) > static_cast<float>(M_PI / 180.) ||
476  std::abs(target.currentPitchPos - target.desiredPitchPos) > static_cast<float>(M_PI / 180.))
477  {
478  ARMARX_INFO << "yaw: " << target.currentYawPos << " - " << target.desiredYawPos << " pitch: "
479  << target.currentPitchPos << " - " << target.desiredPitchPos;
481  target = _calculateJointAngles(pEigen);
482  _doVelocityControl(target, maxVelocity, acceleration, maxVelocity, acceleration);
483  // sleep for 30 milliseconds
484  nanosleep(&req, nullptr);
485  }
486  }
487  kinematicUnitInterfacePrx->setJointVelocities({{headYawJoint->getName(), 0.f},
488  {headPitchJoint->getName(), 0.f}});
489  kinematicUnitInterfacePrx->switchControlMode({{headYawJoint->getName(), currentModes[headYawJoint->getName()]},
490  {headPitchJoint->getName(), currentModes[headPitchJoint->getName()]}});
491  }
492 
494  {
495  if (!localRobot->hasRobotNode(frameName))
496  {
497  ARMARX_ERROR << frameName << " does not exist. Task will be disabled.";
498  std::thread([this]()
499  {
500  _enableTracking(false);
501  }).detach();
502  return;
503  }
507  }
508 
510  {
512  }
513 
514  void FrameTracking::_lookAtFrame(const std::string& frameName)
515  {
516  auto frame = localRobot->getRobotNode(frameName);
517  auto posInRobotFrame = localRobot->toLocalCoordinateSystemVec(frame->getGlobalPosition());
518  _lookAtPoint(posInRobotFrame);
519  }
520 
521  void FrameTracking::_lookAtPoint(const Eigen::Vector3f& point)
522  {
524  }
525 
526  bool FrameTracking::_looksAtPoint(const Eigen::Vector3f& point, float max_diff)
527  {
528  auto head_state = _calculateJointAngles(point);
529  float diff = std::abs(head_state.desiredPitchPos - head_state.currentPitchPos) +
530  std::abs(head_state.currentYawPos - head_state.desiredYawPos);
531  return max_diff > diff;
532  }
533 
534  FrameTracking::HeadState FrameTracking::_calculateJointAnglesContinously(const std::string& frameName)
535  {
536  auto frame = localRobot->getRobotNode(frameName);
537  auto posInRobotFrame = localRobot->toLocalCoordinateSystemVec(frame->getGlobalPosition());
538  // do nothing if the robot works above his head
539  // he should already look upwards because if this component runs continously
540  if (std::sqrt(posInRobotFrame.x() * posInRobotFrame.x() + posInRobotFrame.y() * posInRobotFrame.y()) < 300.f)
541  {
542  return FrameTracking::HeadState{true, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
543  }
544  return _calculateJointAngles(posInRobotFrame);
545  }
546 
547  FrameTracking::HeadState FrameTracking::_calculateJointAngles(const Eigen::Vector3f& point)
548  {
549  float yaw = -std::atan2(point.x(), point.y());
550  // make shure the joint value satisfies the joint limits
551  yaw = std::max(headYawJoint->getJointLimitLo(), yaw);
552  yaw = std::min(headYawJoint->getJointLimitHi(), yaw);
553  // we dont want the robot to move from one limit to the other in one step
554  const float currentYaw = headYawJoint->getJointValue();
555  if (!headYawJoint->isLimitless() && std::abs(currentYaw - yaw) >
556  headYawJoint->getJointLimitHi() - headYawJoint->getJointLimitLo() -
557  static_cast<float>(M_PI) / 8)
558  {
559  yaw = currentYaw;
560  }
561 
562  const auto pointInPitchJointFrame = headPitchJoint->toLocalCoordinateSystemVec(
563  localRobot->toGlobalCoordinateSystemVec(point));
564  const Eigen::Vector2f pj{pointInPitchJointFrame.y(), pointInPitchJointFrame.z()};
565  const float headHeightRealativeToPitchJoint = headPitchJoint->toLocalCoordinateSystemVec(
566  cameraNode->getGlobalPosition()).z();
567  float pitch = headPitchJoint->getJointValue() - std::asin(pj.x() / pj.norm()) +
568  std::asin(headHeightRealativeToPitchJoint / pj.norm());
569  // make shure the joint value satisfies the joint limits
570  pitch = std::max(headPitchJoint->getJointLimitLo(), pitch);
571  pitch = std::min(headPitchJoint->getJointLimitHi(), pitch);
572  const float currentPitch = headPitchJoint->getJointValue();
573 
574  ARMARX_INFO << deactivateSpam(1.f, "FrameTracking") << "Looking at " << point << " using yaw=" << yaw
575  << " and pitch=" << pitch;
576 
577  const float currentYawVel = DatafieldRefPtr::dynamicCast(
578  kinematicUnitObserverInterfacePrx->getDatafieldRefByName("jointvelocities",
579  headYawJoint->getName()))->getFloat();
580  const float currentPitchVel = DatafieldRefPtr::dynamicCast(
581  kinematicUnitObserverInterfacePrx->getDatafieldRefByName("jointvelocities",
582  headPitchJoint->getName()))->getFloat();
583 
584  FrameTracking::HeadState headState;
585  headState.currentYawPos = currentYaw;
586  headState.desiredYawPos = yaw;
587  headState.currentYawVel = currentYawVel;
588  headState.currentPitchPos = currentPitch;
589  headState.desiredPitchPos = pitch;
590  headState.currentPitchVel = currentPitchVel;
591  return headState;
592  }
593 
594  void FrameTracking::_doVelocityControl(const FrameTracking::HeadState& headState, float maxYawVelocity,
595  float yawAcceleration, float maxPitchVelocity, float pitchAcceleration)
596  {
597  if (headState.stop)
598  {
599  kinematicUnitInterfacePrx->setJointVelocities({{headYawJoint->getName(), 0.f},
600  {headPitchJoint->getName(), 0.f}});
601  return;
602  }
603 
604  float desiredYawVelocity = positionThroughVelocityControlWithAccelerationBounds(30.f / 1000, 35.f / 1000,
605  headState.currentYawVel,
608  headState.currentYawPos,
609  headState.desiredYawPos, 1.f);
610  float desiredPitchVelocity = positionThroughVelocityControlWithAccelerationBounds(30.f / 1000, 35.f / 1000,
611  headState.currentPitchVel,
615  headState.currentPitchPos,
616  headState.desiredPitchPos,
617  1.f);
618 
619  // control mode is set when enable task
620  kinematicUnitInterfacePrx->setJointVelocities({{headYawJoint->getName(), desiredYawVelocity},
621  {headPitchJoint->getName(), desiredPitchVelocity}});
622  }
623 
624  void FrameTracking::_doPositionControl(const FrameTracking::HeadState& headState)
625  {
626  auto currentModes = kinematicUnitInterfacePrx->getControlModes();
627  kinematicUnitInterfacePrx->switchControlMode({{headYawJoint->getName(), ControlMode::ePositionControl},
628  {headPitchJoint->getName(), ControlMode::ePositionControl}});
629  if (headState.stop)
630  {
631  return;
632  }
633  kinematicUnitInterfacePrx->setJointAngles({{headYawJoint->getName(), headState.desiredYawPos},
634  {headPitchJoint->getName(), headState.desiredPitchPos}});
635  kinematicUnitInterfacePrx->switchControlMode({{headYawJoint->getName(), currentModes[headYawJoint->getName()]},
636  {headPitchJoint->getName(), currentModes[headPitchJoint->getName()]}});
637  }
638 
640  {
641  if (this->enabled == enable)
642  {
643  return;
644  }
645  this->enabled = enable;
646  if (enable)
647  {
648  kinematicUnitInterfacePrx->switchControlMode({{headYawJoint->getName(), ControlMode::eVelocityControl},
649  {headPitchJoint->getName(), ControlMode::eVelocityControl}});
650  processorTask->start();
651  } else
652  {
653  kinematicUnitInterfacePrx->setJointVelocities({{headYawJoint->getName(), 0.f},
654  {headPitchJoint->getName(), 0.f}});
655  processorTask->stop();
656  }
657  }
658 }
GfxTL::sqrt
VectorXD< D, T > sqrt(const VectorXD< D, T > &a)
Definition: VectorXD.h:662
armarx::FrameTracking::enabled
std::atomic< bool > enabled
Definition: FrameTracking.h:177
armarx::RemoteGui::makeVBoxLayout
detail::VBoxLayoutBuilder makeVBoxLayout(std::string const &name="")
Definition: LayoutWidgets.h:245
armarx::FrameTracking::_guiTask
SimplePeriodicTask ::pointer_type _guiTask
Definition: FrameTracking.h:190
armarx::FrameTracking::_looksAtPoint
bool _looksAtPoint(const Eigen::Vector3f &point, float max_diff)
Definition: FrameTracking.cpp:526
armarx::FrameTracking::scanInWorkspace
void scanInWorkspace(const ::armarx::Vector3fSeq &points, float maxVelocity, float acceleration, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:458
armarx::RemoteGui::makeHBoxLayout
detail::HBoxLayoutBuilder makeHBoxLayout(std::string const &name="")
Definition: LayoutWidgets.h:230
armarx::FrameTracking::processorTask
PeriodicTask< FrameTracking >::pointer_type processorTask
Definition: FrameTracking.h:174
armarx::FrameTracking::lookAtPointInRobotFrame
void lookAtPointInRobotFrame(const Vector3f &point, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:348
armarx::FrameTracking::onInitComponent
void onInitComponent() override
Definition: FrameTracking.cpp:38
armarx::RemoteGui::detail::VBoxLayoutBuilder
Definition: LayoutWidgets.h:94
armarx::RemoteGui::makeButton
detail::ButtonBuilder makeButton(std::string const &name)
Definition: IntegerWidgets.h:48
armarx::FrameTracking::enableTracking
void enableTracking(bool enable, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:290
armarx::RemoteRobot::synchronizeLocalClone
static bool synchronizeLocalClone(VirtualRobot::RobotPtr robot, RobotStateComponentInterfacePrx robotStatePrx)
Definition: RemoteRobot.cpp:448
ArmarXManager.h
armarx::FrameTracking::onConnectComponent
void onConnectComponent() override
Definition: FrameTracking.cpp:59
armarx::FrameTracking::_remoteGui
RemoteGuiInterfacePrx _remoteGui
Definition: FrameTracking.h:189
armarx::FrameTracking::frameName
std::string frameName
Definition: FrameTracking.h:178
WidgetBuilder.h
armarx::ManagedIceObject::getArmarXManager
ArmarXManagerPtr getArmarXManager() const
Returns the ArmarX manager used to add and remove components.
Definition: ManagedIceObject.cpp:348
boost::target
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:688
armarx::max
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:267
armarx::FrameTracking::_doPositionControl
void _doPositionControl(const HeadState &headstate)
Definition: FrameTracking.cpp:624
armarx::FrameTrackingPropertyDefinitions
Definition: FrameTracking.h:48
armarx::RemoteGui::makeTextLabel
detail::LabelBuilder makeTextLabel(std::string const &text)
Definition: StaticWidgets.h:22
armarx::FrameTracking::kinematicUnitObserverInterfacePrx
KinematicUnitObserverInterfacePrx kinematicUnitObserverInterfacePrx
Definition: FrameTracking.h:175
cxxopts::empty
bool empty(const std::string &s)
Definition: cxxopts.hpp:255
armarx::FrameTracking::scanInConfigurationSpace
void scanInConfigurationSpace(float yawFrom, float yawTo, const ::Ice::FloatSeq &pitchValues, float velocity, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:396
armarx::armem::client::util::swap
void swap(SubscriptionHandle &first, SubscriptionHandle &second)
Definition: SubscriptionHandle.cpp:66
DatafieldRef.h
armarx::RemoteGui::TabProxy
Definition: WidgetProxy.h:17
armarx::RemoteGui::detail::ComboBoxBuilder::addOptions
ComboBoxBuilder & addOptions(std::vector< std::string > const &options)
Definition: StringWidgets.h:25
armarx::FrameTracking::yawAcceleration
float yawAcceleration
Definition: FrameTracking.h:180
armarx::RemoteGui::TabProxy::getButton
ButtonProxy getButton(std::string const &name)
Definition: WidgetProxy.cpp:6
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
armarx::RemoteGui::TabProxy::receiveUpdates
void receiveUpdates()
Definition: WidgetProxy.h:131
armarx::FrameTracking::getFrame
std::string getFrame(const Ice::Current &=Ice::emptyCurrent) const override
Definition: FrameTracking.cpp:305
armarx::abs
std::vector< T > abs(const std::vector< T > &v)
Definition: VectorHelpers.h:253
armarx::RemoteGui::detail::ChildrenMixin::addChild
Derived & addChild(WidgetPtr const &child)
Definition: LayoutWidgets.h:22
armarx::FrameTracking::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: FrameTracking.cpp:285
M_PI
#define M_PI
Definition: MathTools.h:17
armarx::RemoteGui::makeCheckBox
detail::CheckBoxBuilder makeCheckBox(std::string const &name)
Definition: BoolWidgets.h:26
armarx::FrameTracking::lookAtFrame
void lookAtFrame(const std::string &frameName, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:310
armarx::FrameTracking::_lookAtFrame
void _lookAtFrame(const std::string &frame)
Definition: FrameTracking.cpp:514
armarx::RemoteGui::ButtonProxy::clicked
bool clicked() const
Definition: WidgetProxy.h:331
armarx::RemoteGui::detail::ValueMixin::value
Derived & value(ValueT const &value)
Definition: Basic.h:77
armarx::FrameTracking::robotStateComponent
RobotStateComponentInterfacePrx robotStateComponent
Definition: FrameTracking.h:172
armarx::RemoteGui::detail::LabelMixin::label
Derived & label(std::string const &label)
Definition: Basic.h:191
armarx::FrameTracking::_lookAtPoint
void _lookAtPoint(const Eigen::Vector3f &point)
Definition: FrameTracking.cpp:521
max
T max(T t1, T t2)
Definition: gdiam.h:48
armarx::FrameTracking::headPitchJoint
VirtualRobot::RobotNodePtr headPitchJoint
Definition: FrameTracking.h:186
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:189
armarx::FrameTracking::maxYawVelocity
float maxYawVelocity
Definition: FrameTracking.h:179
armarx::FrameTracking::process
void process()
Definition: FrameTracking.cpp:493
armarx::FrameTracking::cameraNode
VirtualRobot::RobotNodePtr cameraNode
Definition: FrameTracking.h:187
armarx::FrameTracking::_doVelocityControl
void _doVelocityControl(const HeadState &headstate, float maxYawVelocity, float yawAcceleration, float maxPitchVelocity, float pitchAcceleration)
Definition: FrameTracking.cpp:594
armarx::FrameTracking::syncronizeLocalClone
void syncronizeLocalClone()
Definition: FrameTracking.cpp:509
armarx::FrameTracking::pitchAcceleration
float pitchAcceleration
Definition: FrameTracking.h:182
armarx::WidgetDescription::WidgetPtr
::IceInternal::Handle<::armarx::WidgetDescription::Widget > WidgetPtr
Definition: NJointControllerBase.h:66
armarx::FrameTracking::onExitComponent
void onExitComponent() override
Definition: FrameTracking.cpp:280
armarx::RemoteGui::TabProxy::getValue
ValueProxy< T > getValue(std::string const &name)
Definition: WidgetProxy.h:161
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::RemoteRobot::createLocalClone
VirtualRobot::RobotPtr createLocalClone()
Clones the structure of this remote robot to a local instance.
Definition: RemoteRobot.cpp:328
armarx::FrameTracking::_calculateJointAnglesContinously
HeadState _calculateJointAnglesContinously(const std::string &frame)
Definition: FrameTracking.cpp:534
set
set(LIBS ArmarXCoreInterfaces ${CMAKE_THREAD_LIBS_INIT} ${dl_LIBRARIES} ${rt_LIBRARIES} ${QT_LIBRARIES} ${Boost_LIBRARIES} BoostAssertionHandler ArmarXCPPUtility SimoxUtility) set(LIB_FILES ArmarXManager.cpp ArmarXMultipleObjectsScheduler.cpp ArmarXObjectScheduler.cpp ManagedIceObject.cpp ManagedIceObjectPlugin.cpp Component.cpp ComponentPlugin.cpp IceGridAdmin.cpp ArmarXObjectObserver.cpp IceManager.cpp PackagePath.cpp RemoteReferenceCount.cpp logging/LoggingUtil.cpp logging/Logging.cpp logging/LogSender.cpp logging/ArmarXLogBuf.cpp system/ArmarXDataPath.cpp system/DynamicLibrary.cpp system/ProcessWatcher.cpp system/FactoryCollectionBase.cpp system/cmake/CMakePackageFinder.cpp system/cmake/CMakePackageFinderCache.cpp system/cmake/ArmarXPackageToolInterface.cpp system/RemoteObjectNode.cpp services/sharedmemory/HardwareId.cpp services/tasks/RunningTask.cpp services/tasks/ThreadList.cpp services/tasks/ThreadPool.cpp services/profiler/Profiler.cpp services/profiler/FileLoggingStrategy.cpp services/profiler/IceLoggingStrategy.cpp application/Application.cpp application/ApplicationOptions.cpp application/ApplicationProcessFacet.cpp application/ApplicationNetworkStats.cpp application/properties/PropertyUser.cpp application/properties/Property.cpp application/properties/PropertyDefinition.cpp application/properties/PropertyDefinitionContainer.cpp application/properties/PropertyDefinitionHelpFormatter.cpp application/properties/PropertyDefinitionConfigFormatter.cpp application/properties/PropertyDefinitionBriefHelpFormatter.cpp application/properties/PropertyDefinitionXmlFormatter.cpp application/properties/PropertyDefinitionDoxygenFormatter.cpp application/properties/PropertyDefinitionDoxygenComponentPagesFormatter.cpp application/properties/PropertyDefinitionContainerBriefHelpFormatter.cpp application/properties/IceProperties.cpp exceptions/Exception.cpp exceptions/local/UnexpectedEnumValueException.cpp util/FileSystemPathBuilder.cpp util/StringHelpers.cpp util/IceReportSkipper.cpp util/Throttler.cpp util/distributed/AMDCallbackCollection.cpp util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.cpp util/distributed/RemoteHandle/RemoteHandle.cpp util/distributed/RemoteHandle/RemoteHandleControlBlock.cpp time/ice_conversions.cpp time/json_conversions.cpp time/CallbackWaitLock.cpp time/Clock.cpp time/ClockType.cpp time/ClockTypeNames.cpp time/CycleUtil.cpp time/DateTime.cpp time/Duration.cpp time/Frequency.cpp time/LocalTimeServer.cpp time/Metronome.cpp time/ScopedStopWatch.cpp time/StopWatch.cpp time/Timer.cpp time/TimeKeeper.cpp time/TimeUtil.cpp csv/CsvWriter.cpp csv/CsvReader.cpp eigen/conversions.cpp eigen/ice_conversions.cpp) set(LIB_HEADERS ArmarXManager.h ArmarXDummyManager.h ArmarXMultipleObjectsScheduler.h ArmarXObjectObserver.h ArmarXObjectScheduler.h ArmarXFwd.h Component.h ComponentPlugin.h ComponentFactories.h CoreObjectFactories.h IceGridAdmin.h IceManager.h IceManagerImpl.h json_conversions.h ManagedIceObject.h ManagedIceObjectPlugin.h ManagedIceObjectImpl.h ManagedIceObjectDependency.h ManagedIceObjectRegistryInterface.h PackagePath.h RemoteReferenceCount.h system/ImportExport.h system/ImportExportComponent.h system/AbstractFactoryMethod.h system/FactoryCollectionBase.h system/Synchronization.h system/ArmarXDataPath.h system/DynamicLibrary.h system/ProcessWatcher.h system/ConditionSynchronization.h system/cmake/CMakePackageFinder.h system/cmake/CMakePackageFinderCache.h system/cmake/FindPackageX.cmake system/cmake/ArmarXPackageToolInterface.h system/RemoteObjectNode.h logging/LoggingUtil.h logging/LogSender.h logging/Logging.h logging/ArmarXLogBuf.h logging/SpamFilterData.h services/tasks/RunningTask.h services/tasks/PeriodicTask.h services/tasks/ThreadList.h services/tasks/TaskUtil.h services/tasks/ThreadPool.h services/sharedmemory/SharedMemoryProvider.h services/sharedmemory/SharedMemoryConsumer.h services/sharedmemory/IceSharedMemoryProvider.h services/sharedmemory/IceSharedMemoryConsumer.h services/sharedmemory/HardwareIdentifierProvider.h services/sharedmemory/HardwareId.h services/sharedmemory/exceptions/SharedMemoryExceptions.h services/profiler/Profiler.h services/profiler/LoggingStrategy.h services/profiler/FileLoggingStrategy.h services/profiler/IceLoggingStrategy.h application/Application.h application/ApplicationOptions.h application/ApplicationProcessFacet.h application/ApplicationNetworkStats.h application/properties/forward_declarations.h application/properties/Properties.h application/properties/Property.h application/properties/PluginEigen.h application/properties/PluginEnumNames.h application/properties/PluginCfgStruct.h application/properties/PluginAll.h application/properties/PropertyUser.h application/properties/PropertyDefinition.h application/properties/PropertyDefinition.hpp application/properties/PropertyDefinitionInterface.h application/properties/PropertyDefinitionContainer.h application/properties/PropertyDefinitionFormatter.h application/properties/PropertyDefinitionContainerFormatter.h application/properties/PropertyDefinitionConfigFormatter.h application/properties/PropertyDefinitionHelpFormatter.h application/properties/PropertyDefinitionBriefHelpFormatter.h application/properties/PropertyDefinitionXmlFormatter.h application/properties/PropertyDefinitionDoxygenFormatter.h application/properties/PropertyDefinitionDoxygenComponentPagesFormatter.h application/properties/PropertyDefinitionContainerBriefHelpFormatter.h application/properties/ProxyPropertyDefinition.h application/properties/IceProperties.h exceptions/Exception.h exceptions/LocalException.h exceptions/local/DynamicLibraryException.h exceptions/local/ExpressionException.h exceptions/local/FileIOException.h exceptions/local/InvalidPropertyValueException.h exceptions/local/MissingRequiredPropertyException.h exceptions/local/PropertyInheritanceCycleException.h exceptions/local/ProxyNotInitializedException.h exceptions/local/UnexpectedEnumValueException.h exceptions/local/UnmappedValueException.h exceptions/local/ValueRangeExceededException.h exceptions/user/NotImplementedYetException.h rapidxml/rapidxml.hpp rapidxml/rapidxml_print.hpp rapidxml/rapidxml_iterators.hpp rapidxml/rapidxml_utils.hpp rapidxml/wrapper/RapidXmlReader.h rapidxml/wrapper/RapidXmlWriter.h rapidxml/wrapper/DefaultRapidXmlReader.h rapidxml/wrapper/MultiNodeRapidXMLReader.h util/IceBlobToObject.h util/ObjectToIceBlob.h util/FileSystemPathBuilder.h util/FiniteStateMachine.h util/StringHelpers.h util/StringHelperTemplates.h util/algorithm.h util/OnScopeExit.h util/Predicates.h util/Preprocessor.h util/PropagateConst.h util/Registrar.h util/TemplateMetaProgramming.h util/TripleBuffer.h util/IceReportSkipper.h util/Throttler.h util/distributed/AMDCallbackCollection.h util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.h util/distributed/RemoteHandle/RemoteHandle.h util/distributed/RemoteHandle/RemoteHandleControlBlock.h util/SimpleStatemachine.h time.h time_minimal.h time/forward_declarations.h time/ice_conversions.h time/json_conversions.h time/CallbackWaitLock.h time/Clock.h time/ClockType.h time/ClockTypeNames.h time/CycleUtil.h time/DateTime.h time/Duration.h time/Frequency.h time/LocalTimeServer.h time/Metronome.h time/ScopedStopWatch.h time/StopWatch.h time/Timer.h time/TimeUtil.h time/TimeKeeper.h csv/CsvWriter.h csv/CsvReader.h eigen/conversions.h eigen/ice_conversions.h ice_conversions.h ice_conversions/ice_conversions_boost_templates.h ice_conversions/ice_conversions_templates.h ice_conversions/ice_conversions_templates.tpp $
Definition: CMakeLists.txt:12
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::min
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:294
FrameTracking.h
armarx::FrameTracking::kinematicUnitInterfacePrx
KinematicUnitInterfacePrx kinematicUnitInterfacePrx
Definition: FrameTracking.h:173
armarx::FrameTracking::setFrame
void setFrame(const std::string &frameName, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:295
armarx::FrameTracking::maxPitchVelocity
float maxPitchVelocity
Definition: FrameTracking.h:181
armarx::RemoteGui::TabProxy::sendUpdates
void sendUpdates()
Definition: WidgetProxy.h:146
armarx::RemoteGui::makeComboBox
detail::ComboBoxBuilder makeComboBox(std::string const &name)
Definition: StringWidgets.h:58
armarx::FrameTracking::headYawJoint
VirtualRobot::RobotNodePtr headYawJoint
Definition: FrameTracking.h:185
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
armarx::FrameTracking::_calculateJointAngles
HeadState _calculateJointAngles(const Eigen::Vector3f &point)
Definition: FrameTracking.cpp:547
armarx::FrameTracking::lookAtPointInGlobalFrame
void lookAtPointInGlobalFrame(const Vector3f &point, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:326
armarx::PeriodicTask
Definition: ArmarXManager.h:70
min
T min(T t1, T t2)
Definition: gdiam.h:42
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
armarx::positionThroughVelocityControlWithAccelerationBounds
float positionThroughVelocityControlWithAccelerationBounds(float dt, float maxDt, float currentV, float maxV, float acceleration, float deceleration, float currentPosition, float targetPosition, float p)
Definition: BasicControllers.cpp:166
armarx::PropertyDefinitionsPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
Definition: forward_declarations.h:34
armarx::FrameTracking::localRobot
VirtualRobot::RobotPtr localRobot
Definition: FrameTracking.h:184
armarx::FrameTracking::_enableTracking
void _enableTracking(bool enable)
Definition: FrameTracking.cpp:639
armarx::RemoteGui::makeFloatSpinBox
detail::FloatSpinBoxBuilder makeFloatSpinBox(std::string const &name)
Definition: FloatWidgets.h:52
armarx::ManagedIceObject::usingProxy
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
Definition: ManagedIceObject.cpp:151
armarx::FrameTracking::moveJointsTo
void moveJointsTo(float yaw, float pitch, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:359
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
KinematicUnitObserver.h
armarx::SimplePeriodicTask
Usage:
Definition: ApplicationNetworkStats.h:32
armarx::FrameTracking::isLookingAtPointInGlobalFrame
bool isLookingAtPointInGlobalFrame(const Vector3f &point, float max_diff, const Ice::Current &=Ice::emptyCurrent) override
Definition: FrameTracking.cpp:337
armarx::FrameTracking::_guiTab
RemoteGui::TabProxy _guiTab
Definition: FrameTracking.h:191
armarx::FrameTracking::onDisconnectComponent
void onDisconnectComponent() override
Definition: FrameTracking.cpp:269