Go to Post Cheaters never win, winners never cheat. :) - Amanda Morrison [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #76   Spotlight this post!  
Unread 29-09-2008, 22:33
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,569
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Programming with the 2009 controller

Making procedural steps may be against the flow of labview, but that's exactly what many folks will need to do to program autonomous.

To program teleop, you don't need it - but I would guess that 90%+ of the good auton's out there use a state machine or a sequence of some sort. Go to location 1, check situation, go to location 2, and so on.

Conceptually, perhaps one of the NI reps can answer this question. Hopefully it isn't in the NDA since it's pretty general. Will we have a general "loop" setup like the current controller where specific loops are run at a specific and documented rate, or will we have to use timers of our own to control the update rates of variables that need calculation (like distance error, etc).
  #77   Spotlight this post!  
Unread 30-09-2008, 08:57
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,766
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: Programming with the 2009 controller

While LV expressions are based on dataflow, it is not a pure dataflow language, and since many real-world problems require state, LV has numerous mechanisms for maintaining state. Of course the parallel nature of LV means that it is important that you access the state safely.

As for loop timing, there is not a hardcoded schedule that everything else is bound to. In our prototype bots, we've often built loops that run in parallel at rates that match their task -- comms and joystick at 25Hz, servos at 50, motor updates at 100, camera at 10, etc. LV and C/C++ have different ways of doing this, but you have the flexibility of different rates.

You can of course put tasks in the same loop and try to run them at the higher speed, but you now have other choices.

The communication between the loops is usually a small set of variables, notifiers, queues, or other mechanisms for data transfer. It may be useful to think of them like registers between PICs if you want.

To calculate distance or otherwise factor in time, you will have access to high resolution clocks, which should give better results than assuming loop rates never wander.

Greg McKaskle
  #78   Spotlight this post!  
Unread 30-09-2008, 09:43
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,569
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Programming with the 2009 controller

That's great information.

People can now starting thinking about the structure of their program.

Each sensor is going to be polled at a rate specific to that sensor. So we'lll define that rate and compare it to a timer. That's not something my team ever worried about in the past - we simply polled all the sensors at the slow loop rate since we never had issues with it. This will lead me to a nice discussion about update rates of each component that we use. We can also write a very short VI that calculates the next timer value for an "update" for each component as a starting point for the kids to learn.

Ok - next question. If we place the polling blocks in "parallel" (I assume that simply means next to each other rather than in a series string) can the hardware actually poll the sensors in parallel, or will it be qued up and poll each piece of hardware in series?
  #79   Spotlight this post!  
Unread 30-09-2008, 10:07
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 756
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Programming with the 2009 controller

Quote:
Originally Posted by pollyproof12 View Post
so let me get this right. They will give us default vi to modify?
The LabvVIEW installation disks that come with the competition kit will already know how to build a FRC-cRIO project. So instead of saying "New Vi" you will say "New FRC cRIO project"

That project will build and deploy to the robot and work just like the "Default programs" of past years.

This base project can then be modified to your hearts content to build custom robot capabilities. There is also a large set of "custom" vi's created to support typical FRC components. The best thing is that you can drill down into these and see how they were built, and learn LabVIEW skills the same we learn most programming.

Note: the cRIO will probably be loaded with this program out of the box, so once wired up it should run without any software changes (just like past years)

Go to this forum to ask question of the teams currently beta testing the new hardware/software.

http://forums.usfirst.org/forumdisplay.php?f=743

There is not much there yet because people aren't asking questions (like yours).
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
  #80   Spotlight this post!  
Unread 30-09-2008, 10:26
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 756
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Programming with the 2009 controller

Quote:
Originally Posted by Tom Line View Post
Making procedural steps may be against the flow of labview, but that's exactly what many folks will need to do to program autonomous.

To program teleop, you don't need it - but I would guess that 90%+ of the good auton's out there use a state machine or a sequence of some sort. Go to location 1, check situation, go to location 2, and so on.
I found that this basic primer was helpfull. It demostrates some of the basic program structures that are available... including typical loops, case structures, State machines and timing elements.

http://zone.ni.com/devzone/cda/tut/p/id/7466

Just watching each video game me a starting place for thought.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
  #81   Spotlight this post!  
Unread 30-09-2008, 22:00
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,766
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: Programming with the 2009 controller

Quote:
Originally Posted by Tom Line View Post
That's great information.
Ok - next question. If we place the polling blocks in "parallel" (I assume that simply means next to each other rather than in a series string) can the hardware actually poll the sensors in parallel, or will it be qued up and poll each piece of hardware in series?
Yes, next to each other. You can have common inputs going into the loops, common outputs coming from the loops, but if one loop feeds the other through a dataflow wire, the downstream loop cannot begin until the upstream loop completes and hands over the data.

The parallel loops are internally scheduled using a pool of threads, typically 4 per processor in the system. This means that if a loop calls into some code the suspends the thread waiting for an operation to complete, a parallel loop can be scheduled on a parallel thread to fill the void. Or, most of the I/O in LV is built using nonblocking APIs, and that means that even the original thread is available to do work while the first loop's task is in progress. A good example of this is network communications. Doing a read with a timeout of 100ms means dependent nodes will wait for the results of the read. It doesn't mean that parallel code can't borrow the thread and make progress while the TCP stack does its job.

And of course on truly multicore machines, the loops really can run in parallel, even the contents of the loop can be run in parallel to the extent that dataflow allows.

Greg McKaskle
  #82   Spotlight this post!  
Unread 04-10-2008, 07:56
flightofone flightofone is offline
Registered User
AKA: John Clayton
FRC #2104 (Colonel Robotics)
Team Role: Teacher
 
Join Date: Dec 2006
Rookie Year: 2007
Location: South High, Worcester, MA
Posts: 40
flightofone is just really niceflightofone is just really niceflightofone is just really niceflightofone is just really niceflightofone is just really nice
Send a message via AIM to flightofone
Re: Dumb question - Java?

I teach a programming class that prepares students for the AP Test, which is all Java. Many of the students are interested in doing the robotics team. Ideally, I'd like to have the class work on programming the FRC controller in Java instead of having them learn a different language that won't help their AP Test preparation. Has anyone been able to program the new controller using Java? Any thoughts on how well it would work and how to go about it?
__________________
There's a fine line between fishing and just standing on the shore like an idiot. - Stephen Wright
________________________________________
2007 UTC Regional - Finalists (thanks 25 & 176)
  #83   Spotlight this post!  
Unread 04-10-2008, 09:34
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Dumb question - Java?

Quote:
Originally Posted by flightofone View Post
I teach a programming class that prepares students for the AP Test, which is all Java. Many of the students are interested in doing the robotics team. Ideally, I'd like to have the class work on programming the FRC controller in Java instead of having them learn a different language that won't help their AP Test preparation. Has anyone been able to program the new controller using Java? Any thoughts on how well it would work and how to go about it?
The cRIO does not currently support a Java environment, and I know of no plans to port Java to it. To paraphrase Greg, the most important language a programmer will learn is their second one - I couldn't agree more.

Teaching them C++ or LabVIEW would probably be more effective for their AP Java than you would think.

That being said, I don't think any one would stop you if you did port Java to the cRIO.
  #84   Spotlight this post!  
Unread 05-10-2008, 16:34
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Dumb question - Java?

Perhaps the one advantage to using Java in this situation is that it might make it easier to create an emulator for your robot. However, being interpreted, it would be considerably slower. C++ really is similar enough to Java that they should be able to read and understand it right off. Labview, while there isn't the excess of (free) resources to help you with it, is quite useful in that you don't have to look through a manual to learn it, and it handles a lot of datatype conversions automatically.
Sure, go ahead and use Java, but consider giving them the option of using another language as well.

The other option, of course, is just interpreting it when you compile. This could introduce some translation issues, but I doubt there'd be many, considering the similarities. For porting Java to the cRIO, you could start with a Linux OS, and then make it open up Konqueror and run everything as applets. The advantage of Java is that it can be used on any system. The advantage of programming for FRC is you know exactly the specifications of the computer you're dealing with, and you don't have to deal with any other systems.

Anyways, it's your choice if you want to put the work into it. Considering these are normally used for industrial applications, I'm pretty sure you'd be the first to do it.
__________________
-- Marshal Horn
  #85   Spotlight this post!  
Unread 06-10-2008, 12:25
BLAQmx's Avatar
BLAQmx BLAQmx is offline
Software Engineer
no team (National Instruments)
Team Role: Engineer
 
Join Date: Sep 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 100
BLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of light
Re: Programming with the 2009 controller

cRIO-FRC Training Video: Joystick Motor Control in 10 minutes

I'll let one you guys create a new thread for this video if it seems warranted.

This is the first installment of cRIO-FRC training being produced by National Instruments. Expect more videos like this as well as text companion material in the next couple of weeks.

FIRST Robotics Competition: Joystick Motor Control in 10 Minutes

Please post feedback! We want to make our training material the best possible.


Cheers,
Mark
NI FIRST Support
__________________
NI FIRST Community: Where to go for LabVIEW, Wind River, cRIO-FRC, and NXT support.
  #86   Spotlight this post!  
Unread 06-10-2008, 19:25
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Programming with the 2009 controller

Just a quick question, what value is considered full speed? (255? 1.0?)
__________________
-- Marshal Horn
  #87   Spotlight this post!  
Unread 06-10-2008, 19:33
BLAQmx's Avatar
BLAQmx BLAQmx is offline
Software Engineer
no team (National Instruments)
Team Role: Engineer
 
Join Date: Sep 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 100
BLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of light
Re: Programming with the 2009 controller

The Set Speed input's range is -1.0 to 1.0. So full speed (+) would be 1.0.
__________________
NI FIRST Community: Where to go for LabVIEW, Wind River, cRIO-FRC, and NXT support.
  #88   Spotlight this post!  
Unread 08-10-2008, 13:22
ShotgunNinja's Avatar
ShotgunNinja ShotgunNinja is offline
Programming Mentor, FRC 4247
AKA: Nicholas Iannone
FRC #4247 (CougarBOTS)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Milwaukee, WI
Posts: 160
ShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the rough
Re: Programming with the 2009 controller

Is there a compiler or library that will allow this supposed "C++ support"? Because I really don't want to have to relearn a new IDE, and run the risk of breaking/losing the computer with the singular licensed IDE copy (which we did last year). I want something command-line based, that will let me use something like Code::Blocks or Dev-C++, if properly configured. Is there something like this out there?
__________________
Team #2970 Alum
Team #1652 Alum
2006: School Mascot for Team 1652
2007-2008: Programmer for Team 1652 (Robot Mafia)
2009: Programmer on Team 1652 (Robot Mafia), Programmer on Team 2970 (eSchool eBots)
2010-2016: Volunteer, Wisconsin Regional
2017: Programming Mentor, FRC 4247 (CougarBOTS, Obama SCTE, Milwaukee, WI)
  #89   Spotlight this post!  
Unread 09-10-2008, 13:24
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Programming with the 2009 controller

Quote:
Originally Posted by ShotgunNinja View Post
Is there a compiler or library that will allow this supposed "C++ support"? Because I really don't want to have to relearn a new IDE, and run the risk of breaking/losing the computer with the singular licensed IDE copy (which we did last year). I want something command-line based, that will let me use something like Code::Blocks or Dev-C++, if properly configured. Is there something like this out there?


Windriver Ecplipse for C++, I think?
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
  #90   Spotlight this post!  
Unread 09-10-2008, 16:48
pogenwurst pogenwurst is offline
Ubuntu User
AKA: Brian
FRC #2007 (Robots of the Round Table)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Duluth, GA
Posts: 78
pogenwurst is on a distinguished road
Send a message via AIM to pogenwurst
Re: Programming with the 2009 controller

Quote:
Originally Posted by Bomberofdoom View Post
Windriver Ecplipse for C++, I think?
The IDE is Wind River Workbench, which is based on Eclipse (3.3, I believe). The toolchain is a VxWorks-specific derivative of GCC.
Closed Thread


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
Purchasing the 2009 controller Tottanka FRC Control System 60 04-05-2008 19:44
How the heck do you use an XBOX360 controller with the chicklet?? waialua359 Control System 58 17-02-2008 12:43
Problem with the program downloaded to the controller itsme Programming 9 14-01-2007 12:12
Problem with the 2005 controller Guy_E Programming 10 18-12-2006 01:38
Programming The CMUcam for the Vex controller 987HighRoller Programming 3 24-06-2006 15:27


All times are GMT -5. The time now is 12:48.

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