-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from sloretz/sync_with_kinetic
Sync ros2 with master
- Loading branch information
Showing
15 changed files
with
117 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# ROS Vision Messages Proposal | ||
# ROS Vision Messages | ||
|
||
## Introduction | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,4 @@ namespace vision_msgs | |
} | ||
} | ||
|
||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
std_msgs/Header header | ||
vision_msgs/BoundingBox3D[] boxes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# Defines a 2D classification result. | ||
# | ||
# This result does not contain any position information. It is designed for | ||
# classifiers, which simply provide class probabilities given a source image. | ||
# classifiers, which simply provide class probabilities given a source image. | ||
|
||
std_msgs/Header header | ||
|
||
# A list of class probabilities. This list need not provide a probability for | ||
# every possible class, just ones that are nonzero, or above some user-defined | ||
# every possible class, just ones that are nonzero, or above some | ||
# user-defined threshold. | ||
ObjectHypothesis[] results | ||
|
||
# The 2D data that generated these results (i.e. region proposal cropped out of | ||
# the image). Not required for all use cases, so it may be empty. | ||
# the image). Not required for all use cases, so it may be empty. | ||
sensor_msgs/Image source_img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# Defines a 3D classification result. | ||
# | ||
# This result does not contain any position information. It is designed for | ||
# classifiers, which simply provide probabilities given a source image. | ||
# classifiers, which simply provide probabilities given a source image. | ||
|
||
std_msgs/Header header | ||
|
||
# Class probabilities | ||
ObjectHypothesis[] 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. | ||
# the image). Not required for all detectors, so it may be empty. | ||
sensor_msgs/PointCloud2 source_cloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
# An object hypothesis that contains position information. | ||
|
||
# The unique numeric ID of object detected. To get additional information about | ||
# this ID, such as its human-readable name, listeners should perform a lookup | ||
# in a metadata database. See vision_msgs/VisionInfo.msg for more detail. | ||
int64 id | ||
# The unique ID of the object class. To get additional information about | ||
# this ID, such as its human-readable class name, listeners should perform a | ||
# lookup in a metadata database. See vision_msgs/VisionInfo.msg for more detail. | ||
string id | ||
|
||
# The probability or confidence value of the detected object. By convention, | ||
# this value should lie in the range [0-1]. | ||
float64 score | ||
|
||
# the 6D pose of the object hypothesis. 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 this pose is not stamped; frame information can be defined by parent | ||
# messages. | ||
# Also note that different classes predicted | ||
# for the same input data may have different predicted 6D poses. | ||
geometry_msgs/Pose pose | ||
# The 6D pose of the object hypothesis. This pose should be | ||
# defined as the pose of some fixed reference point on the object, such a | ||
# the geometric center of the bounding box or the center of mass of the | ||
# object. | ||
# Note that this pose is not stamped; frame information can be defined by | ||
# parent messages. | ||
# Also note that different classes predicted for the same input data may have | ||
# different predicted 6D poses. | ||
geometry_msgs/PoseWithCovariance pose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2017 Open Source Robotics Foundation, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include <gtest/gtest.h> | ||
|
||
#include "vision_msgs/msg/bounding_box2_d.hpp" | ||
#include "vision_msgs/msg/bounding_box3_d.hpp" | ||
#include "vision_msgs/create_aabb.h" | ||
|
||
TEST(vision_msgs, CreateAABB2D) | ||
{ | ||
vision_msgs::msg::BoundingBox2D bbox = vision_msgs::createAABB2D(1,2,3,4); | ||
EXPECT_FLOAT_EQ(bbox.center.x, 2.5); // 1 + 3/2 | ||
EXPECT_FLOAT_EQ(bbox.center.y, 4); // 2 + 4/2 | ||
EXPECT_EQ(bbox.size_x, 3); | ||
EXPECT_EQ(bbox.size_y, 4); | ||
EXPECT_EQ(bbox.center.theta, 0); | ||
} | ||
|
||
TEST(vision_msgs, CreateAABB3D) | ||
{ | ||
vision_msgs::msg::BoundingBox3D bbox = vision_msgs::createAABB3D(1,2,3,4,5,6); | ||
EXPECT_FLOAT_EQ(bbox.center.position.x, 3); // 1 + 4/2 | ||
EXPECT_FLOAT_EQ(bbox.center.position.y, 4.5); // 2 + 5/2 | ||
EXPECT_FLOAT_EQ(bbox.center.position.z, 6); // 3 + 6/2 | ||
EXPECT_EQ(bbox.center.orientation.x, 0); | ||
EXPECT_EQ(bbox.center.orientation.y, 0); | ||
EXPECT_EQ(bbox.center.orientation.z, 0); | ||
EXPECT_EQ(bbox.center.orientation.w, 1); | ||
EXPECT_EQ(bbox.size.x, 4); | ||
EXPECT_EQ(bbox.size.y, 5); | ||
EXPECT_EQ(bbox.size.z, 6); | ||
} |