|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Are there any teams out there that you know of that used a non-compiled file to feed their autonomous vi values?
If how did you get it onto the cRIO, and what directory on the cRIO did you store it in? I plan on using a text file with the values Last edited by Charlie : 06-05-2009 at 19:37. |
|
#2
|
||||
|
||||
|
Re: Rapidly editable Autonomous Mode
This forum thread at NI.com tells how to do file I/O using WindRiver, and how to get the files on to and off of the cRIO. If you want to use LabVIEW, you can similarly use the standard file I/O functions; documentation on them can be found here. For more information on the specifics of file paths, getting the files on and off the cRIO, etc, have a look around the existing thread on Chief Delphi, this topic has been discussed several times before.
--Ryan |
|
#3
|
||||
|
||||
|
Re: Rapidly editable Autonomous Mode
Quote:
The non-compiled solution is very high on our list of summer projects. we definitely want this to be ready for 2010. We liked using LabView and will most likely continue to do so, but we didn't like the long build times. Ken |
|
#4
|
|||
|
|||
|
Re: Rapidly editable Autonomous Mode
What we found is that for our robot there were a fairly small number of "optimum" paths--go directly to our outpost, go directly to our fueling station, go the the middle of the field, etc., and a lot of "suboptimal" paths that we could use to get to the same position if the optimal path was blocked. SInce it would be hard to determine a suboptimal path ahead of time, we used a combination of a three-position switch(for our optimal) and a bug algorythm(for our suboptimal)
|
|
#5
|
||||
|
||||
|
Re: Rapidly editable Autonomous Mode
I know that 1296 fed their Crio a text file of sorts via the FTP.
|
|
#6
|
||||||
|
||||||
|
Re: Rapidly editable Autonomous Mode
The code that 1629 released as part of the beta test reads and writes to files. The thread about it is here: http://forums.usfirst.org/showthread.php?t=10274
Like Ryan said, it uses the standard file I/O VIs, so you can use any LabVIEW tutorial for file I/O to learn how you do it, and you can prototype it on your computer (very handy). For the file path, use c:\ and it will put it on the root directory of the cRIO, which you can access by FTPing to the cRIO. |
|
#7
|
|||
|
|||
|
Re: Rapidly editable Autonomous Mode
The long build times will definitely be reduced. It was in work just before Atlanta, but too risky to release at that point.
The file solution has two flavors. Number one downloads a description file, could be XML or lines of text or binary. Choose your own location, /tmp is a reasonable location I think, and then ftp the file using an ftp client. You can write tools to put a nicer UI on the ftp operations if you like. The second downloads code that is dynamically called. For LV that would mean downloading a VI and then changing either the framework or the autonomous VI to dynamically call the VI by reference. Again, you ftp the file to the cRIO to a known location, and the dynamic call code will use an Open VI Reference with a path to your VI, and will then invoke the run method on the VI. For the C++ users, this is equivalent of downloading a different .out. I haven't done this yet, but it should be possible. Greg McKaskle |
|
#8
|
||||
|
||||
|
Re: Rapidly editable Autonomous Mode
the code is done and waiting to be tested on the robot, will post as soon as i get out of school |
|
#9
|
|||
|
|||
|
Re: Rapidly editable Autonomous Mode
Quote:
Greg McKaskle |
|
#10
|
||||
|
||||
|
Re: Rapidly editable Autonomous Mode
Quote:
For the FTP-put vi the specific missing files are... utils\tcputil.lib\TCP Write Stream.vi utils\tcputil.lib\TCP Create Arbitary Listener.vi utils\tcputil.lib\TCP Read xTP Reply.vi utils\inifile.lib\Read Internet INI.vi So, are these files supposed to be in the FRC version and I have somehow goofed my library? I don't think I screwed anything up, but this is software and I am a mechanical monkey. If they are not supposed to be there then why are the menus included? |
|
#11
|
|||
|
|||
|
Re: Rapidly editable Autonomous Mode
That is just what I was wondering the other day when I tried to use them. I think it was an oversight, and some of the dependencies were not shipped with the FRC version. I expect them to be there next year.
Greg McKaskle |
|
#12
|
||||
|
||||
|
Re: Rapidly editable Autonomous Mode
I learned a little while ago that LabVIEW can flatten any datatype (numbers, arrays, clusters) into an XML string based on the LabVIEW XML schema and unflatten the XML string back into the original datatype.
You could make a vi on your computer that creates your autonomous mode (a cluster typedef that your robot code can use in autonomous, values for drive motors and the like) based on user input and write it to an xml file on your computer. Then, FTP the file onto the cRIO and have your robot code read in the file using the "Read XML File" vi and unflatten the resulting string with the "Unflatten XML String" vi, using your typedef to tell it what datatype to create. I'd make a picture demonstrating it, but I don't have our team laptop right now. Search ni.com and I'm sure you could find an example of what I'm talking about. I haven't done this, but it could be an effective way to change the autonomous mode without having to recompile and download. |
|
#13
|
||||
|
||||
|
ok here it is
if you notice any problems or errors let me know or any suggestions to improve it |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Editable Mesh vs. Editable Poly? | Kevin Thorp | 3D Animation and Competition | 13 | 30-01-2007 17:37 |
| Autonomous Mode | Yellow Eyes | Programming | 2 | 18-02-2004 21:16 |
| Autonomous Mode | David Bryan | Programming | 1 | 21-01-2003 21:15 |
| autonomous mode? | bigwalt | Technical Discussion | 1 | 21-01-2003 01:14 |