Ask Your Question
0

geometry_msgs/Vector2 ?

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

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
1

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

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 imageantonio ( 2016-11-23 06:28:12 -0600 )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 imagegvdhoorn ( 2016-11-24 00:56:28 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 927 times

Last updated: Nov 21 '16