Go to the documentation of this file.
31 #include <Eigen/Geometry>
34 #include <VirtualRobot/LinkedCoordinate.h>
35 #include <VirtualRobot/VirtualRobot.h>
37 #include <Ice/ObjectAdapter.h>
47 this->referenceRobot =
nullptr;
52 armarx::Serializable(other),
53 armarx::VariantDataClass(other),
55 FramedPoseBase(other),
56 LinkedPoseBase(other),
63 referenceRobot->ref();
70 FramedPoseBase(other),
75 this->referenceRobot = referenceRobot;
80 referenceRobot->ref();
90 referenceRobot->ref();
91 this->referenceRobot = referenceRobot;
99 referenceRobot->ref();
100 this->referenceRobot = referenceRobot;
109 referenceRobot->unref();
122 VirtualRobot::LinkedCoordinate
c(sharedRobot);
123 std::string frame = this->
getFrame();
127 pose.block<3, 3>(0, 0) = QuaternionPtr::dynamicCast(orientation)->toEigen();
128 pose.block<3, 1>(0, 3) = Vector3Ptr::dynamicCast(position)->toEigen();
137 return this->
clone();
148 s <<
FramedPose::output() << std::endl <<
"reference robot: " << referenceRobot->ice_toString();
185 obj->setString(
"referenceRobot",
"");
194 std::string remoteRobotId = obj->getString(
"referenceRobot");
195 referenceRobot = SharedRobotInterfacePrx::uncheckedCast(
c.adapter->getCommunicator()->stringToProxy(remoteRobotId));
199 ARMARX_ERROR_S <<
"ReferenceRobot for LinkedPose not registered: " << remoteRobotId <<
flush;
208 referenceRobot->ref();
222 FramedDirectionBase(
source),
223 LinkedDirectionBase(
source),
227 referenceRobot =
source.referenceRobot;
232 referenceRobot->ref();
239 referenceRobot->ref();
240 this->referenceRobot = referenceRobot;
249 referenceRobot->unref();
260 if (newFrame == frame)
271 frame = frVec->frame;
277 throw LocalException(
"LinkedDirection cannot be serialized! Serialize FramedDirection");
282 throw LocalException(
"LinkedDirection cannot be deserialized! Deserialize FramedDirection");
290 referenceRobot->ref();
293 FramedDirection::ice_postUnmarshal();
VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
void ice_postUnmarshal() override
void suppressWarningUnusedVariableForLinkedPoseAndDirection()
The LinkedDirection class.
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
void changeFrame(const std::string &newFrame, const Ice::Current &c=Ice::emptyCurrent) override
VirtualRobot::LinkedCoordinate createLinkedCoordinate()
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
void changeFrame(const std::string &newFrame, const Ice::Current &c=Ice::emptyCurrent) override
FramedPosePtr toGlobal(const SharedRobotInterfacePrx &referenceRobot) const
static FramedDirectionPtr ChangeFrame(const VirtualRobot::RobotPtr &robot, const FramedDirection &framedVec, const std::string &newFrame)
void Identity(MatrixXX< N, N, T > *a)
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
const VariantTypeId LinkedPose
const LogSender::manipulator flush
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
Ice::ObjectPtr ice_clone() const override
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Mimics the behaviour of the VirtualRobot::Robot class while redirecting everything to an Ice proxy.
double v(double t, double v0, double a0, double j)
MatrixXX< 3, 3, float > Matrix3f
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...
FramedDirection is a 3 dimensional direction vector with a reference frame. The reference frame can b...
VariantTypeId getType(const Ice::Current &c=Ice::emptyCurrent) const override
void ice_postUnmarshal() override
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
void ice_postUnmarshal() override
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
LinkedPosePtr toGlobal() const
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
std::shared_ptr< Object > ObjectPtr
std::string getFrame() const
void changeToGlobal(const SharedRobotInterfacePrx &referenceRobot)
~LinkedDirection() override
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
double s(double t, double s0, double v0, double a0, double j)
This file offers overloads of toIce() and fromIce() functions for STL container types.
void changeFrame(const SharedRobotInterfacePrx &referenceRobot, const std::string &newFrame)
std::shared_ptr< class Robot > RobotPtr