Closed HCHChen closed 3 months ago
Thanks for your feedback. SickScanApiWaitNextPolarPointCloudMsg should return with SICK_SCAN_API_SUCCESS, unless the lidar did not repond within the given timeout. Did you call SickScanApiWaitNextPolarPointCloudMsg with a value message_timeout
> 0?
We recommend to register a callback via function SickScanApiRegisterPolarPointCloudMsg
instead of calling one of the WaitNext-functions in a loop. See Minimalistic usage example in Python and Complete usage example in Python
for a usage example.
Currently the INFO-messages from MsgPack/Compact-Exporter can not be disabled by build definition. We will add an API-function to set the log level.
We have added API-functions SickScanApiSetVerboseLevel and SickScanApiGetVerboseLevel to set resp. get the verbose level in branch feature/api_logging on https://github.com/SICKAG/sick_scan_xd/tree/feature/api_logging .
SickScanApiSetVerboseLevel and SickScanApiGetVerboseLevel sets resp. returns the verbose level. The verbose level can be 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR, 4=FATAL or 5=QUIET (equivalent to ros::console::levels). Default verbose level is 1 (INFO), i.e. sick_scan_xd prints informational, warnings and error messages on the console. Logging callbacks registered with SickScanApiRegisterLogMsg will receive all informational, warnings and error messages independant of the verbose level. Call SickScanApiSetVerboseLevel(sick_scan_library, api_handle, 2) to disable sick_scan_xd info messages. See https://github.com/SICKAG/sick_scan_xd/blob/feature/api_logging/doc/sick_scan_api/sick_scan_api.md#diagnostic for details.
Note that the WaitNext-functions of the API just return the next received message. For multiScan and picoScan, this can be a scan segment (i.e. a part of the full scan) or a fullframe poincloud (i.e. all scan points of a 360 degree scan). Depending on the timing, you may not receive all messages, i.e. you may e.g. receive scan points of different segments. We therefore recommend to register a message callback instead of a WaitNext-function. With a registered message callback, you will get all fullframe and segment pointcloud messages.
Hello,
When using the SickScanApiWaitNextPolarPointCloudMsg API, the returned value (ret) is consistently 5 (timeout), as shown in the image below.
![image](https://github.com/SICKAG/sick_scan_xd/assets/142422774/dd9c86b9-4940-483f-9697-e7c87d0c1a0b)
Is there a method to use a callback function to determine if the scan has completed transmitting the entire cycle of data?![image](https://github.com/SICKAG/sick_scan_xd/assets/142422774/35207082-a927-4d98-b884-a0877b483af2)
Is there a way to disable API packet logging in the build definition?
Best Regards, -Henry