Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set maximum and minimum angles in sick_picoscan.launch driver #452

Open
hoon0309 opened this issue Feb 25, 2025 · 6 comments
Open

Comments

@hoon0309
Copy link

I'm currently using picoscan 150 lidar. I've tried to build to version github 3.6.0. I'm using the file 'sick_picoscan.launch'. I tried changing several parameters, but 'fullframe_scan' on rviz was only scanning the same area. I'd like to know if there's a way to set the scan angle of lidar in the launch file or on another code.

Image
@rostest
Copy link
Collaborator

rostest commented Feb 25, 2025

Please try to modify the following settings in your sick_picoscan.launch like the following example:

    host_LFPangleRangeFilter = "1 -30.0 +40.0 -90.0 +90.0 1"; // Optionally set LFPangleRangeFilter to "<enabled> <azimuth_start> <azimuth_stop> <elevation_start> <elevation_stop> <beam_increment>" with azimuth and elevation given in degree
    host_set_LFPangleRangeFilter = true;                       // If true, LFPangleRangeFilter is set at startup (default: false)

This should allow filtering to an azimuth angle in the range [-30 deg, 40 deg]. Please modify as needed.

@hoon0309
Copy link
Author

Thank you. I confirmed that it is the way you answered. However, when I set and executed as below in the launch file, there was no problem with angle_min value, but there was a problem with angle_max value of 160 degrees. Can you tell me what the problem is? I attached the picture as below.

Image
Image

@weinmalSICKAG
Copy link
Collaborator

Please note that the picoScan has field of view of 276 °. Thus angle_min cannot be lower than -138° and angle_max cannot be larger than 138°. Does this explain your problem?
Also, the angle_min and angle_max that you can see in the lower screenshot are in radians. The angles that you configured in the .launch file are in degrees.

@hoon0309
Copy link
Author

hoon0309 commented Feb 26, 2025

Yes. Of course, I know that the value is radian, and I know that the maximum scan range is -138-138 degrees. That's why I asked you if there are cases where the scan range is out of the maximum value because when converting 2.821668 to degree, it comes out 161.66966759 degrees.

Image

@rostest
Copy link
Collaborator

rostest commented Feb 26, 2025

First of all, we are pleased that you were able to make the adjustment. The reported angle difference between max_ang and min_ang is almost exactly 300 degrees. We will see if this is possibly due to the fact that a total of 10 segments of 30 degrees each are used to generate the output of the scan.

Image

The drawing is taken from the document https://cdn.sick.com/media/docs/1/91/691/operating_instructions_picoscan150_2d_lidar_sensors_en_im0106691.pdf and shows that data from a total of 10 segments is used in this cycle. We will investigate whether the behavior you mentioned is possibly related to this. Since “min_ang” and “angle_increment” are suitable, you can use them to determine the angle values according to min_ang + index * angle_increment without any problems.

BTW: angle_increment 0.005817905534058809 rad is 0.3333 deg

@weinmalSICKAG
Copy link
Collaborator

That was my oversight. You are right the angle_may is greater than what one would expect.
The reason for this is a bit involved. The picoScan sends the data for one full rotation in multiple segments. Each segments contains the same amunt of data. Depending on the preformance profile the segments cover either 30° or 60°. Lets assume that a performance profile is chosen that results in 60° segments. To cover the 276° FOV five 60° segments are required. The first segments starts at -138°. Thus the fifth segment starts at 102° (102°=-136° + 4*60°). The fifth segment ends at 162° which is what you see in the screenshots you postet. Since the fifth segment overlaps with the blindspot at the back of the picoScan, the data is padded with zeros to make the segment cover 60°.
The screenshot below shows this behaviour.
Image
The driver collects these segments and provides a topic with the data of a full rotation. To filter out points with distance zero configure the rangeFilter in the .launch file.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants