Go to the documentation of this file.
29 #include <ArmarXCore/interface/core/BasicTypes.h>
32 #include <VirtualRobot/VirtualRobot.h>
40 using namespace Eigen;
44 switch (node->getType())
59 return RobotNodePtr();
67 remoteNode->jointRotationAxis = remoteNode->
getGlobalPose().block<3, 3>(0, 0).inverse() * Vector3Ptr::dynamicCast(remoteNode->
_node->getJointRotationAxis())->toEigen();
74 remoteNode->jointTranslationDirection = remoteNode->
getGlobalPose().block<3, 3>(0, 0).inverse() * Vector3Ptr::dynamicCast(remoteNode->
_node->getJointTranslationDirection())->toEigen();
84 template<
class RobotNodeType>
91 catch (std::exception& e)
97 ARMARX_DEBUG_S <<
"Unref of SharedRobotNode failed: reason unknown";
101 template<
class RobotNodeType>
104 return _node->getJointValue();
107 template<
class RobotNodeType>
110 return _node->getJointLimitHigh();
112 template<
class RobotNodeType>
115 return _node->getJointLimitLow();
123 template<
class RobotNodeType>
126 return PosePtr::dynamicCast(_node->getLocalTransformation())->toEigen();
129 template<
class RobotNodeType>
132 return FramedPosePtr::dynamicCast(_node->getGlobalPose())->toEigen();
134 template<
class RobotNodeType>
137 return FramedPosePtr::dynamicCast(_node->getPoseInRootFrame())->toEigen();
140 template<
class RobotNodeType>
143 Vector3Ptr pos = Vector3Ptr::dynamicCast(_node->getPoseInRootFrame()->position);
145 return pos->toEigen();
148 template<
class RobotNodeType>
153 template<
class RobotNodeType>
156 return _node->hasChild(child, recursive);
159 template<
class RobotNodeType>
164 template<
class RobotNodeType>
167 NameList nodes = _node->getAllParents(rns->getName());
168 vector<RobotNodePtr> result;
169 RobotPtr robot = this->robot.lock();
171 for (std::string
const& name : nodes)
173 result.push_back(robot->getRobotNode(name));
178 template<
class RobotNodeType>
181 return this->robot.lock()->getRobotNode(_node->getParent());
187 template<
class RobotNodeType>
191 template<
class RobotNodeType>
194 return _node->getChildren();
196 template<
class RobotNodeType>
199 return _node->getParent();
201 template<
class RobotNodeType>
204 NameList nodes = _node->getChildren();
205 vector<SceneObjectPtr> result;
206 for (
string const& name : nodes)
208 result.push_back(this->robot.lock()->getRobotNode(name));
214 template<
class RobotNodeType>
218 template<
class RobotNodeType>
224 template<
class RobotNodeType>
228 template<
class RobotNodeType>
233 template<
class RobotNodeType>
237 template<
class RobotNodeType>
241 template<
class RobotNodeType>
virtual float getJointLimitLo() const
static VirtualRobot::RobotNodePtr createRemoteRobotNode(SharedRobotNodeInterfacePrx, VirtualRobot::RobotPtr)
virtual bool hasChildNode(const std::string &child, bool recursive=false) const
static void initialize(RemoteRobotNode< VirtualRobotNodeType > *remoteNode)
virtual float getJointLimitHi() const
virtual void setLocalTransformation(const Eigen::Matrix4f &trafo)
float getJointValue() const override
Eigen::Matrix4f getGlobalPose() const override
std::vector< VirtualRobot::SceneObjectPtr > getChildren() const override
Eigen::Matrix4f getPoseInRootFrame() const override
SharedRobotNodeInterfacePrx _node
void setJointLimits(float lo, float hi) override
void setGlobalPose(const Eigen::Matrix4f &pose) override
std::vector< VirtualRobot::RobotNodePtr > getAllParents(VirtualRobot::RobotNodeSetPtr rns) override
void updateTransformationMatrices() override
virtual void addChildNode(VirtualRobot::RobotNodePtr child)
Eigen::Matrix4f getLocalTransformation() override
virtual VirtualRobot::SceneObjectPtr getParent()
Mimics the behaviour of robot nodes while redirecting everything to Ice proxies.
MatrixXX< 4, 4, float > Matrix4f
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
boost::intrusive_ptr< SceneObject > SceneObjectPtr
virtual std::string getParentName() const
virtual std::vector< std::string > getChildrenNames() const
virtual bool initialize(VirtualRobot::RobotNodePtr parent, bool initializeChildren=false)
~RemoteRobotNode() override
virtual void setJointValue(float q, bool updateTransformations=true, bool clampToLimits=true)
Eigen::Vector3f getPositionInRootFrame() const override
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class Robot > RobotPtr