how to convert point cloud to map
hey i m new to ros and currently working on building my own mapping algorithm i converted laserscan value to point cloud by using the range values as :
x-coordinate = range *cos (angle)
y-coordinate = range *sin (angle)
current angle or orientation = tan(y-coordinate/x-coordinate)
am i doing it right ?
if yes how to print it in rviz as in pointcloudmsgs
and also how to use scan matching further