Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If it is really simple (like your example): Do it by hand, i.e. hypot(p1.x - p2.x,...).

If it is a little more advanced, or you might do more than 1 simple calculation: Convert the messages (which are just 'dumb' containers for data) to their respective tf data types. There are conversion functions like tf::pointMsgToTF for converting forth and back. The tf data types have all the geometry operations you'd expect for linear math.