Go to Post Playing fields outdoors in the snow and the only field faults were when you ran out of gas!...ahh the old days - ExTexan [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-27-2009, 06:11 AM
spartango spartango is offline
Registered User
FRC #0192 (GRT)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Palo Alto, CA
Posts: 43
spartango is an unknown quantity at this point
Announcing: GRTFramework from team 192

With FRC Java's release just around the corner, I am proud to announce and release what we at team 192 have dubbed the GRTFramework!

Built on WPILibJ in Java, the GRTFramework is the system we will/have been using to develop high level and modular code for our robots..here's the idea:

The GRTFramework abstracts robot components away to entire mechanisms as machined by team members--think an arm, a shooter, an entire wheeled-base..
The GRTFramework manages the execution of code in parallel so that developers can write their own little modules without worrying about what executes their code or about the availability of hardware.
The GRTFramework provides a sort of Model-View-Controller pattern for robot development, allowing developers to focus on logic(which would sit in the controllers), which sits separate from hardware abstractions.
The GRTFramework ensures availability and safety of hardware resources BEHIND the scenes.
And much more...

The GRTFramework is open-sourced under the GPL v2 and is hosted at google code:
http://code.google.com/p/grtframework/
There you will find the source, documentation(Javadoc &c), and even example code written for GRT192s latest robot project.
http://code.google.com/p/grtframework/wiki/BriefUsage
Describes how it should be used.

While 100% functional, its certainly not finished and perfectly packaged, but the sooner people use it, the better!

Our hope:
if your team and many other teams can use the GRTFramework for programming 2010 FRC robots, we can work together towards more sophisticated robots--rookie teams can get around the classic troubles of getting a robot to drive where veteran teams can move toward fully autonomous robots. If FRC programming can be more focused around algorithms and logic, we can have smarter robots that are easier to program.

Please give this a shot and let us know what you think. If you are interested in committing, we'd love to have your help! If you find a bug, please post it too!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-25-2010, 10:20 PM
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: Announcing: GRTFramework from team 192

Cheers to implementing and async mvc.

I do have a few comments about the architecture.

here's my ideas summed up into bullets

-models would contain a list of all the components (specific actuators, mechanisms...)
-controllers would always talk through commands
-view (robot) would register models on the fly and controllers would
get them using the abstract factory pattern

with explanation:

First off the MainRobot class contains a RobotBase however it does not
interact with the mech directly, but rather through the controller. Thus it
is my belief that the MainRobot should not contain the RobotBase but rather
it should be responsible for registering the RobotBase with the controller,
(which it already does, but as it contains the base too it is a little confusing)

Also with regards to the model, it does not look like you really implement a
model per se. The easiest way to think of the model is as a database. So for
each type of key object(ie mechanisms, actuators, sensors...) you would have
a factory that contains these and is able to product the specific model you
want based on how the robot registers
(take a look at the abstract factory pattern)

and finally with regard to the async, which is awesome! however it is only implemented for the actuators. I believe that the same should be done for
anything that has a model, and definitely for the mechanisms. In a prior
season back when we were still using C our team implemented an
architecture using a maneuver-mechanism-actuator structure. Your async
design would build upon this allowing for the robot to queue up mechanism
based maneuvers (ie raise arm, drive forward) and these maneuvers would
work separately from each other. Personally I think every time a controller is used it should use the command system you've set up.

I know this is a lot to take in and I hope it was some help
Reply With Quote
  #3   Spotlight this post!  
Unread 01-27-2010, 01:38 AM
spartango spartango is offline
Registered User
FRC #0192 (GRT)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Palo Alto, CA
Posts: 43
spartango is an unknown quantity at this point
Re: Announcing: GRTFramework from team 192

Thanks for your feedback!

Here's what we've done along the lines of some of the comments you've made, and some thoughts on what we will be doing going forward:

http://code.google.com/p/grtframewor...obot.java?r=41

We've been using MainRobot thus far as a place to initialize stuff and serve as a sort of starting point for the robot. Honestly the mechanisms need not be registered in MainRobot, but it was a bit nice to keep in mind that all these mechanisms were part of an abstraction of a big robot. not necessary...but no harm here either way.

You are right that we dont follow the strict MVC pattern...But we really actively separate abstractions of physical components from code that defines & decides actions from code that allows for control over the components in a major subsystem. We like to think that a Mechanism is a view(something you interact with), a Controller is a controller, and an actuator/sensor is a Model. Not really important in our view, however.

With regards to asynchronous operation--I'd direct you to the event system that we have in the GRT framework--this allows you to handle both sensor data and actuator operation completely asynchronously--you can send a command to an actuator, and be notified when it is done...and you can be notified when a sensor detects a certain situation, and act appropriately. In the public codebase, we do not include code for more global asynchronous "behaviors"--events in controllers or mechanisms--because these are very customized to the mechanisms a team develops and strategy that goes with them. Our team does handle events from mechanisms, however, and I would suggest that teams using the framework explore the possibility of writing their own events appropriate to the mechanisms they have(ie an ArmEvent or DriveTrainEvent).
Reply With Quote
  #4   Spotlight this post!  
Unread 01-31-2013, 11:28 AM
Azrathud's Avatar
Azrathud Azrathud is offline
Computer Nerd
AKA: Bryce Guinta
FRC #2945 (BANG)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Colorado
Posts: 24
Azrathud is on a distinguished road
Re: Announcing: GRTFramework from team 192

Quote:
Originally Posted by spartango View Post
With FRC Java's release just around the corner, I am proud to announce and release what we at team 192 have dubbed the GRTFramework!

Built on WPILibJ in Java, the GRTFramework is the system we will/have been using to develop high level and modular code for our robots..here's the idea:

The GRTFramework abstracts robot components away to entire mechanisms as machined by team members--think an arm, a shooter, an entire wheeled-base..
The GRTFramework manages the execution of code in parallel so that developers can write their own little modules without worrying about what executes their code or about the availability of hardware.
The GRTFramework provides a sort of Model-View-Controller pattern for robot development, allowing developers to focus on logic(which would sit in the controllers), which sits separate from hardware abstractions.
The GRTFramework ensures availability and safety of hardware resources BEHIND the scenes.
And much more...

The GRTFramework is open-sourced under the GPL v2 and is hosted at google code:
http://code.google.com/p/grtframework/
There you will find the source, documentation(Javadoc &c), and even example code written for GRT192s latest robot project.
http://code.google.com/p/grtframework/wiki/BriefUsage
Describes how it should be used.

While 100% functional, its certainly not finished and perfectly packaged, but the sooner people use it, the better!

Our hope:
if your team and many other teams can use the GRTFramework for programming 2010 FRC robots, we can work together towards more sophisticated robots--rookie teams can get around the classic troubles of getting a robot to drive where veteran teams can move toward fully autonomous robots. If FRC programming can be more focused around algorithms and logic, we can have smarter robots that are easier to program.

Please give this a shot and let us know what you think. If you are interested in committing, we'd love to have your help! If you find a bug, please post it too!
I know this is an old post, so does this framework still work? And if so, could you explain the networking code or give examples?
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
Team 192, Robot Lifting Teaser Joobacca Robot Showcase 7 02-02-2007 05:46 PM
Sync Magainze article about Gunn Robotics Team ... Do adults ruin the game? GRT 192 ducttapejason FIRST In the News... 2 08-10-2005 08:45 AM
Team 192 Animation submission Rysith 3D Animation and Competition 6 03-02-2004 01:08 PM
Thanks to Team 34 and Team 192 Mike Henry Thanks and/or Congrats 0 03-17-2002 09:58 PM


All times are GMT -5. The time now is 07:47 AM.

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