Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Scanner Connection #39

Open
ghanim-mukhtar opened this issue Mar 22, 2022 · 3 comments
Open

Scanner Connection #39

ghanim-mukhtar opened this issue Mar 22, 2022 · 3 comments

Comments

@ghanim-mukhtar
Copy link

The ROS 2 Driver connection

My issue is very similar to this one #28. So now I can connect by using the modified code with the (for loop) and actually the total time of connection could be systematically around 26 seconds, so it is not a problem of readiness for the scanner. Furthermore the configuration file (config/sick_mrs_1xxx.yaml) is edited as per adviced.

The only thing we can think of is that in the loop SickScanCommon::init_scanner() there is some initialization that doesn't take effect unless we pass it twice at least.

We are running the launch command in a docker image, we can provide the image and the logs if necessary to debug this, but we really would like that the nodes worked directly for us without any modifications.

Thanks in advance for your feedback

@michael1309
Copy link
Collaborator

Can you please send the log output as a text file (or alternatively as a screenshot)? Also, please check if you have set the lidar to COLA-B? You can change this permanently with SOPAS-ET and then store it in the EEPROM.
We also recommend you to use the sick_scan_xd project, as we actively support it.

@ghanim-mukhtar
Copy link
Author

You can find the requested log output below, furthermore I have used SOPAS-ET to permenantly configure the LiDAR and for the Host port parameterization I have indeed set it to COLA-B. Actually it was set to COLA-ASCII and I had problems on first start-up after power-on so I made sure to set it to COLA-B.

I will try to test the sick_scan_xd project and I will let you know if I advance with that, but for now I really need to find a solution with this version of the driver.

log_test.txt

@rostest
Copy link
Collaborator

rostest commented Mar 24, 2022

Thanks for your feedback and logfile. According to the log, it takes 60 seconds for the lidar to become ready (i.e. request "sRN SCdevicestate" is answered by "sRA SCdevicestate \x01"). After 45 seconds, init_scanner() returns with timeout. After calling init_scanner() again, the lidar reports "ready" after 16 seconds.

The startup time depends on operational conditions. Increasing the timeout should solve the issue, e.g. to 90 seconds. Please set the timeout in sick_scan_common.cpp line 1972:
int maxWaitForDeviceStateReady = 45; // max. 45 sec. (see manual)
to e.g. 90 sec:
int maxWaitForDeviceStateReady = 90; // wait for max. 90 sec.
and retry.

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

No branches or pull requests

3 participants