Go to Post "FIRST" is not a verb (yet - give us time, and we will see what happens). - dlavery [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
  #16   Spotlight this post!  
Unread 15-08-2014, 01:19
madhav's Avatar
madhav madhav is offline
Registered User
AKA: Madhav Gharmalkar
FRC #4276 (Viking Robotics)
Team Role: Communications
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Huntington Beach, CA
Posts: 37
madhav will become famous soon enough
Re: What base class do you use when programming?

Quote:
Originally Posted by Colby Skeggs View Post
We implement IgneousApplication.
Just looked at it. It looks pretty awesome, I might give it a try.
  #17   Spotlight this post!  
Unread 15-08-2014, 01:31
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: What base class do you use when programming?

RobotBase.
  #18   Spotlight this post!  
Unread 16-08-2014, 22:30
ArzaanK ArzaanK is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Mississauga, Ontario, Canada
Posts: 40
ArzaanK is an unknown quantity at this point
Re: What base class do you use when programming?

To start this year, we used Simple Template, but in the off season, and during the WVROX event, we used Command Based. Having a very small programming background, I thought the transition would be difficult, but it was a lot easier than I though. Moreover, there is a tool called RobotBuilder which makes programming in command based a lot easier, and very quick. It works really well, and it is easy to work with, and teach to others.

This playlist of videos really helped me get started.
https://www.youtube.com/playlist?lis...wtlgnvhGObeKzp
__________________
Arzaan Khairulla
Programmer/Driver
2013 Greater Toronto Regional East Winners with 1114 and 2056
2013 Galileo Division
  #19   Spotlight this post!  
Unread 19-08-2014, 05:39
MatthewC529 MatthewC529 is offline
Lcom/mattc/halp;
AKA: Matthew
FRC #1554 (Oceanside Sailors)
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2013
Location: New York
Posts: 39
MatthewC529 is on a distinguished road
Re: What base class do you use when programming?

Personally my background is in game development and thusly I am familiar... Very familiar with the game loop. So for me I find comfort in using IterativeBot. It is flexible in my opinion and I find it easy to implement event-based code and concurrency in some ways. Done right it is not spaghetti code at all.

IterativeBot is my choice.
__________________
Team 1554 -- Oceanside Sailors
  • 2013-2014 - Lead/Sole Programmer
  • 2014-2015 - Lead Programmer, President
  • 2015-? - Team 1554 Mentor
Independent Public Projects

Developer at Legend Zero LLC.
Java/C++ Programmer

Last edited by MatthewC529 : 19-08-2014 at 05:40. Reason: horrific spelling mistakes... phone keyboard
  #20   Spotlight this post!  
Unread 20-08-2014, 22:53
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 189
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: What base class do you use when programming?

Up until 2013 we used Iterative Robot. In 2013 we switched to Command Based. I don't envision us ever going back. It has encouraged OOP and it has been easy for the newer students to grasp. We are considering using RobotBuilder for 2015 because most of our students have very little OOP and we don't want them to be bogged down in writing classes and creating umpteen million files.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

  #21   Spotlight this post!  
Unread 22-08-2014, 13:40
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 305
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: What base class do you use when programming?

We have been using SimpleRobot base class since 2009 when C++ and the cRIO became available. Because it gives us full control and flexibility in how we handle the robot operations. We implement an architecture similar to the CommandBase but of our own design.

We have classes representing the main robot systems which define an interface to:
[1] support the various tasks that will be requested by the operator and
[2] provide any information that will be needed by other classes, as well as
[3] a service function which is called each time through the main loop of teleop and autonomous to perform multi-step operations. [Note that none of the interface functions are allowed to perform operations which take significant processing time; they simply set a flag to start an operation or turn on a mode and return.]

Our TeleOp and Autonomous functions are basically loops which maintain the loop time (required for PID loops and other control systems) and make use of the interface defined by each class to facilitate the operation required... either based on an operator request (like pushing a button on the joystick) or based on the steps defined for the currently selected autonomous mode. Reusing the same class interface functions to perform operations in both modes allows our autonomous to come together very quickly and reliably after the testing is done for teleop.
__________________
  #22   Spotlight this post!  
Unread 27-08-2014, 13:21
jfitz0807 jfitz0807 is offline
Registered User
FRC #2877 (Ligerbots)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Newton, MA
Posts: 67
jfitz0807 is an unknown quantity at this point
Re: What base class do you use when programming?

Would someone please explain the difference between a CommandBased robot and an IterativeRobot?

We went to java in 2012 and started with the RobotBuilder tool. It generated a code skeleton derived from IterativeRobot. The IterativeRobot class is contained in sunspotfrcsdk\lib\wpilibj.src\edu\wpi\first\wpilib j. I have not been able to find a CommandBased class in the wpilib.

The IterativeRobot is "command based" in the sense that on every iteration of the control loop, it executes any active commands. I'm not sure how a CommandBased robot would be any different.

As for multi-threading, we can get into a theoretical discussion on the merits of multi-threading on a single CPU platform. In general, I prefer the explicit control of keeping things single threaded and using the setInterruptible or cancel methods if I need to preempt a running command.

But this would be a discussion for a separate thread (so to speak).
  #23   Spotlight this post!  
Unread 27-08-2014, 13:22
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,722
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: What base class do you use when programming?

Quote:
Originally Posted by jfitz0807 View Post
Would someone please explain the difference between a CommandBased robot and an IterativeRobot?

We went to java in 2012 and started with the RobotBuilder tool. It generated a code skeleton derived from IterativeRobot. The IterativeRobot class is contained in sunspotfrcsdk\lib\wpilibj.src\edu\wpi\first\wpilib j. I have not been able to find a CommandBased class in the wpilib.

The IterativeRobot is "command based" in the sense that on every iteration of the control loop, it executes any active commands. I'm not sure how a CommandBased robot would be any different.

As for multi-threading, we can get into a theoretical discussion on the merits of multi-threading on a single CPU platform. In general, I prefer the explicit control of keeping things single threaded and using the setInterruptible or cancel methods if I need to preempt a running command.

But this would be a discussion for a separate thread (so to speak).
The Command Based structure uses the IterativeRobot base class with extra functionality built around it. It sounds like you have been using the Command Based structure.
  #24   Spotlight this post!  
Unread 27-08-2014, 13:32
jfitz0807 jfitz0807 is offline
Registered User
FRC #2877 (Ligerbots)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Newton, MA
Posts: 67
jfitz0807 is an unknown quantity at this point
Re: What base class do you use when programming?

Thank you!
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


All times are GMT -5. The time now is 17:59.

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