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? :)
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? :)
I recent made a simple remote controlled robot programmed in Java with the help of this book
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.
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.
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.
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.
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)
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/
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 ;)