ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

geometry_msgs/Vector2 ?

asked 2016-11-21 12:00:48 -0500

antonio gravatar image

Is there an extension of geometry_msgs including 2D types, such as geometry_msgs/Vector2? I don't seem to find such a package on Github, for example.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-11-21 13:04:39 -0500

gvdhoorn gravatar image

If you're looking to store 2D positions or poses, perhaps the Point or Pose2D types in geometry_msgs could work?

For Point, just ignore the z member. If you don't care about orientation, ignore theta in Pose2D.

edit flag offensive delete link more

Comments

Right; my concern was mostly about keeping the message type semantically consistent with the content; but of course we can reuse Point for 2D.

antonio gravatar image antonio  ( 2016-11-23 06:28:12 -0500 )edit

Well, I guess it's a bit of a point for discussion, but using Pose2D for this seems like a good fit: it encodes a position in a 2D space, with an associated orientation.

You could consider submitting a PR that adds a Vector2 (or maybe Point2D) to geometry_msgs though.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-24 00:56:28 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-11-21 12:00:48 -0500

Seen: 3,213 times

Last updated: Nov 21 '16