![]() |
C# and robots
Can C# work on programing robots?because i already know a little bit of C#
|
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 |
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#). |
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#. |
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.
|
Re: C# and robots
Quote:
|
Re: C# and robots
Quote:
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. |
Re: C# and robots
Quote:
|
Re: C# and robots
Quote:
|
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. |
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 |
Re: C# and robots
Quote:
(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 |
| All times are GMT -5. The time now is 10:43. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi