pointcloud_to_laserscan give me inf ranges

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

Kolohe113 gravatar image

updated 2018-11-04 01:24:42 -0500

gvdhoorn 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 imagePeteBlackerThe3rd ( 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 imagePeteBlackerThe3rd ( 2018-11-04 05:08:40 -0500 )edit

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

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