Skip to content

Out of range become nan instead of inf. #61

@TeerapongPoom

Description

@TeerapongPoom

I read in the wiki https://wiki.ros.org/depthimage_to_laserscan and it says ranges less than range_min will be output as -Inf and +Inf for range_max.
When I try with range_min=0.3 and range_max=4.0, all values not in range become nan. Here is message from rostopic echo https://drive.google.com/file/d/1YSh61ATBp4Xuy6y_YcDfNicW1LBbvW1E/view?usp=sharing

But this is the result after I increase range_max to range_max=10.0
https://drive.google.com/file/d/1Vnczgholi2ksoAOVkHGeTYrr4JSMgLlA/view?usp=sharing

My sensor is realsense d455 and depth image encoding is 16UC1.
ROS distro in noetic. This is how i call node in launch file.

<node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
  <remap from="image"       to="/camera/depth/image_rect_raw"/>
  <remap from="camera_info" to="/camera/depth/camera_info"/>
  <remap from="scan"        to="/depth_scan"/>
  <param name="range_max" type="double" value="4.0"/>
  <param name="range_min" type="double" value="0.3"/>
  <param name="output_frame_id" type="string" value="camera_link"/>
</node>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions