Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to convert LaserScanner msgs to 2D cartesian cooridnates?

I'm trying to convert LaserScanner msgs to 2D vector(cartesian coordinates,(X,Y) pair) in C++ without using any library.Main problem is that I'm using a formula X=rcos(phi) and Y=rsin(phi),and if ranges[i] is r,how can I find phi?