go_away

Author Topic: Best programming language for robots  (Read 10559 times)

0 Members and 1 Guest are viewing this topic.

Offline smashing robotsTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 0
Best programming language for robots
« on: January 18, 2011, 08:47:06 AM »
Hello All,

Which is the best programming language to create programs for robots? For example, if I want to create a program for robot vision to detect object from environment, which is the best program language?

Also which is the best toolset for development programs for robots?
You can read my articles about robots on www.intorobotics.com

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 365
  • Helpful? 10
Re: Best programming language for robots
« Reply #1 on: January 18, 2011, 09:07:02 AM »
That's a really general question :-P  If your goal is robot vision, then I'd go with C, and I'd use OpenCV, which does most of the computer vision stuff for you (I'd also be using a PC, rather than a microcontroller, since a uC might be too underpowered for the job).

Most of the robots I've worked in have been programmed in C or Assembly.  Assembly is *fast*, and most microcontroller programming programs take C code and convert it into assembly.  Problem is that most uCs have their own versions of assembly language, and I've always found that the programmer is just much better at optimizing my assembly code than I am, so I tend to stick with C.

That being said, many industrial robots are moving towards languages that are easier to use, like C# or Java.  Some hobby robotics uCs use visual basic (the Basic Stamp being the most prominent example of this).

My recommendation is to learn C and learn it really, really well, though.  I've encountered C far more often than anything else, and PICs can be programmed in C, along with many other microcontrollers.

As for the actual packages to use, it depends entirely upon your project.  If you're using the Axon microcontroller, then the libraries for its uC and the utilities built by Admin are a must.  If you're using a PIC, you may even have to write some of the libraries yourself.  As I said before, computer vision and OpenCV are a good match, although probably not the only one out there. 

What kind of project are you working on?

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline blackbeard

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: Best programming language for robots
« Reply #2 on: January 18, 2011, 09:15:43 AM »
it sounds like you're just starting out so let me say this. Computer vision is freaking hard! Anyway back on your points of interest. for languiges C is your friend and virtually any platform you use will either have a C compiler or be exclusively programmed in C. The best toolkit available for robotics at the hobbiest level (and maybe a bit beyond) is the axon II microcontroler sold right here by admin. if you're going for sensory capabilities involving more then range finding or obstacle detection then your best bet would be to go with a laptop or netbook running linux using a microcontroller to control the hardware. if you are dead set on computer vision and your pockets are deep then you should look into openkinect and use the XBOX kinect as your sensor. there's already been some major progress with it and if you're a "computer wiz" so to speak then you could probably do some really cool things.
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline airuno2l

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
Re: Best programming language for robots
« Reply #3 on: January 18, 2011, 09:19:29 AM »
I agree with MIKE, I use C++. And I think Arduino is the besttoolset (although I bet most people on this site will say axon II) it's really just a preferance. If I were doing vision I would use a laptop with Matlab on in, but I've never done it.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 365
  • Helpful? 10
Re: Best programming language for robots
« Reply #5 on: January 18, 2011, 09:22:43 AM »
I wouldn't recommend MATLAB for computer vision.  Although MATLAB is infinitely easier to use than anything else, it has some severe drawbacks (not the least of which being its cost, which can range into the thousands for all the toolboxes you'd need).

MATLAB's vision toolbox (or "image processing" toolbox...) is really for offline stuff unless you have a crazy fast computer.  We tried it once and OpenCV ran circles around it in terms of speed.  Plus, with MATLAB, you have all the overhead of actually running MATLAB, whereas in a C program (or whatever) you only have the overhead related to your own code.

MIE 
Current project: tactile sensing systems for multifingered robot hands

Offline smashing robotsTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 0
Re: Best programming language for robots
« Reply #6 on: January 18, 2011, 10:17:26 AM »
I want to thank you for all answers, and I understand that C is the  best programming language, this is good because I have some knowledge about C.
You can read my articles about robots on www.intorobotics.com

 


Get Your Ad Here

data_list