|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2025-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.3.0 |
| polygon_msgs | 1.3.0 |
| polygon_rviz_plugins | 1.3.0 |
| polygon_utils | 1.3.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2025-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.3.0 |
| polygon_msgs | 1.3.0 |
| polygon_rviz_plugins | 1.3.0 |
| polygon_utils | 1.3.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2025-10-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.3.0 |
| polygon_msgs | 1.3.0 |
| polygon_rviz_plugins | 1.3.0 |
| polygon_utils | 1.3.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection
CONTRIBUTING
|
polygon_ros repositorypolygon_demos polygon_msgs polygon_rviz_plugins polygon_utils |
ROS Distro
|
Repository Summary
| Checkout URI | https://github.com/MetroRobots/polygon_ros.git |
| VCS Type | git |
| VCS Version | kilted_and_prior |
| Last Updated | 2025-07-08 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
| Name | Version |
|---|---|
| polygon_demos | 1.2.0 |
| polygon_msgs | 1.2.0 |
| polygon_rviz_plugins | 1.2.0 |
| polygon_utils | 1.2.0 |
README
polygon_ros
Messages and libraries for operating on two dimensional polygons.

In the standard package geometry_msgs, Polygon.msg and PolygonStamped.msg are defined, but have three primary limitations.
- The
Polygonis defined byPoint32which usesfloat32limited precision to store the coordinates. - The point is also defined in three dimensions, leading to an often ignored Z coordinate.
- There is no support for complex polygons i.e. polygons with holes in them.
This led to the creation of the new messages defined in this package. This work is forked from the ROS 1 version of the robot_navigation.
Data Types
- The base datatype is
Point2D, which defines an x and a y coordinate, in 64 bit precision. - The
Polygon2Dtype defines a simple polygon with an ordered list ofPoint2Dthat are the vertices of the polygon. The first point is connected to the second, the second is connected to the third, and so on, and the last point is also connected to the first. -
Polygon2DStampedis a single simple polygon with a header. -
ComplexPolygon2Ddefines a complex polygon with one polygon that is the outer perimeter, and an arbitrary number of polygons that define the holes. -
Polygon2DCollectionis a list of simple polygons, all with the same frame. There is also an optional per-polygon colors field for display purposes. - Similarly,
ComplexPolygon2DCollectionis a list of complex polygons, also with a header, and an optional colors field.
Polygon Utils
The polygon_utils package provides a number of tools for working with polygon_msgs.
Conversions
Note that when converting from geometry_msgs to polygon_msgs, any information in the z coordinate is discarded.
to polygon_msgs
|
from polygon_msgs
|
|---|---|
Polygon2D polygon3Dto2D(geometry_msgs::Polygon) |
geometry_msgs::Polygon polygon2Dto3D(Polygon2D) |
Polygon2DStamped polygon3Dto2D(geometry_msgs::PolygonStamped) |
geometry_msgs::PolygonStamped polygon2Dto3D(Polygon2DStamped) |
Operations
-
equals- check if two polygons are equal -
movePolygonToPose- translate and rotate a polygon -
isInside- check if a point is inside a polygon -
triangulate- Decompose a polygon into a set of non-overlapping triangles using an open source implementation of the earcut algorithm
Python
There are also a few Python-based utility operations available.
-
polygon_utils.shapely_lib.pyprovides conversions from ROS messages to Shapely objects, enabling a large library of algorithms to be run. Note: Requiresshapelyto be installed viapip. -
polygon_utils.shortest_path.pyprovides methods for determining the shortest path around a collection of polygons. (also usesshapely_lib)
RViz Plugins
The existing rviz_default_plugins::PolygonDisplay draws only the outline of a given polygon, and cannot fill the polygon in with color. This package has five new RViz displays for polygon data:
-
polygon_rviz_plugins::Polygon3DDisplaywill displaygeometry_msgs/PolygonStampedmessages just likerviz_default_plugins::PolygonDisplayexcept it can fill in the polygon. -
polygon_rviz_plugins::PolygonDisplaydisplayspolygon_msgs/Polygon2DStampedmessages -
polygon_rviz_plugins::ComplexPolygonDisplaydisplayspolygon_msgs/ComplexPolygon2DStampedmessages -
polygon_rviz_plugins::PolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/Polygon2DCollectionmessages. -
polygon_rviz_plugins::ComplexPolygonsDisplay(note the S in PolygonS) will displaypolygon_msgs/ComplexPolygon2DCollectionmessages.
Each has three display modes, for displaying just the outline, just the filler, or both.
When displaying polygon collections, you have the option to display a single color, colors from the message, or a set of “unique” colors (limited to 54 colors).
The behavior is showcased by running ros2 launch polygon_demos polygons.launch.py. The results are also shown in the screenshot above.
- The blue star in the middle is a
Polygon2DStamped - The white star is a
geometry_msgs/PolygonStamped - The star burst around the white star is a
ComplexPolygon2DStamped - The ring of yellow stars is a
Polygon2DCollection - The rainbow-colored stars around the blue star are a
ComplexPolygon2DCollection