Hi HOKUYO Engineer.
I am using UST-10LX Scanning Rangefinder. Firmware version is 2.23.
I programming in Windows 10(64bit) c++ 11. The sensor is straight connection with my computer.
My issue is that after my application run after about a hour later it out put "checksum error Urg_driver::get_distance(): no response"!
I am use another thread for my Kinect sensor, my UST-10LX run in the main thread.
My code like below
I found that this issue happen randomly, it may happen some minutes since the application start,
some times it happen about an hour since the application start.It happen in both single thread and mulitiple thread.
If I take a break point in Visual Studio,this issue can happen very frequently.
After the checksum error, no response will occur infinity.
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I checked the source code, but there is no problem in particular.
Perhaps you are doing a process that takes time other than GetFrameData on the main thread?
If so, it may be delayed to retrieve measured data from the Windows receive buffer on Windows.
(What happens frequently during debugging seems to be that measurement data has accumulated in the receive buffer when stopped at a breakpoint.)
Could you please try the following?
"Delete GetFrameData () on the main thread, only execute GetFrameData () on another thread."
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why the checksum error occur?
The sensor return measured data 40 times every second, if receive the buffer not fast enough, for example 30 times every second,another new buffer will overwrite the old buffer,then the checksum error occur in this situation. Is that right?
OK, I will try your suggestion.
Thank you so much,have a good day!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Urglibrary's get_distance method extracts data by 1 scan at a time from the buffer.
So, if more than 2 scan of data is accumulated in the buffer, it is necessary to execute it several times.
※ If you need data of every scan with UST - 10LX, get_distance must be executed 40 times during 1s.
In this case, it is considered that an error occurred in the following flow.
· Buffer overflowed, normal measurement data did not exist
· Sum check was done with abnormal measurement data, and it became checksum error.
Since the get_distance method received error data, we sent a stop measurement command.
· The sensor received the measurement stop command and stopped the measurement.
· Measurement data can not be received, but the program returns no response because it executes get_distance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, m-nagata. Thank you for your professional anwser.
I have move GetFrameData() function in single thread, the checksum error rarely occured, occured an average of every two hours.
since the error occured not so often, I can just ignore it and continue to get measurement data. So what is the right way to achieve this, I try it as below:
Maybe it is not get_distance executed not fast enough, is it possible that the application disconnect UST-10LX for a while, then measurement data accumulated in the buffer, after reconnect and called get_distance the error occured? Is it something could cause UST-10LX disconnect sometime?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So what is the right way to achieve this, I try it as below:
I also tried running the same program.
I think that there are differences in the operating environment, but it has been running normally for more than 4 hours.
Maybe it is not get_distance executed not fast enough
In your source code, X and Y coordinates are calculated immediately after get_distance (). Can you make that calculation different thread?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi HOKUYO Engineer.
I am using UST-10LX Scanning Rangefinder. Firmware version is 2.23.
I programming in Windows 10(64bit) c++ 11. The sensor is straight connection with my computer.
My issue is that after my application run after about a hour later it out put "checksum error Urg_driver::get_distance(): no response"!
I am use another thread for my Kinect sensor, my UST-10LX run in the main thread.
My code like below
appreciated for any help!
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I found that this issue happen randomly, it may happen some minutes since the application start,
some times it happen about an hour since the application start.It happen in both single thread and mulitiple thread.
If I take a break point in Visual Studio,this issue can happen very frequently.
After the checksum error, no response will occur infinity.
Thank you!
I checked the source code, but there is no problem in particular.
Perhaps you are doing a process that takes time other than GetFrameData on the main thread?
If so, it may be delayed to retrieve measured data from the Windows receive buffer on Windows.
(What happens frequently during debugging seems to be that measurement data has accumulated in the receive buffer when stopped at a breakpoint.)
Could you please try the following?
"Delete GetFrameData () on the main thread, only execute GetFrameData () on another thread."
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi,m-nagata! Thank you so much for your help!
Why the checksum error occur?
The sensor return measured data 40 times every second, if receive the buffer not fast enough, for example 30 times every second,another new buffer will overwrite the old buffer,then the checksum error occur in this situation. Is that right?
OK, I will try your suggestion.
Thank you so much,have a good day!
The Urglibrary's get_distance method extracts data by 1 scan at a time from the buffer.
So, if more than 2 scan of data is accumulated in the buffer, it is necessary to execute it several times.
※ If you need data of every scan with UST - 10LX, get_distance must be executed 40 times during 1s.
In this case, it is considered that an error occurred in the following flow.
· Buffer overflowed, normal measurement data did not exist
· Sum check was done with abnormal measurement data, and it became checksum error.
· The sensor received the measurement stop command and stopped the measurement.
· Measurement data can not be received, but the program returns no response because it executes get_distance.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi, m-nagata. Thank you for your professional anwser.
I have move GetFrameData() function in single thread, the checksum error rarely occured, occured an average of every two hours.
since the error occured not so often, I can just ignore it and continue to get measurement data. So what is the right way to achieve this, I try it as below:
Is it the best way to achieve it?
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Maybe it is not get_distance executed not fast enough, is it possible that the application disconnect UST-10LX for a while, then measurement data accumulated in the buffer, after reconnect and called get_distance the error occured? Is it something could cause UST-10LX disconnect sometime?
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I've had the same problem. Have you solved it?