Go to Post Once we know how magic works it's no longer magic; it becomes science. - Karthik [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 07-12-2007, 15:31
pctopgs pctopgs is offline
Registered User
None #0369
 
Join Date: Nov 2007
Location: Brooklyn, New York
Posts: 1
pctopgs is an unknown quantity at this point
C# and robots

Can C# work on programing robots?because i already know a little bit of C#
  #2   Spotlight this post!  
Unread 07-12-2007, 17:01
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: C# and robots

On a purely theoretical level, yes. But why would you want to? It would be like hanging a picture with a sledgehammer... Overkill...

For the most part, C#, C+ and C++ are supersets containing C. While there are exceptions to any overly simplistic statement like that, you likely already know nearly everything you need to to program in C.

The same goes for Java. C is the grandfather computer language that spawned many others and is really quite simple. Review this tutorial exerpted from Kernighan & Ritchie's "The C Programming Language" and ignore all the references to interfacing with operating systems (like command line parameters, et cetera) and you will be fine.

Mike

__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #3   Spotlight this post!  
Unread 07-12-2007, 19:16
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: C# and robots

Also, C# works on the .NET framework, and the CLR to run. This is highly impractical to put on a FIRST robot (even if you could) due to the fact that the framework eats memory like crazy.

And it really isn't necessary. If you know C#, picking up C should be relatively painless (especially since the code for most of the robot isn't all that complex compared to possibilities in C#).
__________________
  #4   Spotlight this post!  
Unread 07-12-2007, 23:46
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: C# and robots

There are ways to do this, but it would require a co-processor [cough]used Windows Mobile PDA[/cough] which could run the .net framework.

Even though it is possible I don't see the advantage. Most tasks on the robot are simple, and C is very similar to C#.
__________________
Eric Haskins KC9JVH
  #5   Spotlight this post!  
Unread 08-12-2007, 11:53
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: C# and robots

Exactly my point. The .NET framework is... sluggish, to say the least, and most of robot tasks are simple. It would be much better to just figure it out in C.
__________________
  #6   Spotlight this post!  
Unread 08-12-2007, 16:03
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,185
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: C# and robots

Quote:
Originally Posted by slavik262 View Post
The .NET framework is... sluggish
Really?
  #7   Spotlight this post!  
Unread 08-12-2007, 16:20
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: C# and robots

Quote:
Originally Posted by Tom Bottiglieri View Post
Good find, but I'll need to run those tests myself before I believe them. Even though I like .net.



The .net micro framework can run an ARM7 and ARM9 processors with as little as 256k of RAM.

The .net micro frameowrk also supports the same debugging experiance that you get with regular PC debugging with .net.

This is a somewhat interesting discussion about the .net micro framework.
__________________
Eric Haskins KC9JVH
  #8   Spotlight this post!  
Unread 09-12-2007, 00:33
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: C# and robots

Quote:
Originally Posted by Tom Bottiglieri View Post
Don't get me wrong. I love the .NET framework for a lot of things. But not so much for others. I was more referring to the amount of memory it takes up, and on a PC, it's controls are sluggish when updated. Besides, there are ways to work around floating point math, saving a lot of time on your processor.
__________________

Last edited by slavik262 : 09-12-2007 at 00:35.
  #9   Spotlight this post!  
Unread 09-12-2007, 03:01
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,185
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: C# and robots

Quote:
Originally Posted by slavik262 View Post
Don't get me wrong. I love the .NET framework for a lot of things. But not so much for others. I was more referring to the amount of memory it takes up, and on a PC, it's controls are sluggish when updated. Besides, there are ways to work around floating point math, saving a lot of time on your processor.
I'm not saying that you are right or wrong. Just don't make sweeping generalities, because there will always be someone with the facts.
  #10   Spotlight this post!  
Unread 09-12-2007, 15:10
Salik Syed Salik Syed is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Alumni
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Stanford CA.
Posts: 514
Salik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud of
Send a message via AIM to Salik Syed
Re: C# and robots

There is nothing wrong with the stats posted, and honestly C# is definitely not significantly "slower" than any other language (it is more than fast enough for any computation I've ever seen done on FIRST robots) .... the problem is that C# is usually compiled down to an intermediate byte-code rather than assembly code, this means you need to run a virtual machine which interprets the byte code. Again this is not going to be that much "slower" however there will be a memory overhead which was not shown by the tests, since they only checked floating point operations.
Theoretically you can program your robot in any language (javascript, python etc) as long you write a compiler which will turn the code into assembly. This of course is not a trivial task, but certainly not impossible.

The whole point of C# is to make it easier to develop large software projects, most FIRST robots have like 8 functions, and you don't exactly need polymorphism or all of the other things that make C# useful, so I would say there is no advantage to use C#.


If you want a challenge, try writing a LISP interpreter on the RC... it's one of the easiest languages to write an interpreter for.
__________________
Team 701

Last edited by Salik Syed : 09-12-2007 at 15:14.
  #11   Spotlight this post!  
Unread 20-12-2007, 23:58
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: C# and robots

Doesn't help for FIRST really, but if you're interested in C# and robots, borrow a LEGO NXT kit from a FLL team and get a copy of the free Microsoft Robotics Studio (http://msdn.microsoft.com/robotics/). Requires a decent knowledge of the C# language and then some additional learning about the Concurrency and Coordination Runtime (CCR), which isn't quite as scary as it sounds.

Once you get going it's really fun and powerful. I took a class last summer that used it, and we got all the way to using vision recognition, (Requires a robot that you can hook a camera to, so NXTs won't work, but we just used webcams) which is made pretty easy because it's all built into MSRS.

In addition, this is what a lot of colleges and even some corporations are starting to use, so you'll have a head start if you want to keep going in robotics. Have fun!

--Ryan
  #12   Spotlight this post!  
Unread 21-12-2007, 00:33
Dillon Compton Dillon Compton is offline
Jack-Of-All-Trades
FRC #1391 (Metal Moose)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Malvern, PA
Posts: 186
Dillon Compton has much to be proud ofDillon Compton has much to be proud ofDillon Compton has much to be proud ofDillon Compton has much to be proud ofDillon Compton has much to be proud ofDillon Compton has much to be proud ofDillon Compton has much to be proud ofDillon Compton has much to be proud of
Send a message via AIM to Dillon Compton
Re: C# and robots

Quote:
Originally Posted by Salik Syed View Post
If you want a challenge, try writing a LISP interpreter on the RC... it's one of the easiest languages to write an interpreter for.
I'd actually expect this to happen sooner rather than later - eventually, as people start doing more and more 'AI' typical work for their autonomous modes, they will realize the clear and inherent superiority of LISP.

(not to start a language-war or anything, but I prefer LISP to C, especially when trying to abstractly develop behaviors and writing code underneath that. LISP also has the advantage of there being multiple GP systems that are implemented in it).

//Dillon Compton
__________________
www.metalmoose.com
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
pic: Kids and Robots JohnBoucher Extra Discussion 8 10-10-2007 07:43
Video of Regionals and Robots natis General Forum 10 15-04-2006 21:13
pic: Robots and Pancakes CD47-Bot Extra Discussion 5 15-02-2004 11:54
Robots and Small Balls archiver 2001 6 24-06-2002 00:44
On board cameras and vision systems and robots! oh my! archiver 2000 1 23-06-2002 23:02


All times are GMT -5. The time now is 09:30.

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