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 2018-11-04 00:13:19 -0500

Kolohe113 gravatar image

updated 2022-04-30 13:45:51 -0500

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.

edit retag flag offensive close merge delete

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?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-11-04 04:40:44 -0500 )edit

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-11-04 05:08:40 -0500 )edit

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

Kolohe113 gravatar image Kolohe113  ( 2018-11-04 19:56:27 -0500 )edit

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

Ajay gravatar image Ajay  ( 2020-06-16 23:58:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-17 22:54:19 -0500

_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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-11-04 00:13:19 -0500

Seen: 761 times

Last updated: Apr 17 '22