Scan stops publishing after a few seconds
I am having an issue where the node seems to stop publishing the scan a few seconds after it starts. The scan is published properly for the first few seconds and I can see it in rviz, but after maybe 5 seconds it stops. I am using ROS2 Galactic with the foxy branch of this repo.
Here is the node in the launch file:
Node(
package='pointcloud_to_laserscan', executable='pointcloud_to_laserscan_node',
remappings=[('cloud_in', '/camera/depth/points'),
('scan', '/scan')],
parameters=[{
'min_height': 0.0,
'max_height': 1.0,
'angle_min': -1.5708, # -M_PI/2
'angle_max': 1.5708, # M_PI/2
'angle_increment': 0.0087, # M_PI/360.0
'scan_time': 0.3333,
'range_min': 0.3,
'range_max': 10.0,
'use_inf': True,
'inf_epsilon': 1.0
}],
name='pointcloud_to_laserscan'
)
@roni-kreinin a minimal yet complete example to reproduce your issue would help greatly. Loop playback of a bagfile would do.
I have the same issue
I have the same problem under Foxy. I think this happens when a new subscriber is added to the output scan topic, so I will start pointcloud_to_laserscan as the last node as a workaround for now.