Go to Post so, i want the clue now, okay? is it bad that i am more interested in this years game than i am in taking my finals next week? - jwfoss [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 11 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 04-02-2015, 10:45
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
C++ Command Based Robot Template

Has anyone else noticed that the included template does not work correctly? After opening up the examples (GearBot, PacGoat) I noticed that they were different from the template!
Here are some of the discrepancies I noticed:
- There is no CommandBase.cpp/.h in the examples
- The headers in the template are different from examples
- Examples work, template doesn't
- No Robot.h in template
Realizing this made me rather mad. I had to write out some of the files by hand to make sure they worked, and by doing so our robot finally started up, drove, etc. But there was still one problem... My under-programmers are not very experienced with classes and complicated programs like this, so they had no clue how to get it to work. So I have created a blank robot with example command, subsystem, and all the small things needed (declaring motors, joysticks, methods, etc.) and for the sake of frankly being bored I would like to share the blank robot with you, especially if teams are having trouble trying to figure out why their robot won't work. Please feel free to point out any errors, update with better examples, or tell me just how wrong it is, so message me or reply with any of those things.
-Lord Supreme Programmer for Team 1410 Isaac

P.S. It works, I swear.
Attached Files
File Type: zip CodeTemplate.zip (2.03 MB, 43 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2015, 21:57
FleventyFive FleventyFive is offline
Registered User
FRC #4118
 
Join Date: Sep 2014
Location: Gainesville, FL
Posts: 23
FleventyFive is on a distinguished road
Re: C++ Command Based Robot Template

Never bothered with the command bassed template, that's what RobotBuilder is for. Have you ever tried using it? It's pretty great, you can get the annoying stuff done quickly so you have more time to work on perfecting commands or w/e Sorry for not really answering question
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2015, 10:26
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,112
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: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
So I have created a blank robot with example command, subsystem, and all the small things needed (declaring motors, joysticks, methods, etc.)...
I thought that was exactly what the RobotBuilder is supposed to create for you. Are you trying to write an entire Command Based Robot from scratch?
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2015, 14:00
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by Alan Anderson View Post
I thought that was exactly what the RobotBuilder is supposed to create for you. Are you trying to write an entire Command Based Robot from scratch?
Is there a problem with writing it myself, instead of using a boring tool? Have you even looked at the template? It's not that much. I only write out objects, methods, and what those will do. It's relatively easy, and I don't see the point of using RobotBuilder if this is more fun, I get more experience, and frankly I enjoy this way more.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-02-2015, 14:54
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,112
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: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
Is there a problem with writing it myself, instead of using a boring tool?
Based on the kinds of questions and complaints you've been posting recently, I think the answer is "Yes, there is a problem." If you want useful help, you need to use the tools as they are designed to be used.

If you want to go it alone, fine. But consider the effect on the rest of your team if you blaze your own path and can't get help when you need it.
Reply With Quote
  #6   Spotlight this post!  
Unread 07-02-2015, 15:08
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by Alan Anderson View Post
Based on the kinds of questions and complaints you've been posting recently, I think the answer is "Yes, there is a problem." If you want useful help, you need to use the tools as they are designed to be used.

If you want to go it alone, fine. But consider the effect on the rest of your team if you blaze your own path and can't get help when you need it.
The problem with RobotBuilder is that no other team we know uses it. My team has never used it, and we never will. What experience do you gain by having your code generated for you? None. My team will stick with writing the code ourselves, thank you very much. RobotBuilder just looks like Labview on steroids, and will give me no experience to apply to writing code for a robot later in life.
And if you're going to say that by not using RobotBuilder I am throwing my team under a bus and making it impossible for me to get help, how come every question I have asked has been answered? And how, if not using RobotBuilder will mean our code won't work, is our robot currently error free and running smoothly?

Last edited by King Nerd III : 07-02-2015 at 15:11.
Reply With Quote
  #7   Spotlight this post!  
Unread 07-02-2015, 16:18
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,168
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: C++ Command Based Robot Template

You should not be flippantly giving Alan a hard time. Alan is trying to help you. And though your code is now "error free and running smoothly" the OP sounds desperate (and kinda silly).
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #8   Spotlight this post!  
Unread 07-02-2015, 16:35
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by wireties View Post
You should not be flippantly giving Alan a hard time. Alan is trying to help you. And though your code is now "error free and running smoothly" the OP sounds desperate (and kinda silly).
The original post wasn't a question, it was more stating that I have found the template to be wrong and thus have created a template that works. I don't see how that could really be considered desperate. If there are other teams out there that would like to use the template and it helps, then great, I helped someone. What I am not okay with is people saying that by not using RobotBuilder, which doesn't support Talon SRXs fully by the way so not usable for us, I am throwing my team under the bus.
Reply With Quote
  #9   Spotlight this post!  
Unread 08-02-2015, 11:50
Jalerre's Avatar
Jalerre Jalerre is offline
Registered User
FRC #4965 (FIRE)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Anderson, SC
Posts: 146
Jalerre is on a distinguished road
Re: C++ Command Based Robot Template

I believe you may be using an old template and that's what the problem is. Like you said the examples don't have CommandBase and thats because it was removed this year. And the Robot.h I believe was called RobotTemplate last year. If you are using Eclipse with this years plugins I don't know how you would be having these problems but that seems like what it is.
__________________
Vex
2013: 415 - Fabrication, Programming, Electrical
2014: 415D - Captain, Programming Lead
FTC
2014: 7354 - Programming Lead
FRC
2013: 415 - Safety Animation, Fabrication
2014-2015: 4965 - Programming & Electrical
2016: 4965 - Captain, Programming Lead, Electrical
Reply With Quote
  #10   Spotlight this post!  
Unread 08-02-2015, 11:55
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by Jalerre View Post
I believe you may be using an old template and that's what the problem is. Like you said the examples don't have CommandBase and thats because it was removed this year. And the Robot.h I believe was called RobotTemplate last year. If you are using Eclipse with this years plugins I don't know how you would be having these problems but that seems like what it is.
That's what I thought, maybe I somehow had the old template, but it's every installation we have! Is the template you have up to date?
Reply With Quote
  #11   Spotlight this post!  
Unread 10-02-2015, 00:04
Jalerre's Avatar
Jalerre Jalerre is offline
Registered User
FRC #4965 (FIRE)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Anderson, SC
Posts: 146
Jalerre is on a distinguished road
Re: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
That's what I thought, maybe I somehow had the old template, but it's every installation we have! Is the template you have up to date?
Yes, but I am not programming in C++.
__________________
Vex
2013: 415 - Fabrication, Programming, Electrical
2014: 415D - Captain, Programming Lead
FTC
2014: 7354 - Programming Lead
FRC
2013: 415 - Safety Animation, Fabrication
2014-2015: 4965 - Programming & Electrical
2016: 4965 - Captain, Programming Lead, Electrical
Reply With Quote
  #12   Spotlight this post!  
Unread 10-02-2015, 22:32
JohnSmooth42 JohnSmooth42 is offline
Is writing code
FRC #0375 (The Robotic Plague)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: New York
Posts: 27
JohnSmooth42 is an unknown quantity at this point
Re: C++ Command Based Robot Template

I mean, we use robot builder and I don't see anything wrong with it, it generates all the tedious stuff which would be hard to keep track of by hand. The wiring table is indispensible and how easy it is to use means that it allows you more time to make the code more complex. Teaching freshmen with it is insanely easy(especially when you have the pretty pictures enabled) because it allows them to visualize what's going on more easily, which IMHO is the most important part of FRC programming, or programming in general for that matter.
Reply With Quote
  #13   Spotlight this post!  
Unread 08-02-2016, 00:28
CC_Gear CC_Gear is offline
Registered User
FRC #5869
 
Join Date: Jan 2016
Location: California
Posts: 1
CC_Gear is an unknown quantity at this point
Re: C++ Command Based Robot Template

Hey! Thanks for posting the template! We are a rookie team this year with a deficit in programmers, so this code helped make things a little clearer.
Reply With Quote
  #14   Spotlight this post!  
Unread 19-02-2016, 20:59
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by CC_Gear View Post
Hey! Thanks for posting the template! We are a rookie team this year with a deficit in programmers, so this code helped make things a little clearer.
Sorry for the late reply, I forgot I unsubscribed from this thread. Anyways, it's no problem creating it! I know there are some typos, but overall I think that covers most of the framework. If there are any questions you have about the template, feel free to contact me, especially if any errors in the code are. I would like to be able to release an updated version soon with some new tricks I learned this year, such as SmartDashboard preferences and multiple autos.
__________________
Isaac
Chief of Programming and Head of Autonomous Control
FRC Team 1410
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


All times are GMT -5. The time now is 09:52.

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