views:

100

answers:

7

I wonder what languages are used in robots and electronics. Is it low level languages like Java, C, C++ etc?

And if these robots and electronics could be controlled from another place, what protocol is used?

It couldn't be HTTP Rest, could it? :)

A: 

I recent made a simple remote controlled robot programmed in Java with the help of this book

http://www.google.co.uk/products/catalog?q=build+java+robots&hl=en&cid=346434932749925759&ei=WATITISGE5_g2ASm_tilCQ&sa=title&ved=0CAcQ8wIwADgA#p

This book showed me how to talk to the robot using bluetooth.

I've also read that BASIC is a good language to get started with, when build your first robot.

Ash Burlaczenko
How did you build your robot?
weng
I bought most of the components from ebay. The book walks your thought the things to look out for when buying different controls. I used a PIC controller and USB programmer which i found very easy to setup.
Ash Burlaczenko
A: 

Disclaimer: I'm no expert.

I only really have experience with Arduino, which can be programmed with assembly or C (the AVR-GCC toolchain). However, if the target environment is sufficiently powerful or has enough memory, there's nothing to stop one from using a higher level language -- aside from other technical constraints such as, say, a hard realtime requirement -- such as, say, Lua or something even higher-level.

As for communications, it depends on the final transport medium as well. For, say, Bluetooth, Zigbee, just digital radio communication, or maybe, you know, a couple of wires (or even one wire) or whatever, it'd be some sufficiently low-bandwidth serial protocol... But of course, it all depends on the target platform.

For what it's worth, regarding HTTP -- I built an HTTP controllable RGB moodlight (that smoothly fades between colors! :P) using Arduino and the Ethernet Shield available for it. The HTTP server runs on the Arduino.

AKX
A: 

I would say that it depends on your project. I've used C/Assembler to program an electronic microprocessor, but I know that you can use high-level programming languages as well for some projects, if your robots operating system allows it. Such as Java/C# and so on. There are a variety of protocols used to connect to an instrument, and my believe is that TCP/IP or UDP/IP is the most common. But some people prefer to write/program their own protocols.

Java Dude
Where can I buy a robot to write a program to control? Are there beginners book for this?
weng
http://www.ehow.com/how_2324276_program-robot.html
Java Dude
What is your budget would have been a better answer maybe... :)
Java Dude
This is another cool robot: http://robosavvy.co.uk/store/product_info.php/products_id/1103?gclid=CIiBuMn78qQCFcaHDgod_jHJgg
Java Dude
+1  A: 

How about LEGO Mindstorms? Unless you have specific requirements regarding the physical properties of the robot that would rule out Mindstorms/NXT, you can do a lot with it. And it's a serious piece of kit - don't be fooled by the "LEGO" brand.

http://mindstorms.lego.com/en-us/Default.aspx

In addition to shipping with its own programming language, it is also supported by Microsoft Robotics Developer Studio - so you can use .Net to code for it.

http://msdn.microsoft.com/en-us/robotics/default

The great thing about it is that it is actually LEGO, with its inherently modular brick system for constructing the robot itself, and so allows for a lot of rapid prototyping and experimenting, without having to buy specialized parts.

It has built in Bluetooth, allowing for remote control. You can also download your compiled program code to it, so that it operates autonomously, either through USB or Bluetooth.

I bought the previous version back in 2008, and expanded with some regular Technics models for parts. It includes stuff like touch sensors, sound sensors, ultrasonic sensors, light / colour sensors and (two way) servo motors, and you can get third party add-ons like gyroscope, accelerometer, compass etc. Great fun.

d7samurai
Can't you program it with javascript? And how powerful is the engine? (Eg. how much weight can it lift?)
weng
Javascript - I don't think so. But apparently you can use Java, using third party tools. I suggest you take a look at the Mindstorms Wikipedia page for more thorough informtion: http://en.wikipedia.org/wiki/Lego_Mindstorms. Also, there's plenty of YouTube clips showcasing various constructions. The motors are pretty strong, relatively speaking, and you get 3 of them in the standard kit, which can be combined for more powerful tasks. Also, you can use a gear system to get more power out of them (at the cost of speed).
d7samurai
Regarding controlling the NXT brick through the internet, here's a couple of YouTube clips showing just that: http://www.youtube.com/watch?v=p68ycEsFGeA and http://www.youtube.com/watch?v=tG_Vs6hb7VY.
d7samurai
d7samurai: What operating system is Mindstorms using?
weng
If you're referring to the graphical programming tool that ships with Mindstorms, NXT-G, it is supported by Windows XP-7 and Mac OS X: http://en.wikipedia.org/wiki/Lego_Mindstorms_NXT#NXT-G. The actual "brain" of the kit, the NXT brick, can be programmed by a range of different languages on different operating systems, as long as they support compiling to NXT bytecode and uploading to the brick: http://en.wikipedia.org/wiki/Lego_Mindstorms#Programming_languages_2
d7samurai
You can also program the brick directly, using its built-in LCD screen and couple of buttons, but this only allows for very limited functionality.
d7samurai
+1  A: 

Most of the robots I built were built with Lego Mindstorms. There are a few languages you can use, but the default language is a visual workbench. You can remotely control the robot via Bluetooth or IR (and Lego includes a USB-connected IR transmitter)

MSalters
Isn't it possible to control it through Internet?
weng
Not off the shelf, but you'd hack that in less than a day.
MSalters
+1  A: 

Ada is also becoming a viable choice for programming language even for smaller platform. Ada has very good support for low-level operations, as well as high-level things.

As examples of smaller platforms, Ada is available for the Atmel AVR (8-bit) as AVR-Ada. See http://sourceforge.net/apps/mediawiki/avr-ada/index.php?title=Main_Page

For LEGO MindStorms, Ada is available from GNAT as GPL version, which also support the Ravenscar tasking profile. Hence you can easily create multitasking applications on the MindStorms platform. See http://libre.adacore.com/libre/tools/mindstorms/

Schedler
+1  A: 

C/C++, Java and Python.

I would say C/C++ are more widely used than languages like Java and Python for programming robots, simply because there is so much stuff already out there. And C is also a very commonly used language for embedded applications. Many people I know in industry use C as the means for controlling robots and hardware like RS-232, UARTs, stepper motors etc.

When I was working in academic research, my German colleagues used Java almost exclusively on autonomous robots, with satisfactory results. If you use Java you simply have to abstract the hardware when you are using it, which can be done with Player / Stage or ROS.

It all depends on what you want to do, I guess. In my particular area (Mitsubishi PLCs) C++ is the language of choice. Other industries use C++ to program robotics, such as Honda ASIMO. AMD ATi use Python to program their Graphic Accelerators. Pretty much any language that can talk to a communications port can be used for robotics.

As for controlling them remotely, Battlebots would probably be a sterling example:

Whichever language you choose, you will soon find that you will need to speak in terms of zeroes and ones ;)

AndyUK