ros-perception / pointcloud_to_laserscan

Converts a 3D Point Cloud into a 2D laser scan.
http://wiki.ros.org/pointcloud_to_laserscan
BSD 3-Clause "New" or "Revised" License
403 stars 273 forks source link

Scan stops publishing after a few seconds #62

Open roni-kreinin opened 2 years ago

roni-kreinin commented 2 years ago

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'
        )
hidmic commented 2 years ago

@roni-kreinin a minimal yet complete example to reproduce your issue would help greatly. Loop playback of a bagfile would do.

rsc9421 commented 1 year ago

I have the same issue

mspringer1 commented 1 month ago

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.