ros-perception / laser_filters

Assorted filters designed to operate on 2D planar laser scanners, which use the sensor_msgs/LaserScan type.
BSD 3-Clause "New" or "Revised" License
175 stars 206 forks source link

LaserScanAngularBoundsFilter not working #178

Open hilmi-ica opened 1 year ago

hilmi-ica commented 1 year ago

Hey guys! I am trying to bound the angle of my lidar SICK NAV310 using laser_filters. Here's my launch file:

<launch>
<node pkg="laser_filters" type="scan_to_scan_filter_chain" output="screen" name="laser_filter">
      <!-- <remap from="scan" to="base_scan" /> -->
      <remap from="scan" to="/sick_nav_3xx/scan" />
      <rosparam command="load" file="$(find laser_filters)/examples/angle_filter_example.yaml" />
</node>
</launch>

and my yaml file:

scan_filter_chain:
- name: angle
  type: laser_filters/LaserScanAngularBoundsFilter
  # type: laser_filters/LaserScanAngularBoundsFilterInPlace
  params:
    lower_angle: -1.5708
    upper_angle: 1.5708

Using the LaserScanAngularBoundsFilter plugin it results in:

rostopic echo -n 1 /scan_filtered
header: 
  seq: 23
  stamp: 
    secs: 1680337311
    nsecs: 850266218
  frame_id: "cloud"
angle_min: -3.1415927410125732
angle_max: -3.1415927410125732
angle_increment: -0.004363323096185923
time_increment: 8.695651922607794e-05
scan_time: 0.125
range_min: 0.0
range_max: 100.0
ranges: [2.4720001220703125]
intensities: [0.0]
---

And using LaserScanAngularBoundsFilterInPlace results in:

rostopic echo -n 1 /scan_filtered
header: 
  seq: 88
  stamp: 
    secs: 1680337217
    nsecs: 659402847
  frame_id: "cloud"
angle_min: -3.1415927410125732
angle_max: 3.1415927410125732
angle_increment: -0.004363323096185923
time_increment: 8.695651922607794e-05
scan_time: 0.125
range_min: 0.0
range_max: 100.0
ranges: [2.4800000190734863, 2.4720001220703125, .....

Which didn't filter the LaserScan. I'm using ROS Noetice distribution. Hope anyone can help! Thanks!

adamkrawczyk commented 10 months ago

the same for humble