Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Can I Make Something Clear? (http://www.chiefdelphi.com/forums/showthread.php?t=85850)

Rion Atkinson 19-05-2010 22:56

Re: Can I Make Something Clear?
 
Quote:

Originally Posted by davidthefat (Post 962993)
Builds character

Okay... I'm sorry. I know this is off topic. But that was hilarious.

apalrd 19-05-2010 23:38

Re: Can I Make Something Clear?
 
Quote:

Originally Posted by davidthefat (Post 962993)
I rather program from scratch using OpenGL than use Irrlicht or Ogre3d or other stuff... Builds character

I was thinking of not commenting on this tread. Too much flaming. Oh well.

I would much rather use libIrrlicht then access the raw OpenGL interface. It handles so much for me, more to not write. And with games (what Irrlicht was designed for), there is already so much to write it's not really funny to think about not using existing libraries.

As I once found in a programming book, in an early chapter on simplification and thinking through problems before implementing them:

Quote:

The lazy programmer re-uses code whenever possible.
The message is clear. Don't ever re-invent the wheel. It has already been invented. Don't re-code something that has already been coded, that would be a waste of your time. Use it and build on top of it. You will still learn and feel accomplished.


Since you seem intent on autonomy, why not take a mars-rover approach and have the human give the robot simple commands which the robot then executes autonomously. Tell it what its goals are, where to move (virtual playing field?), possibly where objects of importance are, and let it generate and execute the curves and paths needed to perform the task. It will be much easier then letting it think on its own, because it is stupid until you make it un-stupid. And making it un-stupid will take a lot of software, much more then you want to write. The programming time necessary to let the humans make tactical decisions while letting the robot perform relatively simple drive commands will be much, much less then full autonomy. And, you can blame someone other than the programmer when it makes a mistake. Speaking of relatively simple, what is the most complex robot project you have programmed? Nothing near what you want to attempt.

Have fun. And use third party libraries where appropriate.
And, by the way, the cRio has a flash filesystem just asking to store configuration data. Much faster then re-compiling, much easier to implement then SD cards.

davidthefat 19-05-2010 23:49

Re: Can I Make Something Clear?
 
Quote:

Originally Posted by apalrd (Post 962998)
I was thinking of not commenting on this tread. Too much flaming. Oh well.

I would much rather use libIrrlicht then access the raw OpenGL interface. It handles so much for me, more to not write. And with games (what Irrlicht was designed for), there is already so much to write it's not really funny to think about not using existing libraries.

As I once found in a programming book, in an early chapter on simplification and thinking through problems before implementing them:



The message is clear. Don't ever re-invent the wheel. It has already been invented. Don't re-code something that has already been coded, that would be a waste of your time. Use it and build on top of it. You will still learn and feel accomplished.


Since you seem intent on autonomy, why not take a mars-rover approach and have the human give the robot simple commands which the robot then executes autonomously. Tell it what its goals are, where to move (virtual playing field?), possibly where objects of importance are, and let it generate and execute the curves and paths needed to perform the task. It will be much easier then letting it think on its own, because it is stupid until you make it un-stupid. And making it un-stupid will take a lot of software, much more then you want to write. The programming time necessary to let the humans make tactical decisions while letting the robot perform relatively simple drive commands will be much, much less then full autonomy. And, you can blame someone other than the programmer when it makes a mistake. Speaking of relatively simple, what is the most complex robot project you have programmed? Nothing near what you want to attempt.

Have fun. And use third party libraries where appropriate.
And, by the way, the cRio has a flash filesystem just asking to store configuration data. Much faster then re-compiling, much easier to implement then SD cards.

Yes I see you point, but I am doing this for the educational purposes. We are all students, we are not programming a multimillion dollar project that needs to save as much man work as possible. I totally would love if there was a development kit that does autonomous for me in a couple lines of code, but where is fun or the experience in that? IDK about you, ever since I was in like 3rd grade, I started taking things apart trying to see how everything worked and put it back (some times I just render it unusable) But this is what I love, there is so much to learn. I am not working NASA or some crazy big company, that means my product will not reach a broad audience. I don't know how to explain, but this is not our job, to be a programmer. Our job is being a student, what does students do? Learn, learning will only happen if you try it your self. About your Mars Rover approach, just does not feel "right" sure if I can't fully reach my goal, may be I have to settle for less and continue on the next year, but my goal is not semi autonomous. Success is not a destination, its a journey.

gallo26 19-05-2010 23:52

Re: Can I Make Something Clear?
 
Our team programmer before he graduated suggested we made a robot that would operate on it's own will power and do whatever it thought was correct. Basically whatever he wrote the code to do. So if it were kick the closest ball, it would do that. But the robot would remember what it did, and he had 2 buttons for it. A "No/Bad Robot" button to tell it that what it did was not good and it should not do that again. And if we pressed that one too many times, he figured the robot would sit there and twitch, unwilling to do anything afraid of being reprimanded, so he suggested a "Self-Esteem" button.

I found it funny how people in this thread were talking about AIs and robots with Moods while our programmer thought that a few years back. Just something to think about

davidthefat 19-05-2010 23:57

Re: Can I Make Something Clear?
 
Quote:

Originally Posted by gallo26 (Post 963001)
Our team programmer before he graduated suggested we made a robot that would operate on it's own will power and do whatever it thought was correct. Basically whatever he wrote the code to do. So if it were kick the closest ball, it would do that. But the robot would remember what it did, and he had 2 buttons for it. A "No/Bad Robot" button to tell it that what it did was not good and it should not do that again. And if we pressed that one too many times, he figured the robot would sit there and twitch, unwilling to do anything afraid of being reprimanded, so he suggested a "Self-Esteem" button.

I found it funny how people in this thread were talking about AIs and robots with Moods while our programmer thought that a few years back. Just something to think about

:D Thats funny, kind of like a dog... but eh, I don't like copying ideas so I won't do that

apalrd 20-05-2010 00:01

Re: Can I Make Something Clear?
 
1. No matter how much you think you won't learn anything, you will still learn a lot by integrating a library, especially larger ones like libIrrlicht you mentioned earlier.
2. Why not start with semi-autonomous. Get the basic routines down, starting with position sensing, and generating autonomous paths on-the-fly and following them. If you can get it to do that, that would be a stepping stone to your goal. If you just say "i'm gonna go write AI just like that" you will never get there. You won't. You need to start with more basic things and work up to that level of autonomy.

I understand where you are coming from and your motivation to jump into autonomous programming. I learned that it is easier to not jump straight in, but to write software to get you a step closer there, and eventually you will make it. For you, you would need to get closed-loop control on everything, then follow your path, then generate the path to follow on the robot-end, then write game-piece finding code, etc... It's more work then you expect.

You may be surprised just how long it will take you to get to a point where you have a robot that can go to (x,y) on command, just getting it to go there and avoid fixed field elements like bumps or the rack from 07, etc.

mwtidd 20-05-2010 00:09

Re: Can I Make Something Clear?
 
Quote:

Originally Posted by davidthefat (Post 962929)
I like the motive of the guys behind the autonomous SDK stuff, but really, it won't help in the long run... Building things from scratch builds character.

I like your motive too David, but really, programming a full autonomous robot, won't help others in the long run...

With regards to building character, there is no undergraduate CS curriculum that says okay you have no education, go figure it out, then we'll talk. Don't worry it will build your character. The goal of an ADK is not to build character, but provide a platform on which to provide an education for programmers of all skill levels.

Even within programming, there are many types of programmers. I can tell you are a low-level programmer, and that's awesome. Personally I hate it and suck at it. I am better at the high-level design and architecture. Many colleges split up their CS departments into several concentrations for this very reason. So please note that what you view as building character for you, may be time that could be better spent for someone else.

That's the beauty of soft eng, you learn to utilize several people on a team and leverage their strengths, rather force them into their weaknesses. I have the utmost respect for low level programmers, because it's something I just can't do, but in the same sense many low level programmers aren't great at the managerial and high level tasks required on a group programming task. As Mark Jung the founder of IGN said "Great doers don't always make great managers" We should all play to our strengths and realize rather than one of us being right, we are probably both wrong (and right) all depending on the context.

I agree with you, that doing stuff from the bottom up will give you an experience you otherwise wouldn't have. But also realize working from an existing complex architecture could also give you an experience you otherwise wouldn't have.

For example if you were to try to break up the task your are trying to achieve right now to a team of 5 programmers (much like what would happen in a real programming environment) many things would be different. In my soft eng class I had to lead a team of 15 students, and had to learn all about their strengths and individual work ethic before I could delegate the work. There's a certain amount of character building that occurs when you work on a project and just have to trust what someone else is doing will work.

PS... If you hope to use your code in competition, please remember to open source everything you do before the build season.

Kitmor 20-05-2010 01:32

Re: Can I Make Something Clear?
 
David,
As another programmer that likes low level programming, and has programmed several simple fully autonomous robots, I'd like to mention a few things.

First of all I don't know your programming background is, if you haven't done much robot robot programming, but you have done computer programming, you will be in for a tough challenge. Because as you have probably noticed, computers and computer operating systems are very well organized, yes you have to deal with messy user inputs sometimes, but for the most part you know what you are going to get. However, once you cross over into the world of robot programming, it's a whole different story. The robot lives in the ridiculously unorganized world that we live in. Nothing is well structured, and everything is always changing. This is a very interesting challenge when you first start working with it, and it will continue to be a challenge always.

Now, another thing I wanted to say is: This is not a low level programming project. You may want to start at the low level, with each reading and understanding each sensor, and as you say this builds character, it will also help you understand what kind of information you actually get from each sensor. However, at some point, you have to start treating this project as a high level programming problem, and if you want my advice, you start that at the beginning. If you really want this project to succeed, start at the top, design your behaviors, then figure out what types of computation you need to do to achieve those behaviors, then figure out what kind of data you need to get, then figure out what kind of sensors you need. Since you are using an object oriented programming language, then you need to start developing your class diagrams. Once again you need to start at the high level and work down. Once you have a diagram of your program, that is when you finally start typing your code. And more than likely, once you get down to a certain point in the development process, you will appreciate the advantage of using libraries :)

While this may not sound like a very fun way to approach this project, if you do it this way, you will end up with much cleaner and better code. This is how professional programmers do it, and there is a reason for that. Not to get sidetracked, but for example, I am in the process of "programming" a 2D game engine, because I recently was looking for a usable one, I was unsatisfied with how they worked. It has been almost two weeks since I started the project, and I haven't written one line of code, all I have been doing, is developing a UML diagram for the project, and writing documentation. Once I am done with this stage however, the programming will take a much sorter period of time than it would if I did it otherwise.

As someone who as spent their fair share of time writing assembly code, I understand your desire to start at the bottom. And to all those people who say there is no point in that, I would have to disagree, majority. I have used libraries, and I have started from scratch, libraries are great, but only if you truly understand what you get out of them. One very common mistake with robot programming is thinking that you are getting one piece of data from a sensor when you are really getting a slightly different piece of data, and sometimes when you are using a library it's hard to tell the difference. However, if you really get down there to the low level, you fully understand your data, you fully understand what the computer or microprocessor has to do, and I believe that is important. That said, with a project this size, you can't treat it as a low level project, you have to start at the top and design down. Then program from what ever bottom you choose up. And what you will find if you really use the object oriented model is, you will be making your own library. :)

David, I respect your enthusiasm, and this is an idea that our programmers have talked about, however, only jokingly. I would love to see a robot that could run completely on it's own. You just have to realize the magnitude of this project, and make sure you design it accordingly.

-Kit

Jack Jones 20-05-2010 07:56

Re: Can I Make Something Clear?
 
Quote:

Success is not a destination, its a journey.
Oh really? Then how do you know when you get there?

.

Daniel_LaFleur 20-05-2010 08:15

Re: Can I Make Something Clear?
 
Quote:

Originally Posted by Jack Jones (Post 963019)
Oh really? Then how do you know when you get there?

.

When you've succeeded? :p

Seriously, Success is defined by the individual. I define success by the accomplishments of the students and how motivated/inspired they become. They probably view success a bit more on win/loss, but the 2 definitions are not mutually exclusive.

Success is indeed in the journey, not in the destination because 'How you get there is more important than getting there'. IMHO

slavik262 20-05-2010 09:12

Re: Can I Make Something Clear?
 
Quote:

Originally Posted by davidthefat (Post 962993)
I believe that the WPILib is more than enough generic but more than enough to pull off an autonomous mode of this magnitude. Well IDK about you, but I feel way more accomplished if I do it from scratch. I rather program from scratch using OpenGL than use Irrlicht or Ogre3d or other stuff... Builds character

Like apalrd, I was going to stay out of this ridiculous flame war, but the asininity of the above statement got to me.

First of all, FIRST is about teaching practical lessons that you can use to drive the future. You'll find that this "builds character" bit doesn't exist in the professional world. Business respects results. If your co-worker (let's call him Bob) can code something in half or even a quarter of the time you can because he used a library or something higher-level than you, your boss won't care if you are "building more character" than Bob by doing it from scratch. Bob will get the contract/raise/promotion every time. Why? Results matter, and time is money. You don't just have to work hard, you have to work smart.

Secondly, doing everything from scratch is just masochistic. This is coming from someone who used to be like you - I used to want to do everything from scratch - I was convinced my "from scratch" code would run faster and better than any library I found. But re-inventing the wheel every time has a serious cost. Try to do anything significant without a library and you'll spend ludicrous amounts of time just getting to the point where you've re-coded what the library does and are actually ready to begin what you set out to do in the first place.

I decided a few months back that I wanted to make a video game, and decided first that I'd make my own DirectX engine. Luckily, a friend of mine, who is a professional game developer, stopped me ahead of time and told me that if I wanted to make an engine, I should make an engine, but if I wanted to make a game in any useful amount of time I should use a pre-existing game engine. I went with Irrlicht, and things have been going great ever since. You know what, though? Even with an engine, you have a lot of coding to do. Thousands and thousands of lines. Your proposed AI project will be no different - coding anything useful takes a lot of code. Have you ever looked at the source of a game engine? Open up the Irrlicht source and you'll find thousands upon thousands of lines. Why would you put that additional burden on yourself? As elitist as we programmers like to be, good libraries and engines are well-thought out and coded for the most part, and you're a fool if you don't take advantage of all the painstaking work someone's already done to help you. There's a reason professional 3D graphics and audio engines are valued at thousands of dollars per license - if they weren't that valuable to other developers, they wouldn't sell at that high of a price.

Your response to this over and over, David, has been that you want to do these things for your education. Look at the posts in this thread. There are professional engineers and mentors from all over the country trying to save you from yourself. We're not trying to discourage you - we're trying to help you and teach you a very valuable lesson. Most of us have been down this road before. I've had to learn the hard way why to use pre-existing code when I became overwhelmed several thousand lines into a project. I was convinced I could make a better MFC. :p You don't realize the enormity of a project until you really start coding.

My code mentors once told me, "A good programmer can look at a library, decide he hates how it's implemented, and re-code everything from scratch. A really good programmer can look at a library, decide he hates how it's implemented, but realize the time it will save him and learn to use it."

EricH 20-05-2010 15:05

Re: Can I Make Something Clear?
 
David,

If you truly want to build from scratch, then that means that you will need to develop your own programming language. Every time you use C++ or any other language, you're putting pieces together that have already been made for you. (Similarly, building a robot completely from scratch means going at least to the ore, if not digging out the ore.) ;)

You want to further your education. But with the grades that you posted in another thread, I would suggest concentrating on your schoolwork and furthering your education in your free time. You have your whole life to learn to build libraries from nothing. But at this time, you have better things to do.

Use the libraries. Then go back after you're out of high school (and maybe college) and rewrite them from scratch. If you haven't already done so in a class, of course. Maybe you'll figure out that not using them was a mistake at some point...

Isaac501 20-05-2010 16:21

Re: Can I Make Something Clear?
 
My only real response to the first thread, and now this one is:

Why?

You have a very, very, very, very, very, very and let me add very limited sensor and compute base on a FIRST bot. After seeing the GATech Darpa Urban Challenge bot at Championships, I can't even imagine thinking about making something that has to be able to do more than just drive with 1/100th of that hardware. I saw the postulates about putting the PS3 on the bot, and even then it would be ridiculously underpowered and still illegal.

If you want to learn to program, learn to program; It's a useful skill and will be helpful in your future. Also helpful is being able to tell when an idea is unrealistic or unachievable.

Opinion567 20-05-2010 19:41

Re: Can I Make Something Clear?
 
I'm sure I will get criticized for killing dreams and hampering progress. I'm sure that to some this is also not in the spirit of first. I hope someone else has said it and I just missed it, but

creating a fully autonomous robot is STUPID. There is NO WAY you will ever program a first robot to be smarter than the average human, and I would assume teams don't have their below average students driving. The game has too many variables to consider, and if you think you won't forget something or miss some scenario then you are very arrogant. Automating some tasks can be helpful. In autonomous try whatever you want. But in teleoperated with identical machines, I guarantee you that I beat any full auto bot 1 on 1 at least 95% of the time. (5% for the time to account for the time I get stung by a killer bee and pass out)

For educational purposes, I personally think you're wasting your time but its your time to waste., If however, you honestly think you will get a full auto bot to out perform a human then you are either very arrogant, or very stupid. (or the human is comatose)

Criticize me if you want but those are the facts, and I know for a fact that other people that have read this have thought the same thing.

kenavt 20-05-2010 19:52

Re: Can I Make Something Clear?
 
Quote:

Originally Posted by Opinion567 (Post 963122)
I'm sure I will get criticized for killing dreams and hampering progress. I'm sure that to some this is also not in the spirit of first. I hope someone else has said it and I just missed it, but

creating a fully autonomous robot is STUPID. There is NO WAY you will ever program a first robot to be smarter than the average human, and I would assume teams don't have their below average students driving. The game has too many variables to consider, and if you think you won't forget something or miss some scenario then you are very arrogant. Automating some tasks can be helpful. In autonomous try whatever you want. But in teleoperated with identical machines, I guarantee you that I beat any full auto bot 1 on 1 at least 95% of the time. (5% for the time to account for the time I get stung by a killer bee and pass out)

For educational purposes, I personally think you're wasting your time but its your time to waste., If however, you honestly think you will get a full auto bot to out perform a human then you are either very arrogant, or very stupid. (or the human is comatose)

Criticize me if you want but those are the facts, and I know for a fact that other people that have read this have thought the same thing.

That is not his goal. He has never said he wants an autonomous robot to outperform a teleoperated robot. He just wants to develop a robot that is completely autonomous. As long as it performs basic tasks, it doesn't matter how good it is compared to a human being.


All times are GMT -5. The time now is 04:48.

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