pointcloud_to_laserscan give me inf ranges
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.
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 Have you fixed this issue? could you please share solution.