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 -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
2

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 image antonio  ( 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 image gvdhoorn  ( 2016-11-24 00:56:28 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 3,506 times

Last updated: Nov 21 '16