From 1929d27ea018d7e59c5e02580467086c9cca74c6 Mon Sep 17 00:00:00 2001 From: procopiostein Date: Wed, 24 May 2017 01:18:10 +0200 Subject: [PATCH] unifying 2D and 3D messages (#2) * unified ObjectHypothesis 2D and 3D in ObjectHypothesisWithPose * better description and attempt in normalizing fields also changed datatype to uint32 as we are in the pixel space for 2D BB * changed DetectionXD.msg to use generic ObjectHypothesisWithPose --- CMakeLists.txt | 3 +-- msg/BoundingBox2D.msg | 12 ++++++------ msg/BoundingBox3D.msg | 9 +++++---- msg/Detection2D.msg | 2 +- msg/Detection3D.msg | 2 +- msg/ObjectHypothesis2D.msg | 13 ------------- ...ypothesis3D.msg => ObjectHypothesisWithPose.msg} | 0 7 files changed, 14 insertions(+), 27 deletions(-) delete mode 100644 msg/ObjectHypothesis2D.msg rename msg/{ObjectHypothesis3D.msg => ObjectHypothesisWithPose.msg} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 510990a..13d3cbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,8 +50,7 @@ find_package(catkin REQUIRED COMPONENTS add_message_files( FILES ObjectHypothesis.msg - ObjectHypothesis2D.msg - ObjectHypothesis3D.msg + ObjectHypothesisWithPose.msg ClassifierInfo.msg Classification2D.msg Classification3D.msg diff --git a/msg/BoundingBox2D.msg b/msg/BoundingBox2D.msg index fd37eaa..b8ddfbb 100644 --- a/msg/BoundingBox2D.msg +++ b/msg/BoundingBox2D.msg @@ -1,9 +1,9 @@ # Note: This message plans to move to geometry_msgs in the final implementation. -# The x/y position and (optional) rotation of the bounding box center. -geometry_msgs/Pose2D pose +# The 2D position (in pixels) and orientation of the bounding box origin. +geometry_msgs/Pose2D origin -# (Optional) The size of the bounding box surrounding the object. The center of -# the bounding box is the position of the pose. -float32 bbox_size_x -float32 bbox_size_y \ No newline at end of file +# The size (in pixels) of the bounding box surrounding the object relative +# to the pose of its origin +uint32 size_x +uint32 size_y diff --git a/msg/BoundingBox3D.msg b/msg/BoundingBox3D.msg index bc15b97..ed6a658 100644 --- a/msg/BoundingBox3D.msg +++ b/msg/BoundingBox3D.msg @@ -1,7 +1,8 @@ # Note: This message plans to move to geometry_msgs in the final implementation. -# position and rotation of the bounding box -geometry_msgs/Pose pose +# The 3D position and orientation of the bounding box origin +geometry_msgs/Pose origin -# size of the bounding box -geometry_msgs/Vector3 size \ No newline at end of file +# The size of the bounding box surrounding the object relative to the pose of +# its origin +geometry_msgs/Vector3 size diff --git a/msg/Detection2D.msg b/msg/Detection2D.msg index db58cdf..aa56c4e 100644 --- a/msg/Detection2D.msg +++ b/msg/Detection2D.msg @@ -7,7 +7,7 @@ Header header # Class probabilities -vision_msgs/ObjectHypothesis2D[] results +vision_msgs/ObjectHypothesisWithPose[] results # 2D bounding box surrounding the object. diff --git a/msg/Detection3D.msg b/msg/Detection3D.msg index 856666c..c36e288 100644 --- a/msg/Detection3D.msg +++ b/msg/Detection3D.msg @@ -8,7 +8,7 @@ Header header # Class probabilities. Does not have to include hypotheses for all possible # object ids, the scores for any ids not listed are assumed to be 0. -vision_msgs/ObjectHypothesis3D[] results +vision_msgs/ObjectHypothesisWithPose[] results # The 3D data that generated these results (i.e. region proposal cropped out of # the image). Not required for all detectors, so it may be empty. diff --git a/msg/ObjectHypothesis2D.msg b/msg/ObjectHypothesis2D.msg deleted file mode 100644 index 261efc7..0000000 --- a/msg/ObjectHypothesis2D.msg +++ /dev/null @@ -1,13 +0,0 @@ -# ID of element detected. -int64 id - -# The probability or confidence value of the detected element. Should be in the -# range 0-1. -float64 score - -# the 2D pose of the object hypothesis (rotation optional). This pose should be -# defined as the pose of some fixed reference point on the object, such as the -# geometric center of the bounding box or the center of mass of the object. -# Note that different classes predicted -# for the same input data may have different predicted 6D poses. -geometry_msgs/Pose2D pose \ No newline at end of file diff --git a/msg/ObjectHypothesis3D.msg b/msg/ObjectHypothesisWithPose.msg similarity index 100% rename from msg/ObjectHypothesis3D.msg rename to msg/ObjectHypothesisWithPose.msg