PointCloudLibrary / PointCloudLibrary/pcl

[io] HDL Grabber gets stuck while deinitializing if the connection is lost

Open
#4,094 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind: bug module: io needs: testing
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Bug description

If the connection to the Velodyne LiDAR is lost, like when the cable is disconnected. The HDLGrabber gets stuck if I try to deinitialize and destruct the object.

Context

I want to be able to manage the situation in which a sensor of my system fails, either because it broke or the connection was lost. So I always test the programs even if the device is not connected or if the connection is lost in the middle of the process.

In this case with the HDL-32E using the PCL HDLGrabber, I am not able to safely stop my program if the connection is lost. I am forced to kill the process manually.

Expected behavior

If the sensor is not connected the HDLGrabber should be able to correctly be deinitialized

Current Behavior

The program gets stuck if I try to stop the grabber when the sensor is not connected

To Reproduce

I manage to reproduce the bug with a minimal example. I tried it in several PC's and the problem persists.

Outputs
These are the two scenarios I tested with their output in the terminal:

  • The Velodyne is connected during all the process
username@pcname:~$ ./simpleHDL
Constructor
Start Grabber
Loop End - Start Disconnection
Disconnected
username@pcname:~$ |
  • The Velodyne is disconnected during the process (In the for loop) and it gets stuck when the grabber tries to be stopped.
username@pcname:~$ ./simpleHDL
Constructor
Start Grabber
Loop End - Start Disconnection
|

Environment

  • OS: Ubuntu 18.04
  • Compiler: GCC 7.5.0
  • PCL Version: 1.9.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached simpleHDLGrabber.zip minimal example and the HDLGrabber lifecycle, reproducing the case where the Velodyne connection is lost during the loop. Trace the stop and destruction path and verify that deinitialization completes without hanging when the sensor is disconnected.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.