![]() |
LabView Drive Simmulatior Practice
So I have been trying to get a feel for LabView and I did this
HTML www.shsfirst.org/files/drivesim/ and the VIs www.shsfirst.org/files/drivesim/vi/ I would like any feedback I can get. Thank you. |
Re: LabView Drive Simmulatior Practice
Very nice!
|
Re: LabView Drive Simmulatior Practice
One key thing that does not show up is the false case for the case statement on the left. You will notice a delay when you rotate, this is proportional to the amount of turn requested, there is a constant that changes the amplification of it. This is to simulate the time that it takes a robot to turn in place.
My hope is next week to add some NXT to this and see how it works out, who knows this might end up working as part of a nice OI robot feedback. |
Re: LabView Drive Simmulatior Practice
5 Attachment(s)
Excellent comphappy, here is my own attempt at something similar - I haven't tried your sim yet, but judging from the programming techniques used you are way more familiar with Labview than I.
The VIs were developed with Labview 8.6, but I saved them as 8.5 so everyone can use them. |
Re: LabView Drive Simmulatior Practice
That's really cool.
You could even use a joystick as an input (connectivity -> input device) |
Re: LabView Drive Simmulatior Practice
Quote:
I do like the idea of hooking a joystick up to it, but I do not have a USB one so that will have to wait. |
Re: LabView Drive Simmulatior Practice
One thing that might help all of you is that there is a polar to cartesian converter in Labview, found at Mathematics > Numeric > Complex (or Programming > Numeric > Complex).
Unfortunately, it is true this is not included in the NXT toolkit. |
Re: LabView Drive Simmulatior Practice
Why not create your own polar to cartesian VI?
It's not exactly difficult x = r*cos(theta) y = r*sin(theta) boom, there you go! |
Re: LabView Drive Simmulatior Practice
It's a little trickier going from cartesian to polar, however, since you need to account for arccos and arcsin having having "+/-" output possibilities. But it's not too difficult.
Russ |
Re: LabView Drive Simmulatior Practice
In that case, you can go to
Code:
Mathematics > Elementary & Special Functions > Trigonometric FunctionsPersonally, I would just do this processing on the computer itself, not the NXT. It's not like transmitting each move will be much more data than transmitting the current location. However, I would (if it doesn't already) treat it like packets, and number each one make sure that data isn't lost. I suppose the location data could be sent back to the NXT in autonomous mode, to help with navigation. For determining how far the 'bot has turned, the angle turned (in degrees or radians) is directly proportional the the "distance left drive has travelled" subtracted from the "distance right drive has travelled". |
Re: LabView Drive Simmulatior Practice
If you use your trig identities and make things proportional to create your functions it is possible to avoid almost all the additional trig.
|
| All times are GMT -5. The time now is 08:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi