Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Do we have to program our robot in C++? (http://www.chiefdelphi.com/forums/showthread.php?t=30445)

Alaina 24-09-2004 14:35

Do we have to program our robot in C++?
 
Hi,

The new programmer on my team was wondering, can we switch back to visual basic or do we have to use c++?

Max Lobovsky 24-09-2004 14:51

Re: Stupid question that should be easy to answer...
 
Let me start by giving you a bit of information. Prior to 2004, PBASIC (similar to Visual Basic) was used as the programming language. In 2004, and as far as I know, 2005, the chip will be programmed in C (someone who knows C++ knows C, but they are not the same).

If your programmer knows BASIC, C should not be a very large step. If he starts learning now (practicing with the 2004 equipment) he should be perfectly capable by 2005.

Joe Ross 24-09-2004 14:56

Re: Stupid question that should be easy to answer...
 
Well, the robots have never been programmed in either Visual Basic or C++.

In the past, the robots were programmed in PBASIC, which is a dialect of BASIC that only runs on Basic Stamp microprocessors, which were what controlled the robot until last year.

Last year, and presumably this year, the robots are programmed in C for a Microchip PIC processor.

Even if your programmer knew Visual Basic, PBASIC is quite a bit different. C++ and C are quite a bit closer, but there is still a huge difference between programming a full computer, and an embedded control system.

You should suggest that they register on chiefdelphi because I'm sure there will be many more questions.

Alaina 24-09-2004 17:21

Re: Stupid question that should be easy to answer...
 
Okay, thanks guys. Sorry for being so oblivious. =P

Ryan M. 24-09-2004 17:23

Re: Do we have to program our robot in C++?
 
No problem. "Oblivious" people asking questions are what gives us an excuse to sit around on CD. ;)

Robot Dude 0101 24-09-2004 21:42

Re: Do we have to program our robot in C++?
 
Im new to this FIRST stuff and I was wondering why these robots have to use these processors? We could use more powerful processors like the HandyBoard, Motorolla processors, or K-Team processors. That would make everything more challenging.

Billfred 24-09-2004 22:20

Re: Do we have to program our robot in C++?
 
Quote:

Originally Posted by Robot Dude 0101
Im new to this FIRST stuff and I was wondering why these robots have to use these processors? We could use more powerful processors like the HandyBoard, Motorolla processors, or K-Team processors. That would make everything more challenging.

That's the thing--some folks have enough fun (ahem) trying to program the robots as they are. Adding in more powerful/complex processors only makes it harder for us (and rookies, don't forget the rookies) to learn.

Now, if by that you meant being able to use any processor, then there's another issue--as it stands, FIRST teams use pretty common things (mainly since they're in the kit of parts). If 1000 different teams use 1000 different processors, then it's going to be very hard for a programmer to walk to the rookie team next door and offer help, since their setup may be completely foreign to him/her/it.

Greg McCoy 24-09-2004 22:22

Re: Do we have to program our robot in C++?
 
Quote:

Originally Posted by Robot Dude 0101
Im new to this FIRST stuff and I was wondering why these robots have to use these processors? We could use more powerful processors like the HandyBoard, Motorolla processors, or K-Team processors. That would make everything more challenging.

Programming is, for many teams, one of the aspects of making their machine they find most difficult. In recent years, FIRST has worked hard to make building a robot easier, but at the same time providing the headroom for more experienced teams to innovate. The new control system provides a pretty good balance. I think Microchip PIC Processors are used a lot in industry, so this also may be part of their choice.

(Also, if I'm not mistaken, the PIC uses a Motorola processor...)

Robot Dude 0101 25-09-2004 11:51

Re: Do we have to program our robot in C++?
 
Quote:

Originally Posted by Billfred
That's the thing--some folks have enough fun (ahem) trying to program the robots as they are. Adding in more powerful/complex processors only makes it harder for us (and rookies, don't forget the rookies) to learn.

Now, if by that you meant being able to use any processor, then there's another issue--as it stands, FIRST teams use pretty common things (mainly since they're in the kit of parts). If 1000 different teams use 1000 different processors, then it's going to be very hard for a programmer to walk to the rookie team next door and offer help, since their setup may be completely foreign to him/her/it.

Even though it would be hard for teams to help each other, it would be an interesting idea to let teams use whatever processors they want. But this would only be useful if there was no $300 sensor limit. Since there is, I agree with you that the same processor is a good idea.

Mike Martus 26-09-2004 09:03

Re: Do we have to program our robot in C++?
 
FIRST will publish the "Official Rules" at the kick-off. I am sure there will be restrictions, as in the past, regarding the controller, specifically the software. There is great effort at making all teams even in many respects as well as constraining the technical issues FIRST tech support will have to deal with.

In the past you were NOT allowed to modify the OI or RC in any way other than programming. In addition, usage of additional electronics is specifically controlled each year.

I am sure the controller will not operate on any other language other than "C".

Read the "Official Rules" when they are published by FIRST.

Ask here if you need additional information. The community of Chief Delphi will respond.

Tristan Lall 26-09-2004 11:23

Re: Do we have to program our robot in C++?
 
Quote:

Originally Posted by Mike Martus
I am sure the controller will not operate on any other language other than "C".

It should be possible to program the RC in a different language, like PIC assembler (because it's the job of the compiler to write a .hex file, which contains generic PIC instructions, rather than C code or some other language). However, there's absolutely no support for this, and it would be a miracle if someone got a re-coded version of the firmware to actually work with itself, much less the field controllers.

suneel112 26-09-2004 12:16

Re: Do we have to program our robot in C++?
 
We should use Java....not! It will take forever for the virtual machine to load ("it's 45 seconds left and the robot is standing still") and for the navigation system, "Java.lang.Math is loading...." I guess C is a good alternative (even though I am terrible at C programming). Java has great uses as a dash program, though.

Dekker Avesque 29-09-2004 21:59

Re: Stupid question that should be easy to answer...
 
Quote:

Originally Posted by Joe Ross
C++ and C are quite a bit closer, but there is still a huge difference between programming a full computer, and an embedded control system.

You make it sound as if C++ is for programming on a PC and C is only for embedded control systems, when this is not the case. C and C++ were both originally for PC programming; C is merely the predecessor language to C++. C and C++ are nearly identical; C++ is C with object orientation. (C++ was originally described as "C++: Object Oriented C".)

I believe the C used in the Innovation FIRST chips that we run our robots with is a simplified version of the language, specifically suited for said chips.

Just making sure there is no confusion... C was not designed for operating robots, however a compiler was released for FIRST allows us to use the C language to operate robots.

Robot Dude 0101 02-10-2004 22:03

Re: Stupid question that should be easy to answer...
 
Does anyone know of any good books that would teach you how to program C for robotics?

av11d 02-10-2004 22:41

Re: Stupid question that should be easy to answer...
 
Quote:

Originally Posted by Dekker Avesque
You make it sound as if C++ is for programming on a PC and C is only for embedded control systems, when this is not the case. C and C++ were both originally for PC programming; C is merely the predecessor language to C++. C and C++ are nearly identical; C++ is C with object orientation. (C++ was originally described as "C++: Object Oriented C".)

I believe the C used in the Innovation FIRST chips that we run our robots with is a simplified version of the language, specifically suited for said chips.

Just making sure there is no confusion... C was not designed for operating robots, however a compiler was released for FIRST allows us to use the C language to operate robots.

Almost. C with an object-oriented extension is ObjectiveC. ObjC is what NeXTStep and Mac OS X use as the default programming language. C++ is rather a completely rewritten programming language that originates from C. I still like Java :)

Anyway, if you want specific information on using C with the standard FIRST controller, check out: http://www.innovationfirst.com/FIRST...umentation.htm

Best of Luck!


All times are GMT -5. The time now is 13:03.

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