Asked
— Edited

I am using the plug in for the XV-11 Lidar. The output of the plug in an array in which each value is a string that represents the distance at the angle and the signal strength. To use this for control of the robot, I need numbers at these angles. The format is shown in the attached example. How do I parse and convert this in EZ Scripting into an integer?
In C there is the string.split command
https://msdn.microsoft.com/en-us/library/b873y76a(v=vs.110).aspx
and then the string to integer convert.
Is there a way to do this in the EZ scripting?
@Merne or @DJ
Can you try something for me? Please try to increase the data buffer size on your config screen? Please try maybe up to 4096 and see if you still lock up.
Actually, try this if you would...
open ARC
Add LIDAR control
Click ok to messages about com port
Click the settings button
Change com port
Change buffer to 4096
Save config
Save the project
Start LIDAR What happens here?
Close ARC
Open ARC
Open saved project
Start LIDAR What happens here?
Thank you for helping to find and resolve issue.
If this still locks up please
Repeat the process and let me know please.
David, I just downloaded the latest version of ARC and loaded your last plug in. My buffer is set to 2048 and I am running Windows 10. It's working fine for me. The lidar is spinning, the chart is updating and the variable watch is working fine.
Thanks @mstephens_42. At least I know that I dont have the only working one
Yep. It is not locking up but all of the data may not be making it to the variables. See this screenshot. I would not expect so many zeros in the data variables based on where the Lidar is placed. I tried setting to 2048 and 4096 and still got the same result.
Okay, hmm. Did you stop the lidar and then restart it by chance when this happened?
I think I know what it is. If the points are out range for the Lidar, then it records that angle as a distance of zero. If I move the lidar around I get a better 360 view and a lot more data. I was in the corner of my kitchen which is about 10 ft wide by 20 feet long. I think the range of the Lidar is about 10 feet so it could not see the far walls 0 which probably accounts for the zero data.
One final thing on this Lidar, that I have experienced and also seen documented on-line is that angle of the data is not aligned with the natural axis of the device. It seems that the first sample of the first packet is in fact looking at a -10° angle, not 0°. If a future version of the plug in algorithm could compensate for this it would be great.