Skip to content

Commit

Permalink
Backport: Adding cone primitives. (#442)
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Perseghetti <[email protected]>
  • Loading branch information
bperseghetti authored and azeey committed Jun 18, 2024
1 parent 876b89d commit dd20923
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/include/gz/msgs/convert/GeometryType.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ inline msgs::Geometry::Type ConvertGeometryType(const std::string &_str)
{
result = msgs::Geometry::CAPSULE;
}
else if (_str == "cone")
{
result = msgs::Geometry::CONE;
}
else if (_str == "cylinder")
{
result = msgs::Geometry::CYLINDER;
Expand Down Expand Up @@ -98,6 +102,11 @@ inline std::string ConvertGeometryType(const msgs::Geometry::Type _type)
result = "capsule";
break;
}
case msgs::Geometry::CONE:
{
result = "cone";
break;
}
case msgs::Geometry::CYLINDER:
{
result = "cylinder";
Expand Down
1 change: 1 addition & 0 deletions test/integration/Utility_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ TEST(MsgsTest, ConvertMsgsGeometryTypeToString)
CompareMsgsGeometryTypeToString(msgs::Geometry::BOX);
CompareMsgsGeometryTypeToString(msgs::Geometry::SPHERE);
CompareMsgsGeometryTypeToString(msgs::Geometry::CAPSULE);
CompareMsgsGeometryTypeToString(msgs::Geometry::CONE);
CompareMsgsGeometryTypeToString(msgs::Geometry::CYLINDER);
CompareMsgsGeometryTypeToString(msgs::Geometry::ELLIPSOID);
CompareMsgsGeometryTypeToString(msgs::Geometry::PLANE);
Expand Down

0 comments on commit dd20923

Please sign in to comment.