laser_filter not working

asked 2022-01-21 18:12:17 -0600

distro gravatar image

updated 2022-01-21 18:15:37 -0600

I tries using the laser_filter package to fix my LiDAR scanner issues as seen here. The package doesnt seem to work at all, I run my launch file and my issues aren't fixed. Maybe I'm not doing it right?Perhaps my parameters are off? Here are my yaml and launch file below.

yaml file:

scan_filter_chain:
- type: laser_filters/LaserArrayFilter
  name: laser_median_filter
  params:
    range_filter_chain:
      - name: median_5
        type: filters/MultiChannelMedianFilterFloat
        params:
          number_of_observations: 5
          unused: 10
    intensity_filter_chain:
      - name: median_5
        type: filters/MultiChannelMedianFilterFloat
        params:
          number_of_observations: 5
          unused: 10

- name: interpolation
  type: laser_filters/InterpolationFilter

- name: shadows
  type: laser_filters/ScanShadowsFilter
  params:
    min_angle: 10
    max_angle: 170
    neighbors: 20
    window: 1

- name: dark_shadows
  type: laser_filters/LaserScanIntensityFilter
  params:
    lower_threshold: 45000  #100
    upper_threshold: 50000  #10000
    disp_histogram: 0

- name: box
  type: laser_filters/LaserScanBoxFilter
  params:
    box_frame: scan_link
    min_x: -1.0
    max_x: 1.0
    min_y: -1.0
    max_y: 1.0
    min_z: -1.0
    max_z: 1.0

- name: speckle_filter
  type: laser_filters/LaserScanSpeckleFilter
  params:
    filter_type: 0
    max_range: 2.0
    max_range_difference: 0.1
    filter_window: 2

launch file:

<launch>
  <node pkg="laser_filters" type="scan_to_scan_filter_chain"
      name="laser_filter">
    <rosparam command="load" file="$(find test)/my_laser_config.yaml" />
    <remap from="scan" to="base_scan" />
  </node>
</launch>
edit retag flag offensive close merge delete

Comments

Do you see anything from rostopic echo scan or rostopic echo base_scan?

EricW gravatar image EricW  ( 2022-01-23 11:20:08 -0600 )edit

@EricW There is nothing being published to base_scan. stuff is being published to scan. I guess if remove the <remap from="scan" to="base_scan" /> so that the filter actually publishes to scan, will that work?

distro gravatar image distro  ( 2022-01-25 13:54:26 -0600 )edit