-
Notifications
You must be signed in to change notification settings - Fork 81
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
SickScanApi-Functions error handling #260
Comments
Thanks for your feedback. SickScanApiInitByCli starts the lidar initialization, including background threads to handle TCP communication, lidar setup and reconnection after connection failures. In case of SICK_SCAN_API_SUCCESS, this process has started successfully. Currently the API does not provide functions to query the current lidar state resp. to get error messages and error codes in case of failures. We will provide these functions in a future release. To detect errors of any kind, you can monitor the receipt of pointcloud messages within your application. |
@cblesing Please find an update in branch https://github.com/SICKAG/sick_scan_xd/tree/feature/api_diagnostics, which exports diagnostic status and messages via the API. You can now register callbacks using SickScanApiRegisterDiagnosticMsg and SickScanApiRegisterLogMsg, or query the current status with function SickScanApiGetStatus. A callback function registered with SickScanApiRegisterDiagnosticMsg will be called, whenever the status changed (INIT, EXIT or OK) or an error occured (WARN or ERROR). See the diagnostic API description and example sick_scan_xd_api_test.cpp for details. |
Hi everyone,
according to the comments in the header file, there shoul be a possibility to check if the api functions return successfully or not. There is an enum called
SickApiErrorCodes
which should be used to cover that behavior.In our application we use the
SickScanApiInitByCli
-Method and theSickScanApiRegisterCartesianPointCloudMsg
-Method to get the scanner up. But even if I disconnect the scanner (LMS1000) in a physical way the first named Method allways returned 0 which meansSICK_SCAN_API_SUCCESS
. The fact that the callback method could be registered successfully is fine, because the callback is there.My question is how to do this right, so that we receive error codes in case that the scanner is not physicaly connected?
Best regards,
Christian
The text was updated successfully, but these errors were encountered: