(Shapely.geometry.Polygon to geometry_msgs.PolygonStamped) Shapely polygon representation in RViz

asked 2019-04-26 00:41:02 -0500

RalLpezMartn gravatar image

I am working with a polygon done with Shapely and I want to represent it on RViz. Until now I've been using geometry_msg.PolygonStamped to plot all the polygons. Is there a easy way to transform from shapely.geometry.Polygon to geometry_msgs.PolygonStamped? If not, how can I get the points from the boundary of the Polygon in shapely? I've tried with polygon.xy (NotImplementedError) and polygon.exterior.coords.xy (several exterior attribute not defined, sometimes it work), any other way I can get those points from?

Thank you in advance!

edit retag flag offensive close merge delete