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
161 stars 199 forks source link

Scan_to_cloud_filter_chain not working in ros foxy #110

Open AliaChe opened 3 years ago

AliaChe commented 3 years ago

Hi again,

I managed to test all filters in the scan_to_scan_filter_chain. However, the scan_to_cloud_filter_chain is not working. I'm using the same config as described in the wikihttp://wiki.ros.org/laser_filters:

$ cat params.yaml:

scan_to_cloud_filter_chain:
  ros__parameters:
    scan_filter_chain:
      filter1:
      name: scan_range
      type: laser_filters/LaserScanRangeFilter
      params:
        use_message_range_limits: false   # if not specified defaults to false
        lower_threshold: 0.5              # if not specified defaults to 0.0
        upper_threshold: 10.0              # if not specified defaults to 100000.0
        lower_replacement_value: -.inf    # if not specified defaults to NaN
        upper_replacement_value: .inf     # if not specified defaults to NaN
      tf_message_filter_target_frame: world
    cloud_filter_chain: 
      filter1:
        type: laser_filters/PointCloudFootprintFilter
        name: footprint_filter
        params:
          inscribed_radius: 0.325
    target_frame: world
    high_fidelity: true

However, I got an error when the params.yaml got parsed :

[scan_to_cloud_filter_chain-13] [ERROR] [1615891443.085968415] [rcl]: Failed to parse global arguments
[scan_to_cloud_filter_chain-13] terminate called after throwing an instance of 'rclcpp::exceptions::RCLInvalidROSArgsError'
[scan_to_cloud_filter_chain-13]   what():  failed to initialize rcl: Couldn't parse params file: '--params-file /home/blackdrones/blackdrones_ws/install/blackdrones_control/share/blackdrones_control/config/params.yaml'. Error: No value at line 9, at /tmp/binarydeb/ros-foxy-rcl-yaml-param-parser-1.1.10/src/parse.c:204, at /tmp/binarydeb/ros-foxy-rcl-1.1.10/src/rcl/arguments.c:388

Does anyone get this to work? Any ideas?

Thank you!

NikolasE commented 2 years ago

Is it possible that it's only the missing indentation after "filter1:"?