PepperlFuchs / pf_lidar_ros_driver

ROS driver for Pepperl+Fuchs R2000 and R2300 laser scanners
https://www.pepperl-fuchs.com/global/en/23097.htm
Apache License 2.0
39 stars 38 forks source link

How to configure angular fov for r2000? #88

Closed BIRL-xu closed 2 years ago

BIRL-xu commented 2 years ago

I can connect to r2000 normally, but I want to specify a angular fov, e.g. 180 degrees. I set the start_angle to -1.57, the topic echo shows the angle_min is -1.57, but angle_max is 4.71(2PI-start_angle).

ptruka commented 2 years ago

To set a sector you need to edit the r2000_params.yaml (in pf_driver/config).

  1. Set your desired start angle in degrees and multiply it with 10000.

Example

The default is -180° start_angle = -1800000

  1. To set the size of your sector you need to configure the parameter max_num_points_scan of the same .yaml file. Take a look on the parameter samples_per_scan of your scanner. Divide it by 360° degrees and multiply it with your desired sector size in degrees. Set max_num_points_scan to the calculated value.

Example

scanner is configured to samples_per_scan: 3600 desired sector size: 90° max_num_points_scan = 3600 / 360° * 90°= 900

More details can be found on page 30 of the ethernet protocol document: https://files.pepperl-fuchs.com/webcat/navi/productInfo/doct/doct3469f.pdf

hsd-dev commented 2 years ago

I think we can close this issue. @BIRL-xu please feel free to reopen if your question isn't answered.