View Single Post
  #5   Spotlight this post!  
Unread 20-05-2010, 01:32
Kitmor's Avatar
Kitmor Kitmor is offline
Registered User
AKA: Kit Morton
FRC #0847 (PHRED)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Philomath
Posts: 24
Kitmor will become famous soon enoughKitmor will become famous soon enough
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
__________________
"Stand back we don't know what it is going to do"