ProvidedObjectPose.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <optional>
4 #include <map>
5 #include <vector>
6 
7 #include <Eigen/Core>
8 
9 #include <SimoxUtility/shapes/OrientedBox.h>
10 
12 
13 #include <RobotAPI/interface/objectpose/object_pose_types.h>
17 
18 
19 namespace armarx::objpose
20 {
21 
22  /**
23  * @brief An object pose provided by an ObjectPoseProvider.
24  */
26  {
27  public:
28 
30  ProvidedObjectPose(const data::ProvidedObjectPose& ice);
31 
32  void fromIce(const data::ProvidedObjectPose& ice);
33 
34  data::ProvidedObjectPose toIce() const;
35  void toIce(data::ProvidedObjectPose& ice) const;
36 
37  public:
38 
39  /// Name of the providing component.
40  std::string providerName;
41  /// Known or unknown object.
42  ObjectType objectType = AnyObject;
43  /// Whether object is static. Static objects don't decay.
44  bool isStatic = false;
45 
46  /// The object ID, i.e. dataset, class name and instance name.
48 
50  std::string objectPoseFrame;
51  std::optional<PoseManifoldGaussian> objectPoseGaussian;
52 
53  /// The object's joint values if it is articulated.
54  std::map<std::string, float> objectJointValues;
55 
56 
57  /// Confidence in [0, 1] (1 = full, 0 = none).
58  float confidence = 0;
59  /// Source timestamp.
61 
62  /// Object bounding box in object's local coordinate frame.
63  /// @see oobbRobot(), oobbGlobal()
64  std::optional<simox::OrientedBoxf> localOOBB;
65  };
66 
67 
68 
69  void fromIce(const data::ProvidedObjectPose& ice, ProvidedObjectPose& pose);
70  ProvidedObjectPose fromIce(const data::ProvidedObjectPose& ice);
71 
74 
75 
76  void toIce(data::ProvidedObjectPose& ice, const ProvidedObjectPose& pose);
77  data::ProvidedObjectPose toIce(const ProvidedObjectPose& pose);
78 
81 
82 
83 }
armarx::objpose::ProvidedObjectPose::fromIce
void fromIce(const data::ProvidedObjectPose &ice)
Definition: ProvidedObjectPose.cpp:24
armarx::ObjectID
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
Definition: ObjectID.h:11
armarx::objpose::ProvidedObjectPose::objectID
armarx::ObjectID objectID
The object ID, i.e. dataset, class name and instance name.
Definition: ProvidedObjectPose.h:47
DateTime.h
armarx::objpose::fromIce
void fromIce(const Box &box, simox::OrientedBox< float > &oobb)
armarx::objpose::ProvidedObjectPose::objectPoseFrame
std::string objectPoseFrame
Definition: ProvidedObjectPose.h:50
armarx::objpose::ProvidedObjectPose::toIce
data::ProvidedObjectPose toIce() const
Definition: ProvidedObjectPose.cpp:43
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::objpose::ProvidedObjectPose::objectPoseGaussian
std::optional< PoseManifoldGaussian > objectPoseGaussian
Definition: ProvidedObjectPose.h:51
armarx::objpose
This file is part of ArmarX.
Definition: objpose.h:7
ObjectID.h
armarx::objpose::ProvidedObjectPose::providerName
std::string providerName
Name of the providing component.
Definition: ProvidedObjectPose.h:40
armarx::objpose::ProvidedObjectPose::ProvidedObjectPose
ProvidedObjectPose()
Definition: ProvidedObjectPose.cpp:15
PoseManifoldGaussian.h
armarx::objpose::ProvidedObjectPoseSeq
std::vector< ProvidedObjectPose > ProvidedObjectPoseSeq
Definition: forward_declarations.h:25
armarx::objpose::ProvidedObjectPose
An object pose provided by an ObjectPoseProvider.
Definition: ProvidedObjectPose.h:25
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
armarx::objpose::toIce
objpose::AABB toIce(const simox::AxisAlignedBoundingBox &aabb)
Definition: ice_conversions.cpp:94
forward_declarations.h
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::objpose::ProvidedObjectPose::objectType
ObjectType objectType
Known or unknown object.
Definition: ProvidedObjectPose.h:42
armarx::objpose::ProvidedObjectPose::isStatic
bool isStatic
Whether object is static. Static objects don't decay.
Definition: ProvidedObjectPose.h:44
armarx::objpose::ProvidedObjectPose::objectJointValues
std::map< std::string, float > objectJointValues
The object's joint values if it is articulated.
Definition: ProvidedObjectPose.h:54
armarx::objpose::ProvidedObjectPose::localOOBB
std::optional< simox::OrientedBoxf > localOOBB
Object bounding box in object's local coordinate frame.
Definition: ProvidedObjectPose.h:64
armarx::objpose::ProvidedObjectPose::confidence
float confidence
Confidence in [0, 1] (1 = full, 0 = none).
Definition: ProvidedObjectPose.h:58
armarx::objpose::ProvidedObjectPose::timestamp
DateTime timestamp
Source timestamp.
Definition: ProvidedObjectPose.h:60
armarx::objpose::ProvidedObjectPose::objectPose
Eigen::Matrix4f objectPose
Definition: ProvidedObjectPose.h:49
armarx::core::time::DateTime::Invalid
static DateTime Invalid()
Definition: DateTime.cpp:60