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

How can I modify the Laser angle scan?

asked 2018-12-15 06:34:20 -0600

stevemartin gravatar image

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).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2018-12-15 06:44:50 -0600

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.

edit flag offensive delete link more

Comments

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]
stevemartin gravatar image stevemartin  ( 2018-12-19 09:01:05 -0600 )edit

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>
stevemartin gravatar image stevemartin  ( 2018-12-19 09:01:24 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-12-15 06:34:20 -0600

Seen: 4,641 times

Last updated: Dec 15 '18