Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   C++ Command Based Robot Template (http://www.chiefdelphi.com/forums/showthread.php?t=133961)

King Nerd III 02-04-2015 10:45 AM

C++ Command Based Robot Template
 
1 Attachment(s)
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.

FleventyFive 02-06-2015 09:57 PM

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

Alan Anderson 02-07-2015 10:26 AM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1438162)
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?

King Nerd III 02-07-2015 02:00 PM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by Alan Anderson (Post 1439665)
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.

Alan Anderson 02-07-2015 02:54 PM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1439745)
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.

King Nerd III 02-07-2015 03:08 PM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by Alan Anderson (Post 1439763)
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?

wireties 02-07-2015 04:18 PM

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).

King Nerd III 02-07-2015 04:35 PM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by wireties (Post 1439808)
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.

Jalerre 02-08-2015 11:50 AM

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.

King Nerd III 02-08-2015 11:55 AM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by Jalerre (Post 1440227)
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?

Jalerre 02-10-2015 12:04 AM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1440229)
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++.

JohnSmooth42 02-10-2015 10:32 PM

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.

MrRoboSteve 02-10-2015 11:17 PM

Re: C++ Command Based Robot Template
 
FWIW, for a test I ran earlier this week, I created a new command based C++ project from the template and didn't run into any of the issues you describe.

King Nerd III 02-11-2015 12:33 PM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by MrRoboSteve (Post 1441619)
FWIW, for a test I ran earlier this week, I created a new command based C++ project from the template and didn't run into any of the issues you describe.

Does the template have CommandBase.ccpp/.h? That's what throws off the whole robot. You can still get it to work, just takes a lot of editing.

King Nerd III 02-11-2015 12:35 PM

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by JohnSmooth42 (Post 1441597)
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.

The main problem with RobotBuilder so far for us is the lack of CANTalon support. Also, we have ~7 Windows computers and 1 Mac, and currently RobotBuilder only opens on the Mac, except for the fact that it does not export.


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi