Go to the documentation of this file.
27 #include <Eigen/Geometry>
29 #include <Ice/ObjectAdapter.h>
31 #include <VirtualRobot/LinkedCoordinate.h>
32 #include <VirtualRobot/VirtualRobot.h>
44 this->referenceRobot =
nullptr;
49 armarx::Serializable(other),
50 armarx::VariantDataClass(other),
52 FramedPoseBase(other),
53 LinkedPoseBase(other),
60 referenceRobot->ref();
67 FramedPoseBase(other),
72 this->referenceRobot = referenceRobot;
77 referenceRobot->ref();
82 const Eigen::Vector3f&
v,
88 referenceRobot->ref();
89 this->referenceRobot = referenceRobot;
98 referenceRobot->ref();
99 this->referenceRobot = referenceRobot;
108 referenceRobot->unref();
117 VirtualRobot::LinkedCoordinate
121 VirtualRobot::LinkedCoordinate
c(sharedRobot);
122 std::string frame = this->
getFrame();
126 pose.block<3, 3>(0, 0) = QuaternionPtr::dynamicCast(orientation)->toEigen();
127 pose.block<3, 1>(0, 3) = Vector3Ptr::dynamicCast(position)->toEigen();
137 return this->
clone();
151 <<
"reference robot: " << referenceRobot->ice_toString();
193 obj->setString(
"referenceRobot",
"");
203 std::string remoteRobotId = obj->getString(
"referenceRobot");
204 referenceRobot = SharedRobotInterfacePrx::uncheckedCast(
205 c.adapter->getCommunicator()->stringToProxy(remoteRobotId));
209 ARMARX_ERROR_S <<
"ReferenceRobot for LinkedPose not registered: " << remoteRobotId
220 referenceRobot->ref();
232 FramedDirectionBase(
source),
233 LinkedDirectionBase(
source),
237 referenceRobot =
source.referenceRobot;
242 referenceRobot->ref();
247 const std::string& frame,
251 referenceRobot->ref();
252 this->referenceRobot = referenceRobot;
261 referenceRobot->unref();
273 if (newFrame == frame)
284 frame = frVec->frame;
290 throw LocalException(
"LinkedDirection cannot be serialized! Serialize FramedDirection");
296 throw LocalException(
"LinkedDirection cannot be deserialized! Deserialize FramedDirection");
305 referenceRobot->ref();
308 FramedDirection::ice_postUnmarshal();
VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
void ice_postUnmarshal() override
void suppressWarningUnusedVariableForLinkedPoseAndDirection()
MatrixXX< 4, 4, float > Matrix4f
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)
#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
MatrixXX< 3, 3, float > Matrix3f
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