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

Wrong default replacement values #172

Open borongyuan opened 1 year ago

borongyuan commented 1 year ago

Hi, I found the default value of lower_replacement_value and upper_replacement_value in LaserScanRangeFilter is 0, not NaN. This is caused by the implementation of getParam().

bool getParam(const std::string & name, double & value)
  {
    return getParamImpl(name, rcl_interfaces::msg::ParameterType::PARAMETER_DOUBLE, 0.0, value);
  }

This may also affect other filters.