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
and then the string to integer convert.
Is there a way to do this in the EZ scripting?
Upgrade to ARC Pro
Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!
I pushed a version that sets the variable to something outside of the range of the LIDAR if the LIDAR doesn't return a value(5000) for that angle. Also, it runs a bit faster now and starts the LIDAR automatically when the com port is activated or when the plugin loads.
This should prevent the first cycle of data from being off as by the time you start the LIDAR, the first set of data has already tried to be passed from the Get Surreal to the computer, but the port isn't open until you click the Start LIDAR button.
Question, I need help watching the variables. At the top it has type, size, and value.
I have many 500s and 600 orate for value, nothing In type. How do I see angles?
Thank you for fixing
$LIDARDistance would be for the value for angle 0
$LIDARDistance would be for the value for angle at 1 degree
The distances you are seeing would be something at about 19 1/2 inches from the LIDAR.
The distance value / 25.4 should give you the inches at that angel.
Rebooted pic still locking up, ugh! Am I the only one running win7?
Any suggestions thanks
Anyway I welcome your invitation to have a look if you can tonight.
Note to self, never work on my robot when you have hard day at work. Lol
Thanks David for all your hard work for this community.
Last night I let the lidar plugin run while my computer went to sleep. This morning I did have a locked up ARC. I suspect that if the com port has an issue it is locking up ARC.
I will look at catching that and making it report an error.
The replacement of the controller was due to me flashing it with some dev code that I really didnt want to loose. It is interesting that yours was hot. I haven't experienced that. Can you make sure that the part that is between the lidar connections and the teeny board isnt making contact with the teensy board? This is a voltage regulator with a heat sync. I want to make sure that it isnt shorting out something.
Also, the teensy board can be removed. Under it there is a diode and a pull up resistor. Make sure that those are soldered well. You can do this from the bottom of the board without removing the teensy device.
You should also make sure that there isnt any solder bridges on the teensy or on the connectors on the bottom of the board. I did verify a few weeks back that these are hand made. It is possible that there could be a solder bridge between a couple of the ports.