Go to the documentation of this file.
3 #include <SimoxUtility/math/pose/invert.h>
4 #include <SimoxUtility/math/pose/pose.h>
6 #include <VirtualRobot/Robot.h>
7 #include <VirtualRobot/RobotConfig.h>
120 framed.
changeFrame(robot, robot->getRootNode()->getName());
139 robotConfig = robot->getConfig()->getRobotNodeJointValueMap();
197 return providedObjectPose;
204 if (updateObjectPoseGlobal)
214 if (updateObjectPoseRobot)
255 VirtualRobot::RobotNodePtr robotNode = agent->getRobotNode(
attachment->frameName);
264 robotConfig = agent->getConfig()->getRobotNodeJointValueMap();
280 void objpose::fromIce(
const data::ObjectAttachmentInfoPtr& ice, std::optional<ObjectAttachmentInfo>& attachment)
289 attachment = std::nullopt;
293 std::optional<objpose::ObjectAttachmentInfo>
objpose::fromIce(
const data::ObjectAttachmentInfoPtr& ice)
311 void objpose::toIce(data::ObjectAttachmentInfoPtr& ice,
const std::optional<ObjectAttachmentInfo>& attachment)
315 ice =
new objpose::data::ObjectAttachmentInfo();
316 toIce(*ice, *attachment);
324 objpose::data::ObjectAttachmentInfoPtr
objpose::toIce(
const std::optional<ObjectAttachmentInfo>& attachment)
330 objpose::data::ObjectAttachmentInfoPtr ice =
new objpose::data::ObjectAttachmentInfo();
331 toIce(*ice, *attachment);
348 poses.reserve(ice.size());
349 for (
const auto& i : ice)
351 poses.emplace_back(i);
374 ice.reserve(poses.size());
375 for (
const auto& p : poses)
377 ice.emplace_back(p.toIce());
392 if (pose.objectID ==
id)
404 if (pose.objectID ==
id)
414 for (objpose::data::ObjectPose& pose : objectPoses)
416 if (pose.objectID ==
id)
426 for (
const objpose::data::ObjectPose& pose : objectPoses)
428 if (pose.objectID ==
id)
objpose::ObjectPose getAttached(VirtualRobot::RobotPtr agent) const
Get a copy of *this with updated attachment.
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
armarx::ObjectID objectID
The object ID, i.e. dataset, class name and instance name.
void fromIce(const dto::ClockType::ClockTypeEnum &dto, ClockType &bo)
std::vector< ObjectPose > ObjectPoseSeq
ObjectType objectType
Known or unknown object.
void fromIce(const data::ObjectPose &ice)
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
std::string robotName
The name of the robot.
void toIce(dto::ClockType::ClockTypeEnum &dto, const ClockType &bo)
std::optional< simox::OrientedBoxf > localOOBB
Object bounding box in object's local coordinate frame.
const std::string GlobalFrame
void fromIce(const Box &box, simox::OrientedBox< float > &oobb)
std::optional< simox::OrientedBoxf > oobbRobot() const
Get the OOBB in the robot frame (according to objectPoseRobot).
std::string providerName
Name of the providing component.
ObjectPose * findObjectPoseByID(ObjectPoseSeq &objectPoses, const ObjectID &id)
Find an object pose by the object ID.
std::string objectPoseFrame
void fromProvidedPose(const data::ProvidedObjectPose &provided, VirtualRobot::RobotPtr robot=nullptr)
std::optional< PoseManifoldGaussian > objectPoseOriginalGaussian
... and with uncertainty.
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
void setObjectPoseGlobal(const Eigen::Matrix4f &objectPoseGlobal, bool updateObjectPoseRobot=true)
data::ObjectPose toIce() const
void toIce(std::map< IceKeyT, IceValueT > &iceMap, const boost::container::flat_map< CppKeyT, CppValueT > &cppMap)
std::optional< simox::OrientedBoxf > oobbGlobal() const
Get the OOBB in the global frame (according to objectPoseGlobal).
bool isStatic
Whether object is static. Static objects don't decay.
std::optional< PoseManifoldGaussian > objectPoseRobotGaussian
... and with uncertainty.
std::string objectPoseOriginalFrame
The frame the object was originally localized in.
Eigen::Matrix4f robotPose
The robot pose when the object was observed.
Eigen::Matrix4f poseInFrame
void fromIce(Eigen::Vector2f &e, const Ice::FloatSeq &ice)
std::optional< PoseManifoldGaussian > objectPoseGaussian
This file is part of ArmarX.
virtual Eigen::Matrix4f toEigen() const
objpose::ProvidedObjectPose toProvidedObjectPoseGlobal() const
std::string providerName
Name of the providing component.
std::map< std::string, float > robotConfig
The robot config when the object was observed.
void fromIce(const std::map< IceKeyT, IceValueT > &iceMap, boost::container::flat_map< CppKeyT, CppValueT > &cppMap)
void setObjectPoseRobot(const Eigen::Matrix4f &objectPoseRobot, bool updateObjectPoseGlobal=true)
An object pose provided by an ObjectPoseProvider.
void updateAttached(VirtualRobot::RobotPtr agent)
Update an the object pose and robot state of an attached object pose according to the given agent sta...
objpose::AABB toIce(const simox::AxisAlignedBoundingBox &aabb)
armarx::ObjectID objectID
The object ID, i.e. dataset, class name and instance name.
MatrixXX< 4, 4, float > Matrix4f
ObjectType objectType
Known or unknown object.
bool isStatic
Whether object is static. Static objects don't decay.
Eigen::Matrix4f objectPoseGlobal
The object pose in the global frame.
std::optional< ObjectAttachmentInfo > attachment
Attachment information.
std::map< std::string, float > objectJointValues
The object's joint values if it is articulated.
Eigen::Matrix4f objectPoseOriginal
The object pose in the frame it was originally localized in.
std::optional< simox::OrientedBoxf > localOOBB
Object bounding box in object's local coordinate frame.
float confidence
Confidence in [0, 1] (1 = full, 0 = none).
Eigen::Matrix4f objectPoseRobot
The object pose in the robot root frame.
void changeToGlobal(const SharedRobotInterfacePrx &referenceRobot)
#define ARMARX_CHECK_EQUAL(lhs, rhs)
This macro evaluates whether lhs is equal (==) rhs and if it turns out to be false it will throw an E...
DateTime timestamp
Source timestamp.
std::map< std::string, float > objectJointValues
The object's joint values if it is articulated.
float confidence
Confidence in [0, 1] (1 = full, 0 = none).
Eigen::Matrix4f objectPose
This file offers overloads of toIce() and fromIce() functions for STL container types.
An object pose as stored by the ObjectPoseStorage.
void changeFrame(const SharedRobotInterfacePrx &referenceRobot, const std::string &newFrame)
std::shared_ptr< class Robot > RobotPtr
DateTime timestamp
Source timestamp.
std::optional< PoseManifoldGaussian > objectPoseGlobalGaussian
... and with uncertainty.