I'm pretty new to ROS but I was manipulating a custom message that was made up of geometry_msgs/Point
and geometry_msgs/Vector3
messages. When I printed out the message I noticed that both the Point
and the Vector3
had the same 3 attributes (x
, y
, and z
) and this made me curious because it seemed redundant... right?
Upon further digging in the source code, it turns out the Point
and the Vector3
are exactly the same. They're both composed of a float x
, float y
, and a float z
.
But after reading the docs, it seems like there IS a difference between these two messages. The docs mention that a Point should be used if the user wants to apply a translation whereas a Vector3 should be used to only represent a direction (and magnitude I guess?).
Since the two messages are defined exactly the same, I reckon if I could apply a translation to a Point
I could also apply a translation to the Vector3
. Is there a difference I'm not seeing between the Point
and Vector3
that isn't their name?