Go to Post Safety is a practice, not a number. - Alan Anderson [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
  #1   Spotlight this post!  
Unread 11-04-2009, 23:54
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Team 2423 C++ Code

Since it seems to be all the rage, I'll announce the posting of our teams code for this year here on CD (of course, its actually been available since the middle of march... ). Some features:

- 4 independently steerable wheels in swerve drive
- 'CompassDrive' (created by a student on our team), which allows you to control the robot relative to the field using a gyro (ie, push the joystick in a direction and the robot moves that way).
- Maintenance routines using an interactive menu system on the Driver Station LCD
- Custom servos to control each wheel, with an interrupt-driven auto-calibrate system
- A consistent and working autonomous mode using the gyro to control our position relative to the field.
- We created a custom layered framework to support selectable control system types at the top layer, with a bottom layer that controls the bot based on speed/angle/rotation parameters.

Files are posted at http://www.virtualroadside.com/FRC/#Kwarqs2009

As a bonus, the code all compiles and works with my WPILib Test Harness, available at the same website. Unfortunately, I never got around to creating mechanisms to represent the encoders and such, so it doesn't look all that shiny. But you can see the menu system doing stuff in any case.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #2   Spotlight this post!  
Unread 12-04-2009, 00:16
Burmeister #279's Avatar
Burmeister #279 Burmeister #279 is offline
What Time Is It?
AKA: Nick Burmeister
FRC #0279 (TechFusion)
Team Role: Programmer
 
Join Date: Nov 2008
Rookie Year: 2007
Location: Toledo
Posts: 207
Burmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of light
Send a message via AIM to Burmeister #279
Re: Team 2423 C++ Code

Whether or not we use LabVIEW next year, I'm learning C and/or C++. i think my head exploded from lack of being able to read the code. then again, it is midnight... oh well. Good stuffs =)
__________________
WHAT TIME IS IT? TWO SEVEN NINE!!! [Team B =) ] Awards: 4 Safety, 2 Ind. Design, 2 Xerox, 1 Nat. Champs
2009 Buckeye Semi-Finalists (1014 & 695) || 2008 GLR Safety Award || 2006 GLR Safety Award
2005 Buckeye Regional Champs (67 & 274) & GM Industrial Design Award & Safety Award GLR Quarter Finalist & Xerox Creativity Award & Safety Award National Xerox Creativity Award & Curie Quarter Finalist (1126 & 180)
2004 Buckeye Delphi Driving Tomorrows Technology Award & Quarter Finalist GLR Champs Nationals Curie Division Finalist
2003 GLR GM Industrial Design Award || 2001 National Newton Division Winner & National Champions
2000 MI DaimlerChrysler Team Spirit Award
  #3   Spotlight this post!  
Unread 12-04-2009, 15:23
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Team 2423 C++ Code

Well, some of it is a bit complicated I suppose. Something to work on for next year.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #4   Spotlight this post!  
Unread 13-04-2009, 01:15
Burmeister #279's Avatar
Burmeister #279 Burmeister #279 is offline
What Time Is It?
AKA: Nick Burmeister
FRC #0279 (TechFusion)
Team Role: Programmer
 
Join Date: Nov 2008
Rookie Year: 2007
Location: Toledo
Posts: 207
Burmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of light
Send a message via AIM to Burmeister #279
Re: Team 2423 C++ Code

Its not that its too complicated, its just that i'm not literate in C++, just as i'm sure teams who only use C++ would have trouble with reading LabVIEW.
__________________
WHAT TIME IS IT? TWO SEVEN NINE!!! [Team B =) ] Awards: 4 Safety, 2 Ind. Design, 2 Xerox, 1 Nat. Champs
2009 Buckeye Semi-Finalists (1014 & 695) || 2008 GLR Safety Award || 2006 GLR Safety Award
2005 Buckeye Regional Champs (67 & 274) & GM Industrial Design Award & Safety Award GLR Quarter Finalist & Xerox Creativity Award & Safety Award National Xerox Creativity Award & Curie Quarter Finalist (1126 & 180)
2004 Buckeye Delphi Driving Tomorrows Technology Award & Quarter Finalist GLR Champs Nationals Curie Division Finalist
2003 GLR GM Industrial Design Award || 2001 National Newton Division Winner & National Champions
2000 MI DaimlerChrysler Team Spirit Award
  #5   Spotlight this post!  
Unread 13-04-2009, 09:43
Shadow503's Avatar
Shadow503 Shadow503 is offline
printf("\r\n Moo!");
no team
Team Role: Human Player
 
Join Date: Mar 2007
Rookie Year: 1991
Location: na
Posts: 92
Shadow503 will become famous soon enoughShadow503 will become famous soon enough
Re: Team 2423 C++ Code

Quote:
Originally Posted by Burmeister #279 View Post
Its not that its too complicated, its just that i'm not literate in C++, just as i'm sure teams who only use C++ would have trouble with reading LabVIEW.
True story. When I look at the behind the scenes working of a VI I only see blocks and lines! xD

While LabView is great for automation and process control environments, if you're looking for a career as a programmer, learning C++ will help you along much further. While you're learning, make sure to learn basic Object Oriented concepts like encapsulation, minimization of coupling, and ect. as these will greatly increase the quality of your code in all languages.

If your school offers dual enrollment at a local college, I highly recommend you look into that option. Not only will you get a strong background in the language, but you'll already have credits on your college transcript.
  #6   Spotlight this post!  
Unread 13-04-2009, 14:16
Burmeister #279's Avatar
Burmeister #279 Burmeister #279 is offline
What Time Is It?
AKA: Nick Burmeister
FRC #0279 (TechFusion)
Team Role: Programmer
 
Join Date: Nov 2008
Rookie Year: 2007
Location: Toledo
Posts: 207
Burmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of light
Send a message via AIM to Burmeister #279
Re: Team 2423 C++ Code

I'm definately getting into C(++) but at the moment i'm too busy to get a class and/or get into learning it myself however next year i'm planning on jumping into it.

by the way, go to the front panel of your robot's main code and go to View-->VI Hierarchy. All of those are necessary to run the robot and i don't know if its the same with C++ but just wow.
__________________
WHAT TIME IS IT? TWO SEVEN NINE!!! [Team B =) ] Awards: 4 Safety, 2 Ind. Design, 2 Xerox, 1 Nat. Champs
2009 Buckeye Semi-Finalists (1014 & 695) || 2008 GLR Safety Award || 2006 GLR Safety Award
2005 Buckeye Regional Champs (67 & 274) & GM Industrial Design Award & Safety Award GLR Quarter Finalist & Xerox Creativity Award & Safety Award National Xerox Creativity Award & Curie Quarter Finalist (1126 & 180)
2004 Buckeye Delphi Driving Tomorrows Technology Award & Quarter Finalist GLR Champs Nationals Curie Division Finalist
2003 GLR GM Industrial Design Award || 2001 National Newton Division Winner & National Champions
2000 MI DaimlerChrysler Team Spirit Award
  #7   Spotlight this post!  
Unread 13-04-2009, 18:56
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Team 2423 C++ Code

Yeah, if you download the code for WPILib, there is quite a bit of infrastructure necessary to make it all work. Then also consider that the FPGA (which does the heavy lifting in LabView and C++) is a ton of different modules written using LabView, and its a pretty complex system this year.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #8   Spotlight this post!  
Unread 20-04-2009, 19:58
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Team 2423 C++ Code

Quote:
Originally Posted by virtuald View Post
Yeah, if you download the code for WPILib, there is quite a bit of infrastructure necessary to make it all work. Then also consider that the FPGA (which does the heavy lifting in LabView and C++) is a ton of different modules written using LabView, and its a pretty complex system this year.
I'm pretty sure the FPGA was designed using a hardware description language, like VHDL or Verilog. I'd be very impressed if LabView can do synthesizable hardware designs
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #9   Spotlight this post!  
Unread 20-04-2009, 21:46
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Team 2423 C++ Code

No, I'm 95% sure its done in LabView. http://www.ni.com/fpga/
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #10   Spotlight this post!  
Unread 20-04-2009, 21:47
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Team 2423 C++ Code

Quote:
Originally Posted by Shinigami2057 View Post
I'm pretty sure the FPGA was designed using a hardware description language, like VHDL or Verilog. I'd be very impressed if LabView can do synthesizable hardware designs
Be impressed. It does use VHDL as an intermediary, but the VHDL is generated from the LabVIEW program.

Last edited by Alan Anderson : 20-04-2009 at 21:50.
  #11   Spotlight this post!  
Unread 20-04-2009, 21:51
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Team 2423 C++ Code

As an update, we've added an embedded webserver to the robot, that has an interface you can use to change variables on the fly. I believe LabView has a similar capability (it was the inspiration for it), but you have to use LabView to use it. This just needs a web browser.

I'll be releasing the code for that shortly in a separate project, but its pretty sweet. Theres a demo posted here: http://www.chiefdelphi.com/forums/sh...ad.php?t=76928
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #12   Spotlight this post!  
Unread 21-04-2009, 23:59
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Team 2423 C++ Code

Quote:
Originally Posted by Alan Anderson View Post
Be impressed. It does use VHDL as an intermediary, but the VHDL is generated from the LabVIEW program.
Wow. Color me impressed! That's extremely interesting; thanks for the link!
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
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
2423 KwarQs: Robot Video AmoryG Robot Showcase 2 02-03-2009 20:38
2423 The KwarQs Picture #2 AmoryG Robot Showcase 9 22-02-2009 20:13
Code Declaration Window - Check Team in Code DtD C/C++ 3 20-01-2009 07:09
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28


All times are GMT -5. The time now is 01:13.

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