Go to Post That makes it a winning move to, well, win. - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-11-2006, 19:50
penguain penguain is offline
Registered User
AKA: Barry Preston
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Nov 2006
Rookie Year: 2007
Location: Bishop Miege High School
Posts: 18
penguain is an unknown quantity at this point
C or C++

which programming language is used in the robot for FIRST(FRC)... i see on the web site it says its C.... but my Team coach said it was C++?

some clarity would be helpful

thanks
  #2   Spotlight this post!  
Unread 13-11-2006, 19:53
thegathering's Avatar
thegathering thegathering is offline
Angry Troll Lurking in the MUD
AKA: Ben
FRC #1885 (Robocats)
Team Role: Programmer
 
Join Date: Jul 2006
Rookie Year: 2006
Location: Look around you. What do you see?
Posts: 333
thegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to behold
Send a message via AIM to thegathering
Re: C or C++

We use C with an IDE called MPLab by Microchip.


*edit* I wish we could use C++ though, then maybe we'd get some more programmers on our team. C tends to scare them off. (maybe that's MPLab's icky-sticky interface rather than the language itself )
__________________

*2006 Champion Rookie All Star Award.
*2 x 2006 Regional Rookie All Star Awards.

Last edited by thegathering : 13-11-2006 at 19:59.
  #3   Spotlight this post!  
Unread 13-11-2006, 20:11
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: C or C++

Its C.

Quote:
Originally Posted by thegathering
We use C with an IDE called MPLab by Microchip.


*edit* I wish we could use C++ though, then maybe we'd get some more programmers on our team. C tends to scare them off. (maybe that's MPLab's icky-sticky interface rather than the language itself )
They could always command line compile it. Im sure they would hate that even more.
  #4   Spotlight this post!  
Unread 13-11-2006, 20:28
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: C or C++

I don't think an FRC robot program is likely to benefit from object oriented programming in most cases. We're typically not dealing with a lot of objects that need to be created and destroyed that would benefit from a general class, mainly. There would be some benefit from the probable increase in code modularity and code reuse.

Mostly, however, I think objects inherently incur higher overhead costs than simple structures and procedure calls, what with instantiation and all sorts of things. So I don't think you could take advantage of the strengths of object oriented programming without making your code uselessly large.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #5   Spotlight this post!  
Unread 13-11-2006, 21:07
thegathering's Avatar
thegathering thegathering is offline
Angry Troll Lurking in the MUD
AKA: Ben
FRC #1885 (Robocats)
Team Role: Programmer
 
Join Date: Jul 2006
Rookie Year: 2006
Location: Look around you. What do you see?
Posts: 333
thegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to behold
Send a message via AIM to thegathering
Re: C or C++

Quote:
Originally Posted by Kevin Sevcik

Mostly, however, I think objects inherently incur higher overhead costs than simple structures and procedure calls, what with instantiation and all sorts of things. So I don't think you could take advantage of the strengths of object oriented programming without making your code uselessly large.
Well, we tried to make our code as object oriented as we could, which ended up working well for our automatically aiming camera/launcher code.
__________________

*2006 Champion Rookie All Star Award.
*2 x 2006 Regional Rookie All Star Awards.
  #6   Spotlight this post!  
Unread 13-11-2006, 21:46
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: C or C++

Quote:
Originally Posted by thegathering
We use C with an IDE called MPLab by Microchip.


*edit* I wish we could use C++ though, then maybe we'd get some more programmers on our team. C tends to scare them off. (maybe that's MPLab's icky-sticky interface rather than the language itself )
The icky interface scared me for a bit. C is an awesome language for embedded systems.
__________________
My Blog!
  #7   Spotlight this post!  
Unread 13-11-2006, 21:53
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,420
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: C or C++

just be thankful you don't have to program it in assembly...

C works terrific for a robots needs, when I'm trying to help the java peoples learn it, i tell them
"object oriented programming with robots would be kinda useless. For example, what would be the point in
Robot868 robot1 = new Robot868(void);
robot1.drive(10.0);
when you could write code that would simply be drive(10.0)? besides, the interface that Kevin supplies us with is alot more useful."

Too bad its not so easy to describe #define, or any other preprocessors to them .
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
  #8   Spotlight this post!  
Unread 14-11-2006, 00:21
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: C or C++

Quote:
Originally Posted by thegathering
Well, we tried to make our code as object oriented as we could, which ended up working well for our automatically aiming camera/launcher code.
It wasn't C++ code, though, so you didn't have class definitions and a memory manager floating about cluttering things up. You can, of course, still mostly apply object oriented design rules to get more modular, more portable code, but it still won't be C++ code, for good or ill. (Mostly for good)
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #9   Spotlight this post!  
Unread 14-11-2006, 02:35
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,281
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: C or C++

Quote:
Originally Posted by thegathering
We use C with an IDE called MPLab by Microchip.


*edit* I wish we could use C++ though, then maybe we'd get some more programmers on our team. C tends to scare them off. (maybe that's MPLab's icky-sticky interface rather than the language itself )
Use eclipse, it is much nicer than MPLAB

Also I think C is the easier of the two languages, the things that c++ simplified (Classes Structs etc) are really not important for what we are doing.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
  #10   Spotlight this post!  
Unread 14-11-2006, 06:52
RoboMadi's Avatar
RoboMadi RoboMadi is offline
3 Fs..... Fun Friends FIRST!!
AKA: Imad
FRC #0612
Team Role: College Student
 
Join Date: Oct 2005
Rookie Year: 2005
Location: Sterling VA
Posts: 452
RoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant futureRoboMadi has a brilliant future
Re: C or C++

Quote:
Originally Posted by JamesBrown
Use eclipse, it is much nicer than MPLAB
Last year, one of our programmers was used to Eclipse, and he pretty much hooked up everyone to use it. Its really nice, especially the way it breaks down the code.
C or C++, as far as writing the code, theres not much of a difference. I'm just waiting when FIRST will upgrade their systems, and we'll have some other language to play with...
But on a bright note, responsive time for C is much faster than any other language.
  #11   Spotlight this post!  
Unread 14-11-2006, 08:24
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: C or C++

Quote:
Originally Posted by RoboMadi
I'm just waiting when FIRST will upgrade their systems, and we'll have some other language to play with...
I hope this never happens. C is a de facto standard in embedded software. In FIRST a good application of C++ is creating a dashboard program.
__________________
"FIRST is like bling bling for the brain." - Woodie Flowers
  #12   Spotlight this post!  
Unread 14-11-2006, 10:31
Stuart's Avatar
Stuart Stuart is offline
#include coffee.h
FRC #1745 (P51- Mustangs)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Dallas, TX
Posts: 414
Stuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond repute
Send a message via AIM to Stuart
Re: C or C++

I personaly would like to see a move to C++ . .mainly because I think its easier to think of a robot in terms of objects than not. and for the most part any thing you write in C can be put directly in to C++ with out any changes.

not saying that we take the jump all the way to java, (java.eguals(the.suck())) , but saying that a move to OO would be nice.
__________________
Proud mentor of Team #1745 the P-51 Mustangs

If at first it doesn't work, use a hammer.
If that doesn't work, use a bigger hammer.
  #13   Spotlight this post!  
Unread 14-11-2006, 14:25
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: C or C++

Quote:
Originally Posted by Stuart
I personaly would like to see a move to C++ . .mainly because I think its easier to think of a robot in terms of objects than not. and for the most part any thing you write in C can be put directly in to C++ with out any changes.

not saying that we take the jump all the way to java, (java.eguals(the.suck())) , but saying that a move to OO would be nice.
C++ would be a pretty hefty extra load on the processor, and for minimal gain. As far as objects go, I've found structs are pretty good, I'm working in my spare time on an object based robot API using all structs, its very doable.

Last year I used very modular code utilizing the same method, well enough I could pick up and move parts of my code in to another teams to help them, with the only change being adding the interface code to theirs. Once they had it, we were able to "plug" code modules in, it was very effective.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #14   Spotlight this post!  
Unread 14-11-2006, 16:47
♥♣♠♪'s Avatar
♥♣♠♪ ♥♣♠♪ is offline
DemiOmniGod
FRC #1546 (Chaos Inc.)
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Baldwin
Posts: 5
♥♣♠♪ will become famous soon enough
Re: C or C++

Quote:
Originally Posted by efoote868
Too bad its not so easy to describe #define, or any other preprocessors to them .
All you have to do is explain what compilation is and everything else should be easy.
__________________
Programming && English !mix

Our website
  #15   Spotlight this post!  
Unread 14-11-2006, 21:00
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: C or C++

I think most of us would agree that we would rather have the flexibility and added features of C++, particularly object oriented-ness.

The problem with C++ is that along with its added features comes added bloat and inefficiency. Unless the architecture and processing power were SUBSTANTIALLY and unnecessarily upgraded, all of the people who keep complaining that C is primitive would be complaining that their code wouldn't run if we upgraded to C++. Memory allocation/deallocation is no small task, especially when handled in software. C++ is good for PCs where functionality is a greater priority over efficiency and there is an abundance of computational power, but not so great for our application. In industry, C is not considered outdated, it is the standard in the world of embedded programming and for good reason. C is sleek and slim.

Heated seats, radios and air conditioning are good to have but race cars don't have them and do just fine without them. Our robots, like race cars are designed minimalistically. There is nothing on a FIRST robot that is not absolutely necessary and that goes for code too.

Any problem that can be solved in C++ can be solved in C. The solution may not be as coder friendly, but chances are it will be smaller and take fewer processor cycles to execute.
__________________
1139 Alumni

Last edited by Rickertsen2 : 14-11-2006 at 21:02.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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