Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better PicoScan lidars support #256

Closed
paulinelvne opened this issue Jan 8, 2024 · 7 comments
Closed

Better PicoScan lidars support #256

paulinelvne opened this issue Jan 8, 2024 · 7 comments

Comments

@paulinelvne
Copy link

We are in the process of integrating the new PicoScan sensors through this library and we did encounter a few issues.

Performance Profile parameter

We had to modify the library to be able to change the "performance profile" parameter of the lidar. We only partially succeeded as we are only able to change to profiles from 0 to 9, and not to 10. See the pull request we did here.

Example crashing when deregistering the library

The picoScan cannot stop properly because an issue occurs when calling one of the following 3 functions at the end of the sick_scan_xd_api_test example :

  • SickScanApiClose
  • SickScanApiRelease
  • SickScanApiUnloadLibrary

For now, we haven't found a way to fix this issue.

@rostest
Copy link
Collaborator

rostest commented Jan 8, 2024

Thanks for your feedback. We will discuss support of Profiling Systems with SICK.
For a clean API exit by SickScanApiClose, please checkout branch https://github.com/SICKAG/sick_scan_xd/tree/feature/api_exit and rebuild.

@paulinelvne
Copy link
Author

We still have a problem with the SickScanApiClose function. When it's called in the sick_scan_xd_api_test example, the function is never exited, so the rest, such as SickScanApiRelease, is never called (tested with breakpoints).

We've noticed that the s_scanner variable is not allocated for picoscans (in sick_generic_laser.cpp file at lines 437-439) and when stopScannerAndExit(bool force_immediate_shutdown) is called in sick_generix_laser.cpp, it never goes through s_scanner->stopScanData(force_immediate_shutdown).
We then get the impression that we're stuck at the _Thrd_join(_Thr, nullptr) level in the thread file. This may be because the scanner never stops due to s_scanner = nullptr.

Any ideas?
Thank you in advance for your time.

@rostest
Copy link
Collaborator

rostest commented Jan 16, 2024

Many thanks for following up! The previous fix was incomplete. Please use the updated version in branch https://github.com/SICKAG/sick_scan_xd/tree/feature/api_exit and rebuild. Note that this version is collected update with several changes incl. cleanup at API exit.

@paulinelvne
Copy link
Author

The problem under Windows for picoScan doesn't seem to have been solved.
We've noticed that when calling udp_receiver->Close() (line 395 of the scansegment_thread.cpp file), the function gets stuck at m_receiver_thread->join() (line 169 of the udp_receiver file). In fact, the thread doesn't seem to stop and remains blocked on a data reception operation (line 200 in the udp_socket.h file), as the data reception cannot take place because the connection is breaking.

Thank you for taking the time to answer our questions.

@rostest
Copy link
Collaborator

rostest commented Jan 18, 2024

@paulinelvne Many thanks for your feedback and the detailed error description! Please find an update in branch https://github.com/SICKAG/sick_scan_xd/tree/feature/api_exit, which corrects closing receiver threads at API exit.

@paulinelvne
Copy link
Author

paulinelvne commented Jan 23, 2024

Thank you very much ! Switching off the picoScan works correctly

@rostest
Copy link
Collaborator

rostest commented Jan 23, 2024

@paulinelvne Thanks for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants