![]() |
Who Has Programmed From Scratch?
Well since the eclipse detection demo worked out of the box, my mentor said to just add on to it and I just added maybe 8 lines of code and we got a fully functional robot, the kicker, compressor and camera and drive all working right... :confused: :confused: Why does FIRST do this? its too $@#$@#$@#$@# easy, I think they should just give the API and the Libraries next time with no demos and make us figure it all out... My mentor says he knows how I feel, but he is more worried about a functional robot than "The feeling of satisfaction you get from programming"
|
Re: Who Has Programmed From Scratch?
I guess we know which team will be scoring 6 balls in autonomous mode at the LA regional this year!
:ahh: There's a world of difference between just getting a robot to work versus producing a world-class robot. The mediocre do the minimum, then exclaim how easy it is. The exceptional never stop to gloat... they're too busy figuring out new ways to make it even better... |
Re: Who Has Programmed From Scratch?
Quote:
Our team focused too much on the hardware itself, but my self was saying software first from the beginning, taking into stanford's philosophy of software first. I wanted to focus on the software to handle almost every thing, but too bad that didnt happen |
Re: Who Has Programmed From Scratch?
You might seriously consider applying the "student designed, student built, mentor approved rule. As it would seem you are having some instances of mentors being a bit too over-bearing, perhaps. Another useful rule our team has it the "mentors hands off policy." They don't have anything to do with the bot other than random pieces of advice here and there.
|
Re: Who Has Programmed From Scratch?
Quote:
|
Re: Who Has Programmed From Scratch?
Does the demo code work out of the box for detecting soccer balls? I haven't been able to get that to work.
|
Re: Who Has Programmed From Scratch?
Quote:
|
Re: Who Has Programmed From Scratch?
I HATE this year's robot, the kicker does not kicker over even one bump... Its unpredictable kicking too. I just hate it... It doesnt even drive over a bump... The middle wheel prevents it, and I was warning about it since the idea was introduced... $@#$@#$@#$@# no one listens to the sophomore...
I am definitely running for Team leader next year... I think we have to work harder next year |
Re: Who Has Programmed From Scratch?
yes, the demo code will work for a simple robot, but if you want to go beyond that you have the option. the code for 706's robot recently broke 500 lines (i started with the example "simple robot template", which was around 40 lines to begin with). it all depends on how many features you want and the amount of control you want on each one. i find that if programming has become to repetitive or too easy, i can just come up with a couple more sensors to add to take that extra load off the driver, or make an awesome autonomous mode.
some great ways to challenge your programming skills: write an autonomous mode that automatically aims at the target give your robot a swerve drive and make your own steering wheel use a custom controller (something beside the joysticks) write debugging code/add diagnostic sensors to see if any part of your robot is malfunctioning all of these things are very possible but cant be done by copying and pasting demo code, and of course you can always write your own commands instead of using the ones built into the WPI library (i for one really dont like the PID controller) |
Re: Who Has Programmed From Scratch?
Quote:
|
Re: Who Has Programmed From Scratch?
Being a SW guy myself, I can understand your frustration when everything else still has issues, but I'd encourage you to focus it in a more positive way.
Perhaps you can approach your mentor with some projects that you can work on that will not add too much risk to the robot. For one thing, you can easily make alternative code that you can test against the built-in. When yours is better and you convince your team and mentor, you can switch over. You can also switch back if you discover issues with yours. It is pretty safe to develop a nice dashboard to give the drivers more info. And if you don't have an autonomous routine, yet, that is like the SW freebie. Figure out a way to score from at least the front field position in auto. And good luck. Greg McKaskle |
Re: Who Has Programmed From Scratch?
Quote:
The consequences of that decisioin might even involve an apology or two. Many people want to be successful, but mistake that goal for the similar goal of being RIGHT. Blake |
Re: Who Has Programmed From Scratch?
Quote:
As for mentors, our team has always believed strongly that FIRST is an organization for students. We (the students) design the robot, we build the robot, and we code the robot. The mentors are there for our assistance when we ask for it. If this isn't how your team works and the mentors make the decisions, I'd strongly suggest doing something about this. FRC is a program for students, and your team should be for the students too. |
Re: Who Has Programmed From Scratch?
To answer your question directly: the only things left from the default code in the Begin and Finish vi's of this year's TechnoKats programming are the camera initialization and cleanup. Aside from the framework, everything else in them and in the entire Teleop is custom. We also played a little trick of our own that prevents typos in the RefNum Registry names.
Naturally, a twelve-wheel holonomic drivebase with full pushing power will tend to need completely different code than what the default 2-motor arcade drive has. |
Re: Who Has Programmed From Scratch?
Well its my first time working on a robot, I have written tons of code thats way past the 1000 lines, but they were games on the computer, its just a different feel
Well enough complaining, have a meeting in like 1.5 hours |
Re: Who Has Programmed From Scratch?
I can't say much about Killer Bees code(well, actually I can), but Windows says the project directory has 114 files, not including the stuff in Builds. Those include VI's, LBPROJ, and MNU's. This does not include the Dashboard, it has its own folder. Most of the files are VI's. We took the default structure, and then separated all of the code into modules that run in their own threads. We also designed it to work the same on both robots, keeping two sets of cal points, process variables, and opening IO differently for each robot. We left the existing Elipse finding software, but wrote our own camera tracking software, although it uses the gyro in a similar way to the default code. Everything communicates with global variables, so there's not alot of wiring data between the modules (Actually, there is exactly none.) We made use of Diagram Disable structures to allow us to debug modules separately. No line count; LabVIEW dosen't have lines.
Oh, and for Autonomous - We wrote some cool stuff. So cool it needs to know if it is running on Win or VxWorks. A direct answer to the question: We took the Default code, and then added an enormous amount of code to it. We used hardly any of it. As to the programmer that is never done: I am still perfecting much of the autonomous stuff and implementing many features to increase accuracy and make it as close as possible to the simulator. |
Re: Who Has Programmed From Scratch?
Heh. As I just posted about in the Java forum, my codebase just broke 5000 lines. Complex things like the navigation-enabled drive class is nearly 1000 lines. I did a lot of things from scratch, not even using the WPILibJ stuff except for really low level. (I'm sure you can agree no one likes staring at data sheets trying to figure out how to send the raw signal to the Jaguars)
|
Re: Who Has Programmed From Scratch?
Quote:
Also, Hardware always comes first. If your FRC software isn't required to be anything more than dumb, you will have a better robot. I guarantee it. Any software you develop means nothing if the hardware isn't reliable. |
Re: Who Has Programmed From Scratch?
I take a "if it's not broken, don't fix it" mentality towards all of this. If the existing camera code works fine, I have no qualms just using the default code. My time can be better spent doing something more productive and not already done, like implementing a kalman filter to augment dead reckoning, or creating an editable config interface. If you want a robot that just drives and does nothing else; then you could always use the default code. Other than that, there are PLENTY of neat things to be coding.
|
Re: Who Has Programmed From Scratch?
so far i've got 5 class's about 25 lines of code each, and no robot to demo the code on... scrim is saturday, should be interesting
|
Re: Who Has Programmed From Scratch?
Quote:
|
Re: Who Has Programmed From Scratch?
On the LV lines of code measurement, in Tools>>Profile, there is a VI Metrics item which will give you statistics about your code. The tool only works on one VI at a time, but if you write a quick VI, you can call the same method on a VI and build your own tables/graphs, or whatever. It is often used by bigger SW teams to keep track of how their code has evolved.
Greg McKaskle |
Re: Who Has Programmed From Scratch?
Quote:
Next year build up an electrical board that you can develop code on, then drop into the robot the last week when the mechanicals catch up. BC |
Re: Who Has Programmed From Scratch?
Quote:
EDIT: VI stats on Robot Main and subs, total: 1529 nodes 165 structures 353 diagrams 2022 wire sources 88 controls 65 indicators 0 property reads/writes 80 global reads 53 global writes 1 local read 0 local writes Averages: 29.3 nodes 2.95 structures 6.30 diagrams 36.11 wire sources 1.57 controls 1.16 indicators 1.43 global reads 0.95 global writes 1.29 connector inputs 1.07 connector outputs Over 56 VI's 393 vi.lib calls That dosen't include any of Autonomous Independent - That will be harder to check, since it relies on a few Invoke Nodes which cause LabVIEW to not follow all subs. This dosen't include any of auton.lib either... |
Re: Who Has Programmed From Scratch?
Quote:
Our framework is a bit overkill, but it's definitely a very elegant way to approach the problem. The whole mentality is to isolate the inputs from the outputs and make the class methods simple and straightforward. In a simple example, lets consider a simple two motor tank drive system controlled by a single joystick in arcade mode. Our robot class would instantiate the following objects * Gamepad - The gamepad that controls the driving * WsControllerAxis - One is created for each axis on the gamepad * WsControllerPolarStick - Takes in two WsControllerAxis objects and creates a polar coordinate system out of it. * WsControlMethodTank - Takes in a WsControllerPolarStick (as well as any buttons that are needed for driving such as turbo) and converts the inputs to a WsDriveVector (speed and direction) * SpeedController - One is created for each Victor that we're controlling * WsSc - Wraps a SpeedController so we can do things like disable or debug * WsDriveBaseTank - Takes in the two WsSc objects. Uses a WsDriveVector input to calculate the outputs to send to the WsSc (and subsequently the SpeedController) Then from in the teleop periodic call, we simply do a get on the WsControlMethodTank to get a WsDriveVector and pass that in to the WsDriveBaseTank and away we go. On the autonomous side, we simply make these same types of calls and reuse the entire drive base objects. In addition, all of our programs run in a common engine that takes simple commands like driveByTime or driveByEncoder. This makes writing programs as simple as defining the steps and calling an addCommand function. Our individual autonomous programs last year didn't have a single line of logic in them. They simply assigned values to the step parameters and called addStep. Since they all derive from the same base class, they all have a run in the base that handles stepping through the commands. |
Re: Who Has Programmed From Scratch?
Quote:
Our team tries to solve that problem. We start with the big picture, and make sure everyone knows what we want the robot to be able to do. During the season, roughly ever other meeting we take the last 15 minutes for "show and tell" - we go around and everyone presents what they've accomplished. This gives everyone a chance to not only be exposed to other areas, but to provide thoughts when someone encounters a problem and to show off their accomplishments. We've managed to build some pretty sweet mechanisms over the past few years, put in place all the feedback that was needed, and write some fairly complicated code to get it all to work. It's not software first, and it's not hardware first. It's robot first, and a robot is all that and more. |
Re: Who Has Programmed From Scratch?
Quote:
|
Re: Who Has Programmed From Scratch?
Quote:
Code:
void auton_f1(void) |
Re: Who Has Programmed From Scratch?
Quote:
|
| All times are GMT -5. The time now is 09:06. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi