RemoteRobot.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package
19  * @author
20  * @date
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #include "RemoteRobot.h"
25 
26 #include <VirtualRobot/VirtualRobot.h>
27 #include <VirtualRobot/XML/RobotIO.h>
28 #include <VirtualRobot/RobotConfig.h>
29 #include <VirtualRobot/RobotFactory.h>
30 #include <VirtualRobot/Nodes/RobotNodeFixedFactory.h>
31 #include <VirtualRobot/Nodes/RobotNodePrismaticFactory.h>
32 #include <VirtualRobot/Nodes/RobotNodeRevoluteFactory.h>
33 #include <VirtualRobot/CollisionDetection/CollisionChecker.h>
34 
35 
41 
42 #include <SimoxUtility/algorithm/string/string_tools.h>
43 
44 #include <Eigen/Geometry>
45 
46 //#define DMES(Obj) cout << format("[%1%|%2%|%3%] %4%") % __FILE__ % __LINE__ % __func__ % Obj;
47 #define DMES(Obj) ;
48 
49 using namespace VirtualRobot;
50 using namespace Eigen;
51 
52 namespace armarx
53 {
54 
55  std::recursive_mutex RemoteRobot::m;
56 
57  RemoteRobot::RemoteRobot(SharedRobotInterfacePrx robot) :
58  Robot(),
59  _robot(robot)
60  {
61  _robot->ref();
62  }
63 
65  {
66  try
67  {
68  _robot->unref();
69  }
70  catch (std::exception& e)
71  {
72  ARMARX_DEBUG_S << "Unref of SharedRobot failed: " << e.what();
73  }
74  catch (...)
75  {
76  ARMARX_DEBUG_S << "Unref of SharedRobot failed: reason unknown";
77  }
78 
79  }
80 
81  RobotNodePtr RemoteRobot::getRootNode() const
82  {
83  // lazy initialization needed since shared_from_this() must not be called in constructor
84  if (!_root)
85  {
86  _root = RemoteRobot::createRemoteRobotNode(_robot->getRootNode(), shared_from_this());
87  }
88  return _root;
89  }
90 
91  bool RemoteRobot::hasRobotNode(const std::string& robotNodeName) const
92  {
93  if (_cachedNodes.find(name) == _cachedNodes.end())
94  {
95  return _robot->hasRobotNode(robotNodeName);
96  }
97  else
98  {
99  return true;
100  }
101  }
102 
103 
104  bool RemoteRobot::hasRobotNode(RobotNodePtr robotNode) const
105  {
106  return this->hasRobotNode(robotNode->getName());
107 
108  /*
109  * This just does not work. because you cannot tell wheter RemoteRobotNode<RobotNodeRevolute> or another type is used
110  * perhaps you can infer the actual RobotNodeType somehow. Until now we just check for names which is
111  * much faster!
112  *
113  if ( (_cachedNodes.find(name)==_cachedNodes.end()) || _robot->hasRobotNode(robotNode->getName())) {
114  shared_ptr<RemoteRobotNode> remoteNode(dynamic_pointer_cast<RemoteRobotNode>(robotNode));
115  if (! remoteNode) return false;
116 
117  SharedRobotNodeInterfacePrx sharedNode = remoteNode->getSharedNode();
118  SharedRobotNodeInterfacePrx otherSharedNode = dynamic_pointer_cast<RemoteRobotNode>(this->getRobotNode(robotNodeName))->getSharedNode();
119  if (sharedNode == otherSharedNode)
120  return true;
121  }
122 
123  return false;
124  */
125  }
126 
127 
128  RobotNodePtr RemoteRobot::getRobotNode(const std::string& robotNodeName) const
129  {
130  DMES((format("Node: %1%") % robotNodeName));
131  auto it = _cachedNodes.find(robotNodeName);
132  if (it == _cachedNodes.end() || it->second == NULL)
133  {
134  DMES("No cache hit");
135  _cachedNodes[robotNodeName] = RemoteRobot::createRemoteRobotNode(_robot->getRobotNode(robotNodeName),
136  shared_from_this());
137  return _cachedNodes[robotNodeName];
138  }
139  else
140  {
141  DMES("Cache hit");
142  return it->second;
143  }
144  }
145 
146  void RemoteRobot::getRobotNodes(std::vector< RobotNodePtr >& storeNodes, bool clearVector) const
147  {
148  if (clearVector)
149  {
150  storeNodes.clear();
151  }
152 
153  NameList nodes = _robot->getRobotNodes();
154  for (std::string const& name : nodes)
155  {
156  storeNodes.push_back(this->getRobotNode(name));
157  }
158  }
159 
160  bool RemoteRobot::hasRobotNodeSet(const std::string& name) const
161  {
162  return _robot->hasRobotNodeSet(name);
163  }
164 
165  RobotNodeSetPtr RemoteRobot::getRobotNodeSet(const std::string& nodeSetName) const
166  {
167  std::vector<RobotNodePtr> storeNodes;
168  RobotNodeSetInfoPtr info = _robot->getRobotNodeSet(nodeSetName);
169  return RobotNodeSet::createRobotNodeSet(
170  shared_from_this(), nodeSetName, info->names, info->rootName, info->tcpName);
171  }
172 
173 
174  void RemoteRobot::getRobotNodeSets(std::vector<RobotNodeSetPtr>& storeNodeSet) const
175  {
176  NameList sets = _robot->getRobotNodeSets();
177 
178  for (std::string const& name : sets)
179  {
180  storeNodeSet.push_back(this->getRobotNodeSet(name));
181  }
182  }
183 
185  {
186  PosePtr p = PosePtr::dynamicCast(_robot->getGlobalPose());
187  return p->toEigen(); // convert to eigen first
188  }
189 
191  {
192  return _robot->getScaling();
193  }
194 
196  {
197  return this->_robot;
198  }
199 
200  std::string RemoteRobot::getName() const
201  {
202  return _robot->getName();
203  }
204 
205  VirtualRobot::RobotNodePtr RemoteRobot::createLocalNode(SharedRobotNodeInterfacePrx remoteNode, std::vector<VirtualRobot::RobotNodePtr>& allNodes, std::map< VirtualRobot::RobotNodePtr, std::vector<std::string> >& childrenMap, RobotPtr robo)
206  {
207  std::scoped_lock cloneLock(m);
208  static int nonameCounter = 0;
209 
210  if (!remoteNode || !robo)
211  {
212  ARMARX_ERROR_S << " NULL data ";
213  return VirtualRobot::RobotNodePtr();
214  }
215 
216  VirtualRobot::RobotNodeFactoryPtr revoluteNodeFactory = VirtualRobot::RobotNodeFactory::fromName(VirtualRobot::RobotNodeRevoluteFactory::getName(), NULL);
217  VirtualRobot::RobotNodeFactoryPtr fixedNodeFactory = VirtualRobot::RobotNodeFactory::fromName(VirtualRobot::RobotNodeFixedFactory::getName(), NULL);
218  VirtualRobot::RobotNodeFactoryPtr prismaticNodeFactory = VirtualRobot::RobotNodeFactory::fromName(VirtualRobot::RobotNodePrismaticFactory::getName(), NULL);
219 
220  Eigen::Vector3f idVec3 = Eigen::Vector3f::Zero();
221  std::string name = remoteNode->getName();
222 
223  if (name.empty())
224  {
225  ARMARX_LOG_S << "Node without name!!!";
226  std::stringstream ss;
227  ss << "robot_node_" << nonameCounter;
228  nonameCounter++;
229  name = ss.str();
230  }
231 
232  VirtualRobot::RobotNodePtr result;
233  PosePtr lTbase = PosePtr::dynamicCast(remoteNode->getLocalTransformation());
234  Eigen::Matrix4f localTransform = lTbase->toEigen();
235 
236  //float jv = remoteNode->getJointValue();
237  float jvLo = remoteNode->getJointLimitLow();
238  float jvHi = remoteNode->getJointLimitHigh();
239  float jointOffset = 0;//remoteNode->getJointOffset();
240 
241  JointType jt = remoteNode->getType();
242 
243  SceneObject::Physics physics;
244  physics.localCoM = Vector3Ptr::dynamicCast(remoteNode->getCoM())->toEigen();
245  std::vector<float> inertia = remoteNode->getInertia();
246  for (int i = 0; i < 3; i++)
247  for (int j = 0; j < 3; j++)
248  {
249  physics.inertiaMatrix(i, j) = inertia.at(i * 3 + j);
250  }
251  physics.massKg = remoteNode->getMass();
252 
253  switch (jt)
254  {
255  case ePrismatic:
256  {
257  Vector3Ptr axisBase = Vector3Ptr::dynamicCast(remoteNode->getJointTranslationDirection());
258  Eigen::Vector3f axis = axisBase->toEigen();
259  // convert axis to local coord system
260  Eigen::Vector4f result4f = Eigen::Vector4f::Zero();
261  result4f.segment(0, 3) = axis;
262  PosePtr gp = PosePtr::dynamicCast(remoteNode->getGlobalPose());
263  result4f = gp->toEigen().inverse() * result4f;
264  axis = result4f.block(0, 0, 3, 1);
265 
266  result = prismaticNodeFactory->createRobotNode(robo, name, VirtualRobot::VisualizationNodePtr(), VirtualRobot::CollisionModelPtr(),
267  jvLo, jvHi, jointOffset, localTransform, idVec3, axis, physics);
268  }
269  break;
270 
271  case eFixed:
272  result = fixedNodeFactory->createRobotNode(robo, name, VirtualRobot::VisualizationNodePtr(), VirtualRobot::CollisionModelPtr(), 0,
273  0, 0, localTransform, idVec3, idVec3, physics);
274  break;
275 
276  case eRevolute:
277  {
278  Vector3Ptr axisBase = Vector3Ptr::dynamicCast(remoteNode->getJointRotationAxis());
279  Eigen::Vector3f axis = axisBase->toEigen();
280  // convert axis to local coord system
281  Eigen::Vector4f result4f = Eigen::Vector4f::Zero();
282  result4f.segment(0, 3) = axis;
283  PosePtr gp = PosePtr::dynamicCast(remoteNode->getGlobalPose());
284  result4f = gp->toEigen().inverse() * result4f;
285  axis = result4f.block(0, 0, 3, 1);
286 
287  result = revoluteNodeFactory->createRobotNode(robo, name, VirtualRobot::VisualizationNodePtr(), VirtualRobot::CollisionModelPtr(),
288  jvLo, jvHi, jointOffset, localTransform, axis, idVec3, physics);
289  }
290  break;
291 
292  default:
293  ARMARX_ERROR_S << "JointType nyi...";
294  return VirtualRobot::RobotNodePtr();
295  break;
296  }
297 
298  robo->registerRobotNode(result);
299  allNodes.push_back(result);
300 
301 
302  // setup joint->nextNodes children
303  std::vector<std::string> childrenBase = remoteNode->getChildren();
304  std::vector<std::string> children;
305 
306  // check for RobotNodes (sensors do also register as children!)
307  for (size_t i = 0; i < childrenBase.size(); i++)
308  {
309  if (_robot->hasRobotNode(childrenBase[i]))
310  {
311  SharedRobotNodeInterfacePrx rnRemote = _robot->getRobotNode(childrenBase[i]);
312  VirtualRobot::RobotNodePtr localNode = createLocalNode(rnRemote, allNodes, childrenMap, robo);
313 
314  if (!localNode)
315  {
316  ARMARX_ERROR_S << "Could not create local node: " << children[i];
317  continue;
318  }
319 
320  children.push_back(childrenBase[i]);
321  }
322  }
323 
324  childrenMap[result] = children;
325  return result;
326  }
327 
329  {
330  std::scoped_lock cloneLock(m);
331  std::string robotType = getName();
332  std::string robotName = getName();
333  VirtualRobot::RobotPtr robo(new VirtualRobot::LocalRobot(robotName, robotType));
334 
335  //RobotNodePtr
336  SharedRobotNodeInterfacePrx root = _robot->getRootNode();
337 
338  std::vector<VirtualRobot::RobotNodePtr> allNodes;
339  std::map< VirtualRobot::RobotNodePtr, std::vector<std::string> > childrenMap;
340 
341  VirtualRobot::RobotNodePtr rootLocal = createLocalNode(root, allNodes, childrenMap, robo);
342 
343  bool res = VirtualRobot::RobotFactory::initializeRobot(robo, allNodes, childrenMap, rootLocal);
344 
345  if (!res)
346  {
347  ARMARX_ERROR_S << "Failed to initialize local robot...";
348  return VirtualRobot::RobotPtr();
349  }
350 
351  // clone rns
352  std::vector<std::string> rns = _robot->getRobotNodeSets();
353 
354  for (size_t i = 0; i < rns.size(); i++)
355  {
356  RobotNodeSetInfoPtr rnsInfo = _robot->getRobotNodeSet(rns[i]);
357  RobotNodeSet::createRobotNodeSet(robo, rnsInfo->name, rnsInfo->names, rnsInfo->rootName, rnsInfo->tcpName, true);
358  }
359 
360  //ARMARX_IMPORTANT_S << "RemoteRobot local clone end" << flush;
361  auto pose = PosePtr::dynamicCast(_robot->getGlobalPose());
362  robo->setGlobalPose(pose->toEigen());
363  return robo;
364  }
365 
366  VirtualRobot::RobotPtr RemoteRobot::createLocalClone(RobotStateComponentInterfacePrx robotStatePrx, const std::string& filename, const Ice::StringSeq packages, VirtualRobot::RobotIO::RobotDescription loadMode)
367  {
368  return createLocalClone(robotStatePrx->getSynchronizedRobot(), filename, robotStatePrx->getScaling(), packages, loadMode);
369  }
370 
371  RobotPtr RemoteRobot::createLocalClone(SharedRobotInterfacePrx sharedRobotPrx, std::string filename, float scaling, const Ice::StringSeq packages, VirtualRobot::RobotIO::RobotDescription loadMode)
372  {
373  RobotPtr result;
374 
375  std::scoped_lock cloneLock(m);
376  ARMARX_VERBOSE_S << "Creating local clone of remote robot (filename:" << filename << ")";
377 
378 
379  if (!sharedRobotPrx)
380  {
381  ARMARX_ERROR_S << "NULL sharedRobotPrx. Aborting...";
382  return result;
383  }
384 
385  if (filename.empty())
386  {
387  std::shared_ptr<RemoteRobot> rob(new RemoteRobot(sharedRobotPrx));
388  result = rob->createLocalClone();
389 
390  if (!result)
391  {
392  ARMARX_ERROR_S << "Could not create local clone. Aborting...";
393  return result;
394  }
395  }
396  else
397  {
398  Ice::StringSeq includePaths;
399  for (const std::string& projectName : packages)
400  {
401  if (projectName.empty())
402  {
403  continue;
404  }
405 
406  CMakePackageFinder project(projectName);
407 
408  auto pathsString = project.getDataDir();
409  ARMARX_DEBUG_S << "Data paths of ArmarX package " << projectName << ": " << pathsString;
410  Ice::StringSeq projectIncludePaths = simox::alg::split(pathsString, ";,");
411  ARMARX_DEBUG_S << "Result: Data paths of ArmarX package " << projectName << ": " << projectIncludePaths;
412  includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end());
413 
414  }
415 
416 
418  {
419  ARMARX_ERROR_S << "Could find robot file " << filename;
420  return result;
421  }
422  result = RobotIO::loadRobot(filename, loadMode);
423 
424  if (!result)
425  {
426  ARMARX_ERROR_S << "Could not load robot file " << filename << ". Aborting...";
427  return result;
428  }
429  }
430 
431  if (result && scaling != 1.0f)
432  {
433  ARMARX_INFO_S << "Scaling robot to " << scaling;
434  result = result->clone(result->getName(), result->getCollisionChecker(), scaling);
435  }
436 
437  synchronizeLocalClone(result, sharedRobotPrx);
438  return result;
439  }
440 
441  RobotPtr RemoteRobot::createLocalCloneFromFile(RobotStateComponentInterfacePrx robotStatePrx, RobotIO::RobotDescription loadMode)
442  {
443  return createLocalClone(robotStatePrx, robotStatePrx->getRobotFilename(), robotStatePrx->getArmarXPackages(), loadMode);
444  }
445 
446 
447 
449  {
450  return synchronizeLocalClone(robot, robotStatePrx->getSynchronizedRobot());
451  }
452 
454  {
455  if (!robot)
456  {
457  ARMARX_ERROR << "Robot is NULL! Aborting...";
458  return false;
459  }
460  if (!sharedRobotPrx)
461  {
462  ARMARX_ERROR_S << "shared robot prx is NULL! Aborting...";
463  return false;
464  }
465  PoseBasePtr globalPose;
466  RobotConfigPtr c(new RobotConfig(robot, "synchronizeLocalClone"));
467  NameValueMap jv = sharedRobotPrx->getConfigAndPose(globalPose);
468 
469  for (NameValueMap::const_iterator it = jv.begin(); it != jv.end(); it++)
470  {
471  // joint values
472  const std::string& jointName = it->first;
473  float jointAngle = it->second;
474 
475  if (!c->setConfig(jointName, jointAngle))
476  {
477  ARMARX_WARNING << deactivateSpam(10, jointName) << "Joint not known in local copy:" << jointName << ". Skipping...";
478  }
479  }
480 
481  robot->setConfig(c);
482  auto pose = PosePtr::dynamicCast(globalPose);
483  robot->setGlobalPose(pose->toEigen());
484  return true;
485  }
486 
488  {
489  ARMARX_CHECK_EXPRESSION(robotStatePrx);
490 
491  RobotConfigPtr c(new RobotConfig(robot, "synchronizeLocalClone"));
492  RobotStateConfig state = robotStatePrx->getRobotStateAtTimestamp(timestamp);
493 
494  return synchronizeLocalCloneToState(robot, state);
495  }
496 
497  bool RemoteRobot::synchronizeLocalCloneToState(RobotPtr robot, const RobotStateConfig& state)
498  {
500 
501  RobotConfigPtr c(new RobotConfig(robot, "synchronizeLocalClone"));
502  if (state.jointMap.empty())
503  {
504  return false;
505  }
506 
507  for (NameValueMap::const_iterator it = state.jointMap.begin(); it != state.jointMap.end(); it++)
508  {
509  // joint values
510  const std::string& jointName = it->first;
511  float jointAngle = it->second;
512 
513  if (!c->setConfig(jointName, jointAngle))
514  {
515  ARMARX_WARNING << deactivateSpam(10, jointName) << "Joint not known in local copy:" << jointName << ". Skipping...";
516  }
517  }
518 
519  robot->setConfig(c);
520  auto pose = PosePtr::dynamicCast(state.globalPose);
521  robot->setGlobalPose(pose->toEigen());
522 
523  return true;
524  }
525 
526 
527 
528  // Private (unused methods)
529 
530  bool RemoteRobot::hasEndEffector(const std::string& endEffectorName) const
531  {
532  return false;
533  }
534 
535  EndEffectorPtr RemoteRobot::getEndEffector(const std::string& endEffectorName) const
536  {
537  return EndEffectorPtr();
538  }
539 
540  void RemoteRobot::getEndEffectors(std::vector<EndEffectorPtr>& storeEEF) const {}
541  void RemoteRobot::setRootNode(RobotNodePtr node) {}
542  void RemoteRobot::registerRobotNode(RobotNodePtr node) {}
543  void RemoteRobot::deregisterRobotNode(RobotNodePtr node) {}
544  void RemoteRobot::registerRobotNodeSet(RobotNodeSetPtr nodeSet) {}
545  void RemoteRobot::deregisterRobotNodeSet(RobotNodeSetPtr nodeSet) {}
546  void RemoteRobot::registerEndEffector(EndEffectorPtr endEffector) {}
547 
548  void RemoteRobot::setGlobalPose(const Eigen::Matrix4f& globalPose, bool applyValues)
549  {
550  if (_robot)
551  {
552  _robot->setGlobalPose(new Pose(globalPose));
553  }
554  }
555 
557  {
558  return VirtualRobot::CollisionChecker::getGlobalCollisionChecker();
559  }
560 
561 
562 }
armarx::RemoteRobot::m
static std::recursive_mutex m
Definition: RemoteRobot.h:258
armarx::RemoteRobot::getGlobalPose
Eigen::Matrix4f getGlobalPose() const override
Definition: RemoteRobot.cpp:184
RemoteRobot.h
armarx::RemoteRobot::createRemoteRobotNode
static VirtualRobot::RobotNodePtr createRemoteRobotNode(SharedRobotNodeInterfacePrx, VirtualRobot::RobotPtr)
Definition: RemoteRobotNode.cpp:42
Eigen
Definition: Elements.h:36
armarx::RemoteRobot::hasRobotNode
bool hasRobotNode(const std::string &robotNodeName) const override
Definition: RemoteRobot.cpp:91
armarx::RemoteRobot::_robot
SharedRobotInterfacePrx _robot
Definition: RemoteRobot.h:254
armarx::RemoteRobot::deregisterRobotNode
void deregisterRobotNode(VirtualRobot::RobotNodePtr node) override
Not implemented yet.
Definition: RemoteRobot.cpp:543
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition: basic_types.h:31
armarx::RemoteRobot::synchronizeLocalClone
static bool synchronizeLocalClone(VirtualRobot::RobotPtr robot, RobotStateComponentInterfacePrx robotStatePrx)
Definition: RemoteRobot.cpp:448
VirtualRobot
Definition: FramedPose.h:43
armarx::RemoteRobot::createLocalCloneFromFile
static VirtualRobot::RobotPtr createLocalCloneFromFile(RobotStateComponentInterfacePrx robotStatePrx, VirtualRobot::RobotIO::RobotDescription loadMode=VirtualRobot::RobotIO::eFull)
This is a convenience function for createLocalClone, which automatically gets the filename from the R...
Definition: RemoteRobot.cpp:441
armarx::RemoteRobot::getRootNode
VirtualRobot::RobotNodePtr getRootNode() const override
Definition: RemoteRobot.cpp:81
armarx::RemoteRobot::getRobotNodes
void getRobotNodes(std::vector< VirtualRobot::RobotNodePtr > &storeNodes, bool clearVector=true) const override
Definition: RemoteRobot.cpp:146
armarx::RemoteRobot::_root
VirtualRobot::RobotNodePtr _root
Definition: RemoteRobot.h:256
armarx::RemoteRobot::getEndEffectors
void getEndEffectors(std::vector< VirtualRobot::EndEffectorPtr > &storeEEF) const override
Not implemented yet.
Definition: RemoteRobot.cpp:540
armarx::CMakePackageFinder
The CMakePackageFinder class provides an interface to the CMake Package finder capabilities.
Definition: CMakePackageFinder.h:53
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::navigation::platform_controller::platform_global_trajectory::NameValueMap
std::map< std::string, float > NameValueMap
Definition: PlatformGlobalTrajectoryController.h:93
armarx::RemoteRobot::createLocalNode
VirtualRobot::RobotNodePtr createLocalNode(SharedRobotNodeInterfacePrx remoteNode, std::vector< VirtualRobot::RobotNodePtr > &allNodes, std::map< VirtualRobot::RobotNodePtr, std::vector< std::string > > &childrenMap, VirtualRobot::RobotPtr robo)
Definition: RemoteRobot.cpp:205
project
std::string project
Definition: VisualizationRobot.cpp:83
armarx::RemoteRobot::getScaling
float getScaling()
Definition: RemoteRobot.cpp:190
armarx::RemoteRobot::getRobotNodeSet
VirtualRobot::RobotNodeSetPtr getRobotNodeSet(const std::string &nodeSetName) const override
Definition: RemoteRobot.cpp:165
armarx::RemoteRobot::getRobotNode
VirtualRobot::RobotNodePtr getRobotNode(const std::string &robotNodeName) const override
Definition: RemoteRobot.cpp:128
IceInternal::Handle< Pose >
armarx::RemoteRobot::getName
std::string getName() const override
Definition: RemoteRobot.cpp:200
deactivateSpam
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
Definition: Logging.cpp:72
armarx::RemoteRobot::hasRobotNodeSet
bool hasRobotNodeSet(const std::string &name) const override
Definition: RemoteRobot.cpp:160
ARMARX_DEBUG_S
#define ARMARX_DEBUG_S
Definition: Logging.h:198
FramedPose.h
armarx::RemoteRobot::getRobotNodeSets
void getRobotNodeSets(std::vector< VirtualRobot::RobotNodeSetPtr > &storeNodeSet) const override
Definition: RemoteRobot.cpp:174
armarx::armem::human::Robot
@ Robot
Definition: util.h:14
ARMARX_ERROR_S
#define ARMARX_ERROR_S
Definition: Logging.h:209
armarx::RemoteRobot::registerEndEffector
void registerEndEffector(VirtualRobot::EndEffectorPtr endEffector) override
Not implemented yet.
Definition: RemoteRobot.cpp:546
armarx::VariantType::Long
const VariantTypeId Long
Definition: Variant.h:917
filename
std::string filename
Definition: VisualizationRobot.cpp:84
armarx::RemoteRobot::getSharedRobot
SharedRobotInterfacePrx getSharedRobot() const
Use this method to share the robot instance over Ice.
Definition: RemoteRobot.cpp:195
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:189
armarx::RemoteRobot::deregisterRobotNodeSet
void deregisterRobotNodeSet(VirtualRobot::RobotNodeSetPtr nodeSet) override
Not implemented yet.
Definition: RemoteRobot.cpp:545
ARMARX_LOG_S
#define ARMARX_LOG_S
Definition: Logging.h:145
armarx::RemoteRobotNode_getGlobalCollisionChecker
CollisionCheckerPtr RemoteRobotNode_getGlobalCollisionChecker()
Definition: RemoteRobot.cpp:556
ExpressionException.h
DMES
#define DMES(Obj)
Definition: RemoteRobot.cpp:47
CMakePackageFinder.h
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::RemoteRobot::_cachedNodes
std::map< std::string, VirtualRobot::RobotNodePtr > _cachedNodes
Definition: RemoteRobot.h:255
armarx::RemoteRobot::~RemoteRobot
~RemoteRobot() override
Definition: RemoteRobot.cpp:64
armarx::RemoteRobot::registerRobotNodeSet
void registerRobotNodeSet(VirtualRobot::RobotNodeSetPtr nodeSet) override
Not implemented yet.
Definition: RemoteRobot.cpp:544
armarx::RemoteRobot::createLocalClone
VirtualRobot::RobotPtr createLocalClone()
Clones the structure of this remote robot to a local instance.
Definition: RemoteRobot.cpp:328
armarx::RemoteRobot::synchronizeLocalCloneToTimestamp
static bool synchronizeLocalCloneToTimestamp(VirtualRobot::RobotPtr robot, RobotStateComponentInterfacePrx robotStatePrx, Ice::Long timestamp)
Synchronizes a local robot to a robot state at timestamp.
Definition: RemoteRobot.cpp:487
IceInternal::ProxyHandle< ::IceProxy::armarx::SharedRobotInterface >
armarx::RemoteRobot::synchronizeLocalCloneToState
static bool synchronizeLocalCloneToState(VirtualRobot::RobotPtr robot, RobotStateConfig const &state)
Definition: RemoteRobot.cpp:497
ARMARX_VERBOSE_S
#define ARMARX_VERBOSE_S
Definition: Logging.h:200
armarx::RemoteRobot::getEndEffector
VirtualRobot::EndEffectorPtr getEndEffector(const std::string &endEffectorName) const override
Not implemented yet.
Definition: RemoteRobot.cpp:535
armarx::RemoteRobot::RemoteRobot
RemoteRobot(SharedRobotInterfacePrx robot)
Definition: RemoteRobot.cpp:57
ARMARX_INFO_S
#define ARMARX_INFO_S
Definition: Logging.h:195
armarx::ArmarXDataPath::getAbsolutePath
static bool getAbsolutePath(const std::string &relativeFilename, std::string &storeAbsoluteFilename, const std::vector< std::string > &additionalSearchPaths={}, bool verbose=true)
Definition: ArmarXDataPath.cpp:111
Logging.h
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
ArmarXDataPath.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::RemoteRobot::setRootNode
void setRootNode(VirtualRobot::RobotNodePtr node) override
Not implemented yet.
Definition: RemoteRobot.cpp:541
armarx::RemoteRobot::setGlobalPose
void setGlobalPose(const Eigen::Matrix4f &globalPose, bool applyValues=true) override
Sets the global pose of the robot.
Definition: RemoteRobot.cpp:548
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
armarx::RemoteRobot::registerRobotNode
void registerRobotNode(VirtualRobot::RobotNodePtr node) override
Not implemented yet.
Definition: RemoteRobot.cpp:542
armarx::split
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
Definition: StringHelpers.cpp:36
armarx::RemoteRobot::hasEndEffector
bool hasEndEffector(const std::string &endEffectorName) const override
Not implemented yet.
Definition: RemoteRobot.cpp:530