ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to change the array size of LaserScan?

asked 2021-09-17 09:45:09 -0500

mustang77 gravatar image

updated 2021-09-17 12:26:23 -0500

Mike Scheutzow gravatar image

I am using two Lidars for a 360 view that combine to be a default array size of 1080.

When I switch over to one lidar for parking, my array size drops to 810.

It seems that there is no way to change this value.

Each index represents a degree. 540 of 1080 is straight but 405 of 810 is to the left.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-17 10:44:35 -0500

Mike Scheutzow gravatar image

updated 2021-09-17 12:30:10 -0500

The length of the ranges array in the LaserScan message varies depending on how the Lidar device is configured, so the step increment might not be 1 degree. Subscribers must check the angle_increment field in the message to learn what it is they have received. Note that this field is always in radians.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-09-17 09:45:09 -0500

Seen: 126 times

Last updated: Sep 17 '21