Go to the documentation of this file.
3 #include <SimoxUtility/math/pose/invert.h>
4 #include <SimoxUtility/math/pose/pose.h>
5 #include <VirtualRobot/Nodes/RobotNode.h>
6 #include <VirtualRobot/Robot.h>
7 #include <VirtualRobot/RobotConfig.h>
124 framed.
changeFrame(robot, robot->getRootNode()->getName());
147 robotConfig = robot->getConfig()->getRobotNodeJointValueMap();
206 return providedObjectPose;
211 bool updateObjectPoseGlobal)
214 if (updateObjectPoseGlobal)
222 bool updateObjectPoseRobot)
225 if (updateObjectPoseRobot)
231 std::optional<simox::OrientedBoxf>
241 std::optional<simox::OrientedBoxf>
269 VirtualRobot::RobotNodePtr robotNode = agent->getRobotNode(
attachment->frameName);
278 robotConfig = agent->getConfig()->getRobotNodeJointValueMap();
296 std::optional<ObjectAttachmentInfo>& attachment)
305 attachment = std::nullopt;
309 std::optional<objpose::ObjectAttachmentInfo>
331 const std::optional<ObjectAttachmentInfo>& attachment)
335 ice =
new objpose::data::ObjectAttachmentInfo();
336 toIce(*ice, *attachment);
344 objpose::data::ObjectAttachmentInfoPtr
351 objpose::data::ObjectAttachmentInfoPtr ice =
new objpose::data::ObjectAttachmentInfo();
352 toIce(*ice, *attachment);
372 poses.reserve(ice.size());
373 for (
const auto& i : ice)
375 poses.emplace_back(i);
393 objpose::data::ObjectPose
403 ice.reserve(poses.size());
404 for (
const auto& p : poses)
406 ice.emplace_back(p.toIce());
423 if (pose.objectID ==
id)
436 if (pose.objectID ==
id)
444 objpose::data::ObjectPose*
447 for (objpose::data::ObjectPose& pose : objectPoses)
449 if (pose.objectID ==
id)
457 const objpose::data::ObjectPose*
461 for (
const objpose::data::ObjectPose& pose : objectPoses)
463 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)
MatrixXX< 4, 4, float > Matrix4f
#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
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.
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.