PDA

View Full Version : Question about using labView in FRC


itsme
01-13-2007, 11:32 AM
In order to simulate my robot in labView, am I supposed to somehow connect my robot controller to the computer?
I mean, do I have to have the USB 6009 DAQ (it's not included in the kit of parts for FRC from what I understand).

michael714
01-14-2007, 02:51 PM
Hello,
I have the same question, but I'd like to expand a bit. In the FRC Software overview manual, it says this about the toolkit:

This robot modeling and simulation toolkit allows teams to prototype, develop, and test robot code on the FRC Robot Controller without the need of a robot.

Unfortunately, the only place that the same manual says to go for info is the NI LabVIEW FRC robot modeler thread in the Chief Delphi forums. At that thread, all replies are closed. The thread had several nice links, but none of the links give any indication about how to use LabVIEW as a standalone simulator. The tutorials have track A, B, and C and track B is supposed to be for simulation. However, it indicates that NI-DAQ needs to be installed and that does not come with the trial software that can be downloaded from NI (the one that is linked to from the LabVIEW thread here at Chief Delphi). The LabVIEW thread does say to download and install NI-VISA, but it doesn't say how that helps or what to do with it.

If you install and run LabVIEW, there is no indication on how to pull up the FRC simulation kit. If you use browse, you have to dig around quite a bit in order to find the stuff from the Zip file. Once you find it, the installation test with no dashboard does load- thank God. However, the Simulation Envirnonment - no dashboard won't load because it can't find a missing DLL.

Also, I'm still trying to figure out how LabVIEW is supposed to simulate the cmucam2. I've downloaded stuff from NI, from kevin.org/frc, from the Chief Delphi forums and it's still not obvious to me where the cmucam2_demo.llb should be placed or what to do to pull up the camera simulation from within LabVIEW.

I'm not trying to rant here, I'm just looking for help and want you to know that it's not for lack of effort on my part. Any advice would be appreciated.

michael714
01-14-2007, 03:07 PM
Ok, just answered my own question about the cmucam2_demo.llb file. Found it at NI and also by searching through Chief Delphi. At NI, you can find it here:

ftp://ftp.ni.com/pub/devzone/epd/labview_cmucam2_app_1-15-06.zip

There's a file with a newer date somewhere here at Chief Delphi, but I can't remember how to find it. Once I downloaded it and extracted it from the Zip, I could tell that it was associated with LabVIEW, so I just double clicked on it and all the cmucam2 .vi files became available to LabVIEW. I'm still not sure what to do with them, but at least I can now simulate the camera in LabVIEW. Cool!

Again, what I'd like to do is simulate the camera in LabVIEW. The .vi files seem to be setup to allow me to pull data from the real cmucam2. Is there a way to simulate the camera and simulate the target lights?
mw

Danny Diaz
01-14-2007, 03:38 PM
I would like to respond to this thread in pieces, hopefully this will be okay...

Unfortunately, the only place that the same manual says to go for info is the NI LabVIEW FRC robot modeler thread in the Chief Delphi forums. At that thread, all replies are closed. Yes, this was done on purpose. The way this forum is configured is that the main section of this forum is for announcements or notifications - otherwise, this forum becomes a jungle when it comes to teams trying to look for information or look for updates. The subforum (that we're using here) is for questions, topics, and whatever else LabVIEW or National Instruments or DAQ related that you want. Teams wanting to look for more information on a topic can come here once they've visited the "official" announcements.

The thread had several nice links, but none of the links give any indication about how to use LabVIEW as a standalone simulator.

That is half true and half not true. Have you watched the video tutorials? The first tutorial probably does not apply to teams without the USB-6009 DAQ device. However, the second tutorial gives you a very nice walk-through of the FRC simulator toolkit and shows you how to use it.

What the tutorial doesn't really go through in detail is how the toolkit can be configured -
[optimal]FRC Toolkit Using the Dashboard and connected to a USB-6009 DAQ device.
FRC Toolkit Using the Dashboard alone.
FRC Toolkit Using the USB-6009 DAQ device Alone
FRC Toolkit by itself
I will go ahead and just tell you that option 4 above makes very little sense whatsoever. The LabVIEW FRC Toolkit is designed to be a simulator of a ROBOT that is being powered/manipulated by the IFI Robot Controller. By modeling your robot the simulation knows how your robot is configured. By watching the Dashboard the simulation can see what your Robot Controller code is trying to make the robot do. The USB-6009 can be used to feed sensor signals into the robot controller to simulate what external sensors would be telling the controller had the robot been doing what the controller told it to do (requires additional modeling).

The tutorials tell you how to use the USB-DAQ in the first tutorial. The second tutorial tells you how to use the LabVIEW FRC simulator toolkit with the Dashboard. We're working on additional examples to show you how to integrate the USB-6009 to feed signals to the robot controller.

The tutorials have track A, B, and C and track B is supposed to be for simulation. However, it indicates that NI-DAQ needs to be installed and that does not come with the trial software that can be downloaded from NI (the one that is linked to from the LabVIEW thread here at Chief Delphi).

NI-DAQ is for the USB-6009 DAQ device; if you do not have the DAQ device, you do not need NI-DAQ.

The LabVIEW thread does say to download and install NI-VISA, but it doesn't say how that helps or what to do with it.

Actually, it does - NI-VISA provides LabVIEW with the ability to access serial ports (so that LabVIEW can access the Dashboard). There should be no reason for you to use NI-VISA directly, unless you're so inclined, because all of the toolkit software provides interface VI's to the dashboard information already.

If you install and run LabVIEW, there is no indication on how to pull up the FRC simulation kit. If you use browse, you have to dig around quite a bit in order to find the stuff from the Zip file.
That is correct - LabVIEW does NOT tell you how to pull up the FRC simulation toolkit. The toolkit is an add-on; a user add-on for that matter. As far as LabVIEW is concerned it doesn't even exist - at least not until you install it. Installation instructions are provided in the main thread (http://www.chiefdelphi.com/forums/showthread.php?t=50742).

Once you find it, the installation test with no dashboard does load- thank God. However, the Simulation Envirnonment - no dashboard won't load because it can't find a missing DLL. Did you install it correctly? Perhaps providing me with the name of the missing DLL might shed some light on why you are unable to load the VI.

Also, I'm still trying to figure out how LabVIEW is supposed to simulate the cmucam2. It doesn't. This first release does not include any modules to allow you to simulate using the CMUCam2. We're sorry for the inconvenience, but we only had a limited amount of time and resources and this was one of the items we could not provide on this first release.

We do have LabVIEW modules (released last year) to help you familiarize yourself with the camera, and if you're using EasyC you can use the LabVIEW module to create a definition file to configure your camera in your code, but we do not have anything to help you simulate using the camera.

I'm not trying to rant here, I'm just looking for help and want you to know that it's not for lack of effort on my part. I want you to know I appreciate your frank comments - If there's anything that needs to be explained better or if you would like to recommend examples on how to do something or if something just isn't right then I would love to know!

Thanks!
-Danny

michael714
01-15-2007, 12:53 PM
Thanks Danny. Your responses made the situation much more clear. There were two things that mislead me into believing that the LabVIEW software would allow us to work as a standalone simulator. One the statement in the software oveview which basically says, "you can use the LabVIEW software as a standalone simulator" and, two, the fact that FIRST sent us the LabVIEW software with no DAQ cable.

Fortunately, a local IEEE member says he has a USB 6008 cable that we can borrow and I'm going to see what I can do to use our Vex USB/serial converter cable for interfacing between our LabVIEW computer and the FRC dashboard.

Also, thank you for pointing out where in the tutorial to look for the info about using the FRC toolkit by itself with no dashboard and no DAQ- regardless of it's utility. I did go through the PowerPoint tutorial and the PDF tutorial, but I only started the video tutorials because they said you had to go through the PowerPoint first. And, in the PowerPoint, I couldn't figure out how to set LabVIEW up to actually go down Track B (simulated input).

I still think that it would be nice to be able to set LabVIEW up as a pure simulator, if for no other reason than being able to get used to it without having to have the robot present.

Again, thanks for your help.

Danny Diaz
01-15-2007, 03:47 PM
Thanks Danny. Your responses made the situation much more clear. There were two things that mislead me into believing that the LabVIEW software would allow us to work as a standalone simulator. One the statement in the software oveview which basically says, "you can use the LabVIEW software as a standalone simulator" and, two, the fact that FIRST sent us the LabVIEW software with no DAQ cable. The first part is probably one of those dilbert-ish comedies; I honestly don't know who wrote that, I wasn't in the loop on that one and I designed the system (WPI grad student Matt Krolak implemented it). It was probably all just a diabolical scheme from one of those Marketing people :rolleyes:.

The second is one that I'm not really following - why do you need a DAQ cable without a USB-DAQ device? From the rest of your explaination (esp. the part about the 6008) you probably mean the full device and all, since the cable on the DAQ is just a regular USB cable... The 6008 will work fine for the modeling toolkit; unless you're analyzing sensor feedback from a real sensor you shouldn't need the resolution and data rates of the 6009 (48kS/s on the 6009 versus 10kS/s on the 6008). And as far as that's concerned, you could even use the IFI RC itself with LabVIEW to model the sensors - one of the user bytes updates at 40Hz, which might be enough to get at least an *idea* of what the sensor is doing; the DAQ allows you to see the sensor output at a much finer resolution.

Also, thank you for pointing out where in the tutorial to look for the info about using the FRC toolkit by itself with no dashboard and no DAQ- regardless of it's utility. Did I do that? I don't think the tutorial, IIRC, covers the "not using the Dashboard" case - the only difference being that you can control the PWM1 and PWM2 controls with slider bars in the non-Dashboard environment so you can see how your model reacts to movement and such without having the controller present. The Motor Controller VIs really just read the dashboard information through the Dashboard Provider anyway, so modifying the sliders are a real benefit when you want really specific control (or if you want to "script" the control of the robot).

I did go through the PowerPoint tutorial and the PDF tutorial, but I only started the video tutorials because they said you had to go through the PowerPoint first. And, in the PowerPoint, I couldn't figure out how to set LabVIEW up to actually go down Track B (simulated input). The "Learning LabVIEW and DAQ in 3 Hours" course really takes more than 3 hours, and it requires you to install a bunch of stuff you don't get when you don't get a DAQ (real smart, eh?). You can download the Driver CD Bundle (ftp://ftp.ni.com/pub/frc/DriverCD.zip) for LabVIEW 8.2 and install it, but I would only recommend downloading and installing it if you REALLY want to do the "LabVIEW in 3 hours" course. Otherwise that's a 1.2GB download you really don't need. I do recommend going through the course to learn LabVIEW, but fortunately we designed the toolkit using Express VI technology that requires minimal LabVIEW programming to use; you can probably learn most of what you need to know by watching the tutorials. ;)

I still think that it would be nice to be able to set LabVIEW up as a pure simulator, if for no other reason than being able to get used to it without having to have the robot present. You mean the controller - the simulator is designed so you don't need the robot present! However, the simulation toolkit was designed to give the programmers a test bed to work with to develop code prior to the robot being finished - so the programmers could test and "see" what the code would do to a "real" robot if it were connected to the controller.

-Danny

robs
01-19-2007, 01:04 PM
First, is there any written documentation - even just based on the videos ? When might the 3rd video tutorial be coming along ?

As I build up my robot with the various components provided for the simulator I'm left with a few questions, the are:

Is there anywhere on-line where I would find some reasonable parameters for the kit motors?

I'm attempting to simulate a robot arm and I'm not sure on to include the dynamics for the arm into the simulation. How would I do this.

Rob Steele

Danny Diaz
01-19-2007, 02:22 PM
First, is there any written documentation - even just based on the videos ? When might the 3rd video tutorial be coming along ? Not yet I'm afraid, for now the videos are the de-facto documentation for this product. I have all of the slides for the video, so it might be sometime later that I'll be able to compile everything into a printable document.

Is there anywhere on-line where I would find some reasonable parameters for the kit motors? I got a preview of the third tutorial, and it has an excel spreadsheet with all the motor configuration parameters in it. I'm trying to get either a preview "sneak peek" of the 3rd tutorial posted or the actual excel spreadsheet to share with you guys. Check back here real soon and I'll post anything as soon as I get my hands on it.

I'm attempting to simulate a robot arm and I'm not sure on to include the dynamics for the arm into the simulation. How would I do this. Justin Davis, another NI engineer volunteering to work on this project (all of us at NI are working on this on a volunteer basis - yay volunteers! - we all have our "real jobs" we're also doing), is creating a fairly thorough example for you showing you how to simulate dynamics like this. Expect it within a few days.

-Danny