Go to Post What? Thinking is required? I certainly hope not! If so, I'm toast! - Robert Cawthon [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 06-05-2009, 18:40
Charlie's Avatar
Charlie Charlie is offline
Registered User
AKA: chuck
FRC #0247 (DaBears)
Team Role: Programmer
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Berkley, MI
Posts: 11
Charlie is an unknown quantity at this point
Question Rapidly editable Autonomous Mode

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
__________________
The sad thing about Americans as a nation is that we spend billions more per year on sending our youth off to die than we do on teaching them how to make our world a better place for themselves.


Last edited by Charlie : 06-05-2009 at 19:37.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-05-2009, 13:14
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
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
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
  #3   Spotlight this post!  
Unread 07-05-2009, 13:14
Woodie Flowers Award
Ken Patton Ken Patton is offline
purple
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: Jul 2001
Rookie Year: 1997
Location: Pontiac, MI
Posts: 338
Ken Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond reputeKen Patton has a reputation beyond repute
Re: Rapidly editable Autonomous Mode

Quote:
Originally Posted by Charlie View Post
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
We were unable to get ours working, due to not enough time to learn how to read the file (including not knowing where to put it on the cRio). Instead we used an array in disabled.vi. This worked very well, and we were able to have many autonomous choices to switch between (if you paid close attention in the last four runs at the MSC, we never used the same one twice).

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
Reply With Quote
  #4   Spotlight this post!  
Unread 07-05-2009, 13:27
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
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)
__________________
Get yer robot source code here!
Reply With Quote
  #5   Spotlight this post!  
Unread 07-05-2009, 13:30
Stuart's Avatar
Stuart Stuart is offline
#include coffee.h
FRC #1745 (P51- Mustangs)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Dallas, TX
Posts: 414
Stuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond repute
Send a message via AIM to Stuart
Re: Rapidly editable Autonomous Mode

I know that 1296 fed their Crio a text file of sorts via the FTP.
__________________
Proud mentor of Team #1745 the P-51 Mustangs

If at first it doesn't work, use a hammer.
If that doesn't work, use a bigger hammer.
Reply With Quote
  #6   Spotlight this post!  
Unread 07-05-2009, 15:18
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 10-05-2009, 07:46
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #8   Spotlight this post!  
Unread 13-05-2009, 08:32
Charlie's Avatar
Charlie Charlie is offline
Registered User
AKA: chuck
FRC #0247 (DaBears)
Team Role: Programmer
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Berkley, MI
Posts: 11
Charlie is an unknown quantity at this point
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
__________________
The sad thing about Americans as a nation is that we spend billions more per year on sending our youth off to die than we do on teaching them how to make our world a better place for themselves.

Reply With Quote
  #9   Spotlight this post!  
Unread 13-05-2009, 09:38
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Rapidly editable Autonomous Mode

Quote:
Originally Posted by Charlie View Post
the code is done and waiting to be tested on the robot, will post as soon as i get out of school
On the LV team, we refer to code that has been written but not tested as "All but done". It could really be done, but since there is no proof, it is more likely that it is just beginning. When relying on other people's code, it is useful to be able to tell the difference.

Greg McKaskle
Reply With Quote
  #10   Spotlight this post!  
Unread 13-05-2009, 18:55
Charlie's Avatar
Charlie Charlie is offline
Registered User
AKA: chuck
FRC #0247 (DaBears)
Team Role: Programmer
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Berkley, MI
Posts: 11
Charlie is an unknown quantity at this point
Post Re: Rapidly editable Autonomous Mode

ok here it is

if you notice any problems or errors let me know or any suggestions to improve it
Attached Files
File Type: zip AUTO DOC.zip (446.8 KB, 60 views)
__________________
The sad thing about Americans as a nation is that we spend billions more per year on sending our youth off to die than we do on teaching them how to make our world a better place for themselves.

Reply With Quote
  #11   Spotlight this post!  
Unread 13-09-2009, 10:23
kramarczyk's Avatar
kramarczyk kramarczyk is offline
is getting his kicks.
AKA: Mark Kramarczyk
FRC #3096 (Highlanders)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Sterling Heights, MI
Posts: 602
kramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond repute
Re: Rapidly editable Autonomous Mode

Quote:
Originally Posted by Greg McKaskle View Post
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.

Greg McKaskle
I noticed that LV has a set of FTP tools on the menu under Addons -> Internet -> FTP, but when I try to drop them into the VI they cannot find all the requisite pieces to run. The missing location seems to be <vilib>:\addons\internet\utils

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?
__________________
Mark

Brick walls are for other people. - Randy Pausch
Reply With Quote
  #12   Spotlight this post!  
Unread 13-09-2009, 13:06
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #13   Spotlight this post!  
Unread 13-09-2009, 21:07
Luke Pike's Avatar
Luke Pike Luke Pike is offline
Programmer
FRC #1501 (THRUST)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Huntington
Posts: 114
Luke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to all
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.
__________________
Twitter Profile
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 10:40.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi