Laserscan ray and angle [closed]

asked 2021-01-14 19:06:42 -0500

Usui gravatar image

updated 2021-01-15 01:30:45 -0500

gvdhoorn gravatar image

I am trying to do obstacle avoidance with 2d laserscan from scratch. So I use urg_node for a laserscan sensor. In the float32[] ranges array in the laserscan.msg, it contains distance information. I am wondering how does it determine the size of the array. Also for each ray what angle would it be?

I found that if I set max and minx angle to + and - 2.09234976768, the size would be 683 (I did it by just printing ranges[i] until I get a ranges[i] = 0 because for some reason when I tried sizeof(msg->range), it gave 24 which is definitely not the size).

I don't get how in rviz they are able to figure the angle and the where the laser dot would be. Anyone know?


Edit: I found answer: #q198843.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by gvdhoorn
close date 2021-01-15 01:31:03.858643