0
$\begingroup$

Rosanswers logo

Hi all,

I have a hokuyo laser sensor and I am using hokuyo_node to get the Laser Scan. Then, I am using LaserScanRangeFilter to filter out the readings to get max_range + 1 in cases where the hokuyo_node gives inf reading. The problem is instead of getting max_range + 1, I get nan readings for all the previous inf readings after running the filter. The launch file:

<launch>
    <node pkg="hokuyo_node" type="hokuyo_node" name="Laser_node" output="screen">
        <param name="port" value="/dev/ttyACM1"/>
        <param name="angle_min" value="-1.5707963"/>
        <param name="angle_max" value="1.5707963"/>
    </node>
    <node pkg="laser_filters" type="scan_to_scan_filter_chain" name="laser_filter">
            <rosparam command="load" file="$(find starter_node)/move_base_config/hokuyo_config.yaml" /> 
        <remap from="base_scan" to="scan" />
        </node>
</launch>

hokuyo_config.yaml

scan_filter_chain:
- name: range
  type: LaserScanRangeFilter
  params:
    lower_threshold: 0.02
    upper_threshold: 10

The output of rosparam list:

/Laser_node/allow_unsafe_settings
/Laser_node/angle_max
/Laser_node/angle_min
/Laser_node/calibrate_time
/Laser_node/cluster
/Laser_node/frame_id
/Laser_node/intensity
/Laser_node/max_ang
/Laser_node/max_ang_limit
/Laser_node/max_range
/Laser_node/min_ang
/Laser_node/min_ang_limit
/Laser_node/min_range
/Laser_node/port
/Laser_node/skip
/Laser_node/time_offset
/laser_filter/scan_filter_chain
/rosdistro
/roslaunch/uris/host_namankumar_inspiron_5521__45829
/rosversion
/run_id

I am not able to figure out what is causing it. Does anyone has any idea about how to solve this issue?

Thanks in advance.
Naman Kumar


Originally posted by Naman on ROS Answers with karma: 1464 on 2015-05-11

Post score: 1


Original comments

Comment by hubble on 2015-06-16:
Hi ! I have the same issue as you... Have you found the solution ? Thanks a lot !!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You have to add the lower_replacement_value and upper_replacement_value. Else they are taken as NaN by default.


Originally posted by harsha336 with karma: 26 on 2018-04-05

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.