Asked — Edited

Trying To Make A Plugin For Xv-11 Lidar Using Sureal Controller

I am making a plugin to use the XV-11 LIDAR with the GetSurreal 1.2 controller in ARC, but I am having an issue on step 6.5 of the plugin tutorial. I tried creating the stub plugin and going to my plugins, but I get a 404 error.

Just letting you know. Let me know if there is anything I can do to get the XML file that is required.

Thanks David


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

PRO
Synthiam
#1  

Don't right click of your browser doesn't like it. Just click on it and download the xml file.

#2  

Here is what is happening. I could very well be doing something wrong. I have tried with Chrome and Edge.

https://synthiam.com/Products/Controls/

I choose Create Plugin

Click OK on the ?Create New ARC skill plugin? dialog box.

I enter a name in the plugin Title field and click Save Details. I have nothing to upload at this point because I dont have the XML file that is needed.

I click the link at the top "Plugins/CochranRobotics.com/"

I get this... Whoops! This page has been moved or is no longer available. Please look around the ez-robot.com website to see if it's been moved. Otherwise, you can always Contact Us if you're looking for something specific. :)
4//ARC/plugins/cochranrobotics.com

I wonder if it is because of my username. Let me change that and see what happens.

#3  

yep, that was it. Dropped the .com off the end of the username and it worked.

PRO
Synthiam
#4  

Ah, I see... Yes that would cause a problem. Let me look into handling periods in username url

PRO
Synthiam
#5  

Something to note, I suspect that you will be using system.timers.timer, not system.forms.timer for obvious performance reasons. this means you should look at my plugins to see the ez.builder.invokers class to ensure updating any gui objects do not result in cross thread exceptions. A tip incase you run into that.

#6  

Thanks for that. Am I able to use multiple threads in a plugin? The way it is written is that there is a thread gathering data from the serial port, and another thread to update a panel and parameters in ARC (up to 360 of them). I had to step away to get some rest but I will work on getting the plugin setup tomorrow. I wrote it as a windows form while getting everything to work, but I will rework it into a dll tomorrow.

I am adding the ability to rotate the generated image and allow someone to restrict the the values or angles returned. This will allow someone to use this when there isn't a clear 360 degree view based on how it is mounted in the robot.

PRO
Synthiam
#7  

You can run as many threads as you like - however be careful not to push the OS' threading factory with too many threads.

If it matters, if I wrote it, it would all be in one system.timers.timer thread.

#8  

The changes for choosing to display only a range of angles has been made and the change to allow the user to rotate the map image has been made. I have also updated this to run in a single thread.

DJ, do you have a plugin that shows how to create and update a variable array using the ARC.dll? I have only used the EZB.dll in the past to do this but as a plugin, I don't thing that this is necessary but I could be wrong. Also, I will need to look into what you recommended above.

My plan is to release this as a Christmas present to those who have purchased the Lidar and GetSurreal controller based on my previous posts about it. I have gotten some emails asking how to make it work and wanted to provide something to you so that your purchase based on my recommendation isn't wasted money.

This plugin will allow you to see the current readings from the lidar. It doesn't build a map for you. It will display this information on the screen (that is pretty ugly I must admit) and set variables for you to use in scripts. I will also post the code for this plugin so if anyone wants to take it and run with it, you can. If you do, please start by making the image that is displayed more pretty. This isn't what I am good at. Also, please share the code for any updates that you make to this plugin.

#9  

@DJ Sorry, I didnt see the Array sorting plugin earlier. I will take a look at that to see if it is what I am looking for.

#10  

@DJ I am trying to use this on an existing variable array called $LIDAR to update the points as they are discovered by the XV-11. This looks to be the wrong way to do this as when I enable this before my MakeMap function, the MakeMap function quits doing anything.

Distance and direction are both int variables.

EZ_Builder.Scripting.VariableManager.VariablesArray["$LIDAR"].SetValue(distance, direction);

Can you offer some suggestion on how to update an existing element in a variable array? It seems that I am totally misunderstanding the use of this.

Also, the data isn't reflected in the variable watcher control while this is running. I don't know if there is a commit or something that I am missing here.

I have attached the project if you would be so kind as to take a look at it. This isn't what I would call clean code... Any other suggestions would be very welcome.

XV-11.zip

#11  

DOH! After putting something useful in my catch block I can see the error that is being reported. Maybe I can do something with this information.

#12  

@David... Thanks for tackling this.... Much appreciated....

#13  

Still no joy. The only part that is left to having something working is to send all of these values back to the variable manager. For some reason, I can't figure out how to do that for the life of me. It seems like it is something so simple that I am missing but I am just blind to it right now for some reason. I know why the values in the variable watcher aren't updating (because I am not sucessfully updating them :)).

I guess that I could send the variables through the SDK via TCP but to me that seems way silly. I will look in the SDK to see if there is something I am missing in there.

From there I will work on performance and memory load some, but there will be something that is working for these sensors that don't cost $400. It works pretty well for a little over 1/3 the price.

No problem Richard. It is a decent LIDAR for the price for sure.

#14  

EZ_Builder.Scripting.VariableManager.VariablesArray["$LIDAR"].ElementAt(direction2).SetValue(distancetext) seems to work.

There is no reason that I shouldn't be able to finish wrapping this present and get it delivered by Christmas Morning.

#15  

Merry Christmas early, If you find any bugs, let me know,

Thanks!

#16  

Thank you David. You have a telent for sure. Merry Christmas

#17  

Hey Mike. Let me know if you run into any issues. I got it working but you may find some things that I didn't think about. Also, I will be interested in seeing how it runs for someone else.

#18  

Hey David, I just installed the plug-in and got it running. Looks like the center or the little square is the lidar box, I am going to be scanning side to side and a head of the robot. I just now started to play around with it, this is the furthest I've seen anybody get without having special software, learning other people's software as well, so thank you very much.

Mike

#19  

You are welcome. Tomorrow I will make and post a video that will act as a tutorial and a demonstration of it working so that others who don't have this sensor and controller can see it working. After that I will optimize reading the serial data from the sensor and try to figure out how to make the display smoother. I ran my sensor all night last night to see if anything hung up on it. It ran all night without an issue. Also, I need to work on the dispose function a bit. Right now it will crash if you close the control I think. One more thing I want to add is the ability to save your settings for this control so that you don't have to keep setting it back up when you restart your ARC project.

I wanted to get this out to make sure that nobody else had issues with it so far. Also I knew there were some that bought this based on my recommendation in another post and had not been able to use it yet. I felt bad about that. There is another sensor that the same thing happened on. I need to get to working on that also for the same reason but I don't expect that I will be able to for a while.

I wish I were better with graphics. I am horible with them and was happy to get done what I was able to get done with this. I may have to learn but hope that someone who is much better than I can take the code and make the map look great.

#20  

David, do you think you would be able to overlay a camera on you plug-in. Then you may not have to do the graphs as you were talking about. do you think is it possible.

The save setting is a great idea, especially for those who have onboard computers.

Right now I'm just trying to get an idea of how I need to mount this lidar on my base I think I have that part now I need to figure out the distances .

Thanks, Mike

#21  

Also what is the measurements of the distance are they in millimeters or inches. I guess my question is when variable goes from 1 to 200 what is that distance do you know thanks

#23  

@JustinRatliff. Here is the link....https://www.getsurreal.com/shop

#24  

@Davis thanks! This is awesome work dude.... Looking forward to your video. Now I need to find some money to buy one... :)

#25  

@Merne, The values are returned in mm I think. I think the shortest distance that is reliable from the LIDAR is about 6 cm. I haven't gotten a yard stick out to measure but I am pretty sure they are mm. Putting this over an image or stream from the camera is possible. I will first complete this module (thought of some other things last night that could be added) and then worry about the display.

@Richard, Thanks man.

This plugin got me thinking. The way that this works is the way that Rafiki works in general. There are controllers plugged up to USB ports on a computer. Right now I have a program that ties it all together, but I could make ARC skill plugins for each of the components and just run everything through ARC. This would allow me to just use scripting where needed to do what I need to do to communicate between these components of the robot. I have been considering selling individual pieces of the robot separately. This would allow someone to put in the pieces that they want in their own build.

On a side note, I have been experimenting with measuring distances to objects on a single camera using a technique that first showed up in about 2006. It uses a piece of paper of a known size and at a known distance as a calibration mechanism. From there, it then can pick up corners of objects and calculate their distance to the camera. I have some code from 2006 that I will need to convert into something that is more modern, but the code from 2006 runs in .net 2.0. This along with my parking ping sensors, and the LIDAR should provide a pretty complete view of the world around the robot.

PRO
USA
#26  

@David,

Instead of connecting the Lidar to the PC, is not possible to connect to the EZB and get data through UART methods ?

PRO
Synthiam
#27  

I've been travelling and haven't responded to this yet. For your Array question...

You can push data into the EZ-Script Variable Manager as an array. Here is an example of setting a number of indexes to random integers:


      int myArraySize = 10;

      EZ_Builder.Scripting.VariableManager.CreateVariableArray("$MyTestArray", 0, myArraySize);

      for (int x = 0; x < myArraySize; x++)
        EZ_Builder.Scripting.VariableManager.SetVariable(
          "$MyTestArray",
          EZ_Builder.EZBManager.EZBs[0].GetRandomUniqueNumber(0, 1000),
          x);

If you add the above code to a test button on your plugin, and press it. You will see all of the data appear in the variable manager, every time the button is pressed - as atest.

#28  

JustinRatliff you can get just the Lidar units on ebay. Sometimes as low as $75

#29  

Ptp, not with this plugin. It would be possible but would flood the communications pipe between the ezb and the computer possibly.

This plugin works with the GetSurreal controller specifically.

@DJ, thank you. I will look into this.

I should have a new version of this plugin out today with the added features I mentioned.

#30  

Hey Mike, I just looked at my email and saw what you did. Thank you bud. It is appreciated. Have a Merry Christmas.

There is now a video on the plugin. I hope it helps explain things. If you have questions, let me know.

#31  

@David... Just finished watching your video of the Lidar... Simply awesome man.... Ok, so can these data points (maybe in a later version) be saved to a file to generate a room map? And can this data be used to navigate like slam or is this beyond the scope of what can be done with this plugin programming wise?... The only two guys I know who can possible write this type of software are you and DJ....

#32  

The points can be written to an array and housed for building a map. Actually, the plugin is doing this ($LIDAR) in ARC. The part that interests me is that now that it is in ARC, and ARCs abilities to run everything in its own thread, and the scripting that is possible in ARC, and the ability to use a lot of other components (either via plugins or otherwise), yes I do believe SLAM would be possible. DJ has done some of this in the past with limited sensors. I think with the addition of this plugin and sensor, building an array that would be a map would be possible with a lot more data available to make decisions on.

Let me explain a bit. Lets say that you took a reading at a position you called x1,y1. You have a compass, so you know which direction you are heading. You move forward for a specific amount of time or distance. You take another reading called x1,y2. Based on your movement, and the difference in these points, you should be able to then start building a map.

As I see it, the difference really is the distance out that you can see. This sensor will see across a room with no issue. A ping sensor is far more limited in its range but is great up close. Other IR sensors are also limited in their range, so building a map using them is difficult.

I do think it is important that you have multiple sensors validating data from each other in an autonomous robot though. This is why I use those bumper sensors and why I am looking at the single camera distance thing. I would love to see or participate in creating a SLAM module for ARC. It would be a really cool feature to have.

#33  

Another idea is that the lidar could be used to know how far you have moved. if you took a reading at the heading that you are heading in, and then moved and took another reading, you would then be able to compare these two points in order to know the distance that you have traveled.

#34  

A "sensor" like a motor encoder would really work well with the lidar to help confirm positioning then? I agree an ez robot version of "slam" would really be really awesome... Good information David, thanks :)

#36  

Text from Plugin. Changes are bolded with the version number of the release. Sorry to have 3 releases in a couple of days, but my brain kept working on what should be added to this plugin to make it the most useful...

THIS IS FOR A ROBOT WITH AN ONBOARD COMPUTER The XV-11 is an inexpensive 360 degree LIDAR sensor. This plugin requires that you use a GetSurreal Controller. I have a version 1.2 GetSurreal LIDAR Controller.

This plugin will generate an array variable called $LIDAR. Each element in the Array matches to the degree angle reported from the XV-11. The value of each element is the distance reported back by the sensor in millimeters for that angle.

The GetSurreal controller connects to a usb port on your computer and also connects to the XV-11 LIDAR. Because of this, an onboard computer is the way that I use this plugin.

The first thing that you will have to do is identify which com port your GetSurreal controller is connected to. After your COM port is selected, you can click the Start Lidar button and things should start happening on the map. If you add a Variable Watcher control, you will be able to see the distances changing as you move the LIDAR.

Version 1 If your robot has the LIDAR mounted in a way that would prevent it from seeing all 360 degrees clearly, you can choose the range of angles or degrees that are open for your robot to see. This corresponds to the angles that are reported back from the LIDAR. If you are using say angles 90 to 180 everything should run great as is. This would give you all values from 90 to 180 or 90 degrees total. If you want to use say 180 to 90 then you would set the first angle box to 90 and the second one to 180 and then click either of the check boxes just to the right of these ranges. This will give you 270 degrees of scanning or all values greater than 179 and then all values up to 90.

You can also rotate the map image by -90 to 90 degrees. This will allow you to turn the map to display in a direction of your liking.

Version 2 You can now specify the size of the databuffer that is used when reading the LIDAR. This will allow the tool to use more or less memory as you decide for your project. Sometimes, increasing the data buffer will improve performance.

You can now save your configuration. This configuration will be loaded at the time that the control starts. Also, you can now stop the LIDAR which will prevent it from getting readings, release the com port and stops the motor on the LIDAR.

Version 3 Also, you can set the map zoom distance which will just allow you to adjust the map to display the points at different zoom levels.

I made changes to use the EZ_Builder.Invoker class as recommended by DJ. I know that I didn't get all of them yet, but most are now covered.

I also double buffered the screen to make it a bit smoother. Hopefully this will improve performance a bit.

I also changed the look a bit to match more of the ARC look and feel. I am colorblind so this is difficult. If things need to be adjusted, or DJ wants to share his standards, I would be happy to make changes to make it look more like the other controls in ARC.

General info Attached is the project code. If you would like to modify it in any way, feel free to do so. The only requirement is that you also share your code. This is a standard practice when using code that has been prepared initially by someone else.

I am thinking about an update that would allow the user to change the colors on the display image (background and point colors). With me, if I get bored I will jump in and do it, so you might see another update with this soon. After that, I would be making changes based on suggestions from those who use this plugin.

#37  

Oh, I just had another idea... I want to make the values and button clicks updatable or selectable from a script. DJ, is this possible to do in a plugin?

#38  

Dave, This is incredible work. It's people like you that bring dreams to life for us common people. LOL. Thanks for the Christmas gift.

Hey, I thought you were supposed to be getting some rest? Don't burn yourself out again. ;)

#39  

Thanks Dave. Work is really light this week and I need to be at my desk anyway... I cant stand sitting and doing nothing and there is a code freeze at work so really nothing can be done until the beginning of the year. I figure this is as therapeutic as anything ")

#40  

Hey David I like the new look and the ability to zoom out and in the buffer, it really helps with real-time updates. Keep up the great work

I'm wondering if you are able to put a Compass heading in the map from a Compass chip that most people have on their robots.

My inmoov, Gideon is all geared up ready to move but nowhere to go because of his programmer (me) who lacks talent like you and DJ and a lot other people on this forum, which I hope they dig in and expand your work.

And like Dave S has stated don't burn yourself out, Us common people LOL look forward to a lot more of your work .

Cheers and Merry Christmas

#41  

Thats a good idea merne. I have the 4 in 1 sensor on my robot. In the app I have built for Rafiki, I have a rotating compass image that moves with the position or direction of the compass. I will look at adding this.

I just finished the changes for the colors for the points and background. I will post that for you in about 10 minutes.

#42  

The color thing was a bit tricky but it is working now. Let me know if you have any issues with it. A new version has been posted.

Thanks David

#43  

Merne, in thinking about this, I would probably rather pass in a variable that is displayed in a certain location on the map. This allows the user to put whatever they want in that variable and I would just display it. I would probably be able to allow the user to specify which variable they want to have displayed through the config side of the screen, but it is getting pretty full now :). I have also put some thought into changing the config side of the plugin to be a different form or a panel that is only visible when a button is clicked (like the default ARC controls), but if I did that, I would feel obligated to add the little question mark with instructions :)

#44  

There is another piece of information coming back from the LIDAR that I am not using yet but think I will attempt to use it. It is the intensity of the signal returned to the LIDAR. This should allow you to determine if the object that you are seeing is a wall or a piece of cloth. It is going to take some work to allow it to be used, but I think this is the next thing that I will work on adding.

The thought is that you will have 3 different point colors. The point color would indicate the level of intensity returned by the LIDAR. I will probably build another array variable that would have 360 points showing this level of intensity at each angle.

The issue with this sensor is that you end up with 720 variable elements in 2 arrays. That is a lot of data for someone to consume and process. I will add it and see how it goes and go from there.

I will probably build another plugin (with intensity) so that someone can choose which of these two they want to use. The only issue is that it means managing two different sets of code... Thinking on this a bit.

#45  

Like a blind squirrel once in a while I can find a nut ?? I think you have some great ideas David and look forward to seeing your new release thanks again. BTY, i'm glad you can read in what I'm trying to type because most the time I don't seem to clarify things .??

#46  

Hi David, great work on this Lidar plugin. I noticed in your video that there is a LED on the 1,2 controller that is on. My controller does not light up and no variables are being populated but the motor is spinning the Lidar. Do you think this is a bum controller? I've used two different XV Lidar units and the results are the same.

#47  

@RobotDoc It is possible. Here is what I would try just to verify...

First, make sure your cable isn't just a power cable from something like a cell phone charger. Some of these only have the +5 and ground cables in them.

Second, I would try the directions on https://www.getsurreal.com/product/xv-lidar-controller-v1-2 to see if your getting data reported back through the Arduino app. I say this just because it is what they are targeting.

I would specifically focus on this chunk from their website... The Teensy comes pre-programmed, but you are able to customize and build from source.

Quote:

Firmware https://github.com/getSurreal/XV_Lidar_Controller Arduino IDE (v1.0.5 tested. Newer or older may work) Teensyduino Software add-on to run Arduino sketches on the Teensy (v1.19 tested. Newer or older may work) http://www.pjrc.com/teensy/teensyduino.html Copy the included libraries to the Arduino libraries directory Usage Connect to the Teensy USB port at 115200 baud. When sending commands, use the newline character sequence to signify the end of a command.

I send a command to the serial port of "ShowDist". If you send this, you should see degrees, distances and intensity ratings. If you get that, you are good. If not, I would reach out to GetSurreal.

I think the issue is probably the cable, but I could be wrong.

#48  

Version 5 - 12/23/2015 12:37 PM CST I added the ability to use the intensity reading from the sensor. This lets you try to determine what type of object is being detected. I also chose to include both the distance measurement value and the intensity value in the $LIDAR array element. I decided it was better to have a single value that then can be parsed by a script instead of two different arrays (one for distance and one for intensity). If people don't like this, I can change it to two different variable arrays.

#49  

Here is how this works... If the reading is less than the first setting then the first color will be used.

If the reading is greater than the first setting and less than the second setting, setting, the second color will be used.

If the reading is greater than the last setting, the last color is used.

#50  

Version 6 - 12/23/2015 4:47 PM CST Last update for the day I think Smile All of the config settings are moved to a panel which is displayable by selecting the Configure button.

Text from variables can now be displayed on the map. You can add up to 16 variables that you would like displayed. These will list down in the order that you have these configured on the configuration screen.

You can change the color of the text that is displayed for these values from the color combo box that is below the list of variables. If there is an error in a name of a variable, this and all subsequent variables will not be displayed.

If I get bored tomorrow, I will work on adding the ability to change the font for these variables. This sounds challenging and fun :)

#52  

Hey David not sure what's happening but your plug-in seems to be locking up now I've got the latest version I believe at six

I go into the config file and adjust my map settings and the color backgrounds I'm not using variables when I save it and start nothing shows on the map when I stop the little square comes up indicating the location of the lidar I played around with this and still nothing on the screen I've also tried to zoom not working

When I stop the Leinaar it shows stop on the little icon but then I cannot restart it only way I can get back in because it locks up ez robot at least mine it locks up I cannot Close the window I have to going to task manager and kill the app I jumped from version for diversion six so I'm not sure if version five was working any ideas thanks Sorry for no punctuation marks I'm talking to my phone

#53  

Okay. I will look to see if I see anything. I'll clear my config file and see what happens.

I think I know what is happening when your stopping. I think the com port is having issues closing out.

My wife has taken my seat to get her Christmas present setup. I got her one of the new huge ipads. She loves ipads for some reason. When she gets up, I will take a look.

#54  

Thanks David I also use iPads at work I think they're great too

#55  

I loaded the plugin on a tablet PC to test it out. One important thing with this sensor is that you want to be sure to use a powered hub if you are using a tablet or a small PC. It pulls more power than a usb 2 port can provide. A usb 3 port is probably fine as that is what I used while programming it.

I don't know if this is an issue or not for you Merne but just wanted to document this somewhere for those who are looking at this sensor.

I will still need to wait for my wife as my powered usb hub is being used now by her.

#56  

I installed the latest version of ARC on the tablet and downloaded version 6 of the plugin. I ran the plugin and tested it with one variable. I stopped the lids are via the button in the controll and the restarted it. It looked good. I started and stopped the lid are 3 times and then saw what you see. It locked ARC but I was able to stop ARC by right clicking on the icon in the task bar and choosing close. It closed from there.

I will look at what is happening tomorrow. I suspect that I will just need to make sure the com port is closing but I will figure out what is hanging it up tomorrow.

#57  

Hey David I tried to different scenarios first one loaded new project only thing I loaded was a 1-4 sensor The variable script and left it at default and it worked .

I've been went back open a new project merged my project into it make sure I startedthe 1-4 sensor Again left late are plug-in as default and everything seems be working then stopped and started three times and it locked up .

It's not that big of a rush since it's going to take me time to integrate this anyway tomorrow starts the holiday enjoy it with your family thanks

#58  

We aren't closed so I get to sit at my desk just incase something bad happens. I let all of my employees have the day off, so I will have some time to dig into it. Thanks for the info.

#59  

Hey David, I like the new look, ver8 nice!??

#60  

I removed the plugin until I complete making it compliant with the new compliant section of the plugin Tutorial. I am working on this and will republish it once it is compliant with all of these.

#61  

Thanks for your work on this. i am looking forward to trying it out when I come back to Australia. I have had the surreal lidar for a while and have been trying to find the time to do something with it.

PRO
Synthiam
#62  

@Dave, what changes do you need for compliance? I can give the code a quick overview if you need an extra set of hands in there.

#63  

Hey DJ. I only got to work on this yesterday in about 5 minute bursts. I was converting the plugin to use the configuration manager so things are a bit messed up with the code right now. I will be working on that today to finish that piece up.

Once this part is done, I will send you the code. I would love for you to take a look at it and either make suggestions or changes as you see fit. This is my first attempt at a plugin and want to get it right. I want to make plugins for all of the subsystems in Rafiki and use ARC as the interface. I have code that works outside of ARC that I will be converting into plugins so getting the first one right will be of great benefit.

Thanks for the offer. I'll send you what I have when the configuration is working correctly.

#64  

Variables are working now but I don't "play well with others" yet. XV-11-WithIntensity.zip

Please take a look.

The parts that I think I am out of compliance on are Avoid Length GUI Thread Processing - Initially create a variable array of 360 Items. This locks ARC until it completes.

Timers I don't use any timers yet. It is basically a continuously running loop when data is being received from the LIDAR.

Exception Handling The major errors are caught. There are some with data sometimes, which are ignored and the plugin moves onto the next piece of data. Also, any errors that need to be caught are showing up in the form of messageboxes. I need to convert these to use the log.

PRO
Synthiam
#65  

i wouldn't worry about loading the array as being cpu intensive. That function is very very very fast and executes in a millisecond..


      EZ_Builder.Scripting.VariableManager.CreateVariableArray("$LIDAR", 0, 360);

How come there are so many Thread.Sleep() calls? That is causing the performance troubles.

PRO
Synthiam
#66  

I ordered a Lidar - next week when i'm back in calgary i'll take a look. Without knowing what data it returns, i'm unable to identify the logic to display/process the data.

#67  

Understand on not knowing the data that is coming back in. The sleeps were put in during debugging issues. I need to go back and remove them. Thanks for looking and catching that.

PRO
Synthiam
#68  

No prob - i'll have much more input when there's a unit to test with :)

#69  

Looking forward to it for sure.

I see the following areas things that need to be addressed or at least looked at.

The parsing of the LIDAR data isn't the best. There is probably a more eloquent way to do this.

The graphic could be done differently I am sure. I just have no idea of what to do on it.

It would probably be best to build an array from the data that is being returned from the LIDAR and pass that between the map generation piece and the piece that updates the $LIDAR variable array.

I do have to say that I ran the plugin outside of the debugger just now and it is pretty quick. It doesn't seem to be interfering with the other controls that I have in this project. This is a good thing. When running through the 2015 debugger, I didn't like the speed that things were happening. I am much happier now:)

#70  

Hi there

Instead of connecting the lidar to a pc how feasible might it be to use an arduino as an interface to the EZ-B .... such a plan might help those who want the lidar to be mounted on a computer.

Sorry if this is a dumb question but I am not even able to test this plugin with my lider as I am in Canada and my lidar is in Australia .... but I think that this would really make the plugin (and the surreal lidar) hugely useful.

A big thanks for all the work gone into this and I can't wait to get back to try out all the work that has been done so far.

Cheers

Chris

#71  

@ZebraStripes

Quote:

Instead of connecting the lidar to a pc how feasible might it be to use an arduino as an interface to the EZ-B ...
Same problem .... not enough processing power. I believe the Sureal control is arduino based...There is lots of data coming out of the xv-11. Maybe the ezb4 1/2 might be able to handle it through I2c, however the arduino hasn't go a chance... ... You really need a PC to effectively use the lidar XV-11...

#72  

Hey Zebra, I think the current version of the V4 will have its communication path flooded with the amount of data that is coming back. As Richard said, the V4 1/2 may be able to handle it.

DJ is getting one of these to mess with. He may have some way to make this happen. I would think that if you setup the LIDAR to refresh no more than every few seconds, maybe it would be okay with the current version.

The GetSurreal controller is a Teensy (arduino based) controller. You might be able to intercept the output from the Teensy to the comport and patch it into the EZ-B, but I haven't tried.

I always use onboard computers because I have multiple cameras and other devices that I want to have very fast communication paths without affecting other things that are using the communication path for the V4. It is just the way that I do things, and the code has been published if anyone wants to modify it.

The neopixel control I just put out also is designed to be connected to directly from a PC and not through the V4. This is going to be a part of my Rafiki project in ARC and I want to keep this communication path as open so that the user can modify the robot however they see fit with as little interference from me as possible. Because of this, I have even moved my neopixel (very small bandwidth usage) to the usb ports on the onboard computer.

This code is also shared, so if someone wants to modify it to be used with the EZ-B, they can. Right now, it is more designed for someone to manually set the Neopixel to specific modes. I haven't created the Script interface for it yet. It is going to be a pain to do because of the numerous options that have to be set. The GUI has been made to allow someone to manually run a NeoPixel through a COM port. These two were released with the code because I either used something that someone posted on this forum or there was nothing like it available yet. My hope is that someone will take the LIDAR code and go crazy with it. I really don't have the time to do this right now. It works but could be improved upon.

#73  

@CochranRobotics Thanks for making this great plugin !

I'm having the same issue as @RobotDoc in that the program can create the variables and start/start the lidar but the variables receive no data

I tried the quick test using the Arduino IDE on the Surreal site and the lidar work fine and retuned distance values on the same PC

I'm wondering if the issue might be that I'm using Windows 10 and the instructions for your plugin say to use the Teensy Serial Driver but Windows 10 wont let me load it... see below

User-inserted image

Is it possible that your plugin won't work with the Windows 10 driver?

Regards, Frank

PRO
Synthiam
#74  

His plugin isn't the problem. The problem is unrelated to his plugin. The problem is that windows doesn't have a driver for the hardware. The hardware requires a driver. The error from windows is that there is no driver.

If you google your hardware and windows 10, maybe you'll find a driver?

I don't know anything about the hardware - so I can't say much else:) just that it isn't a plugin problem :D

#75  

@faengelm >>I'm wondering if the issue might be that I'm using Windows 10 and the instructions for your plugin say to use the Teensy Serial Driver but Windows 10 wont let me load it...

That is correct. Like DJ said, the issue not inside the plugin but the driver to communicate with the GetSurreal device. Windows10 there has opted to us it's own driver and is telling you basically "Ptttt, I'm using my own drive thank you and good bye."

Getting your driver to load is what we need to help you resolve, if we can.

#76  

@DJ & @JustinRatliff,

Thanks for the feedback. I checked with Surreal, the maker of the Teensyduino interface board and they are saying the Windows 10 USB driver should work as it worked with their test program

User-inserted image

I tried Device Manager to remove the built in Windows 10 USB driver, but it wont let me do that... only drivers added by the user

Has anyone else been able to get this plugin working with Windows 10?

Thanks, Frank

PRO
USA
#77  

Frank,

I can confirm you don't need the Teensy driver it should work with the original windows 10.

I've used two different setups:

  1. Lidar connected to Teensy and Teensy connected to the EZ-B camera Port.

  2. Lidar connected to serial/usb and a ROS node.

I never used the David's plugin.

Currently i have setup #2 and i still need to finish some adjustment for the ROS navigation stack, after that i can flash the getsurreal firmware, and try to replicate your setup and test David's plugin.

I don't want to extrapolate more without proper debugging, let's wait for David's feedback and/or other Plugin's users.