First time here? Check out the FAQ!


ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

pointcloud_to_laserscan give me inf ranges

asked Nov 4 '18

Kolohe113 gravatar image

updated Apr 30 '22

lucasw gravatar image

Hi! I am trying to convert pointcloud2 messages to laserscan messages using the package pointcloud_to_laserscan. The pointcloud2 message was published by a node called laser_ortho_projector, a package that can take in scan data and imu data and publish the projected pointcloud2 in the base_ortho frame. Going back to pointcloud_to_laserscan, when I run

rosrun pointcloud_to_laserscan pointcloud_to_laserscan_node cloud_in:=/cloud_ortho

and

run rostopic echo /newscan

I am getting:

header: 
  seq: 4
  stamp: 
    secs: 1541308093
    nsecs: 944408000
  frame_id: "base_ortho"
angle_min: -3.14159274101
angle_max: 3.14159274101
angle_increment: 0.0174532923847
time_increment: 0.0
scan_time: 0.0333333350718
range_min: 0.0
range_max: inf
ranges: [inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, 

inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf]
intensities: []

My OS is Ubuntu 16.04 and my ROS version is Kinetic. I have been stuck for so long. Any help will be appreciated. Thank you.

Preview: (hide)

Comments

My first guess would be that the input point cloud is not intersecting with the plane of the laser scanner you're trying to simulate. Have you visualised everything in RVIZ to make sure the location of the point cloud and the laser scanner are correct?

The default range_max value for the pointcloud_to_laserscan is 4 metres, so if your point cloud is further away than this then the laser scan will contain all max values, so you might want to increase this parameter too.

From range_max: inf, it seems like the range is inf.

Kolohe113 gravatar image Kolohe113  ( Nov 5 '18 )edit

@Kolohe113 Have you fixed this issue? could you please share solution.

Ajay gravatar image Ajay  ( Jun 17 '20 )edit

1 Answer

Sort by » oldest newest most voted
0

answered Apr 18 '22

_andrei_ gravatar image

At first, one who has this issue needs to change the log level of pointcloud_to_laserscan node to DEBUG. For example with rqt_logger_level tool.

After this, logs show the reason of rejected (inf) points.

In my case, min_height parameter was 0.0, so all points below this value were rejected. So setting the parameter to a negative value solved it.

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Nov 4 '18

Seen: 1,034 times

Last updated: Apr 17 '22