Skip to content
Snippets Groups Projects
Commit f7475472 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add getters for OOBB in robot and global frame

parent 9999e0e2
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,25 @@ namespace armarx::objpose
objpose::fromIce(provided.localOOBB, localOOBB);
}
std::optional<simox::OrientedBoxf> ObjectPose::oobbRobot() const
{
if (localOOBB)
{
return localOOBB->transformed(objectPoseRobot);
}
return std::nullopt;
}
std::optional<simox::OrientedBoxf> ObjectPose::oobbGlobal() const
{
if (localOOBB)
{
return localOOBB->transformed(objectPoseGlobal);
}
return std::nullopt;
}
}
namespace armarx
......
......@@ -54,7 +54,15 @@ namespace armarx::objpose
IceUtil::Time timestamp = IceUtil::Time::microSeconds(-1);
/// Object bounding box in object's local coordinate frame.
/// @see oobbRobot(), oobbGlobal()
std::optional<simox::OrientedBoxf> localOOBB;
/// Get the OOBB in the robot frame (according to `objectPoseRobot`).
std::optional<simox::OrientedBoxf> oobbRobot() const;
/// Get the OOBB in the global frame (according to `objectPoseGlobal`).
std::optional<simox::OrientedBoxf> oobbGlobal() const;
};
using ObjectPoseSeq = std::vector<ObjectPose>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment