0
$\begingroup$

Rosanswers logo

I have an RPLidar and from its documentation, the laser can do 360 degrees. The thing is, I do not need full 360 degrees as some area will constantly block the laser sensors. So basically, I only need 180 degrees of front of the laser scan.

How can I modify it? Here is the RPLidar's angle information: image description

And from the source code, it uses the LaserScan sensorCallback function:

LINK

So if I put angle_min = 270, angle_max = 180, will it do the job? (I will put in Radiance, as it is required from the documentation).


Originally posted by stevemartin on ROS Answers with karma: 361 on 2018-12-15

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Changing the angle_min and angle_max values in the file you linked to will not achieve what you want. This message is used to describe the laser scan information being sent out from the sensor after it has already been collected. You can't use it to control how the scan is collected in the first place.

The RPLidar ROS node described here doesn't appear to let you control the FOV that the sensor returns depth readings for, also the sensor will spin at the same speed regardless. Therefore you may be able to achieve what you want using a laser filter nodelet instead.

The angle bounds filter lets you specify and angular range and returns only samples within this range, this will give you the scan information you want.

Hope this helps.


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-12-15

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by stevemartin on 2018-12-19:
Did you try to use it? For some reason, I am getting an error when I try to launch the file:

ERROR: cannot launch node of type [laser_filters/laser_scan_filters]: can't locate node [laser_scan_filters] in package [laser_filters]

Comment by stevemartin on 2018-12-19:
Any my launch file:

<launch>
  <node pkg="laser_filters" type="laser_scan_filters" output="screen" name="laser_scan">
    <rosparam command="load" file="$(find laser_filters)/launch/angle_filter.yaml" />
  </node>
</launch>
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.