使用哪些语言/互联网协议来远程控制机器人/电子产品?
我想知道机器人和电子产品使用什么语言。是 Java、C、C++ 等低级语言吗?
如果这些机器人和电子设备可以从另一个地方控制,那么使用什么协议?
不可能是 HTTP Rest,不是吗? :)
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? :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
即使对于较小的平台,Ada 也正在成为编程语言的可行选择。 Ada 对低层操作以及高层事物都有很好的支持。
作为较小平台的示例,Ada 可用于 Atmel AVR(8 位),称为 AVR-Ada。请参阅http://sourceforge.net/apps/mediawiki/avr- ada/index.php?title=Main_Page
对于 LEGO MindStorms,Ada 可从 GNAT 作为 GPL 版本获得,该版本还支持 Ravenscar 任务配置文件。因此,您可以在 MindStorms 平台上轻松创建多任务应用程序。请参阅http://libre.adacore.com/libre/tools/mindstorms/
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/
乐高头脑风暴怎么样?除非您对机器人的物理属性有特定要求(排除 Mindstorms/NXT),否则您可以用它做很多事情。这是一个严肃的套件 - 不要被“乐高”品牌所迷惑。
http://mindstorms.lego.com/en-us/Default.aspx
除了附带自己的编程语言之外,它还受到 Microsoft Robotics Developer Studio 的支持 - 因此您可以使用 .Net 为其编写代码。
http://msdn.microsoft.com/en-us/robotics/default
它的伟大之处在于,它实际上是乐高,具有用于构建机器人本身的固有模块化积木系统,因此可以进行大量快速原型设计和实验,而无需购买专门的零件。
它内置蓝牙,可以进行远程控制。您还可以将编译好的程序代码下载到其中,以便它通过 USB 或蓝牙自主运行。
我在 2008 年购买了之前的版本,并用一些常规的 Technics 模型进行了扩展。它包括触摸传感器、声音传感器、超声波传感器、光/颜色传感器和(双向)伺服电机等东西,您还可以获得陀螺仪、加速度计、指南针等第三方附加组件。非常有趣。
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.
我想说这取决于你的项目。我已经使用 C/汇编器 来对电子微处理器进行编程,但我知道您可以使用高如果您的机器人操作系统允许,某些项目也可以使用-级编程语言。比如Java/C#等。
有多种协议用于连接仪器,我相信 TCP/IP或 UDP/IP 是最常见的。但有些人更喜欢编写/编程自己的协议。
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.
我建造的大多数机器人都是用乐高 Mindstorms 建造的。您可以使用几种语言,但默认语言是可视化工作台。您可以通过蓝牙或红外线远程控制机器人(乐高包括一个 USB 连接的红外线发射器)
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)
C/C++、Java 和 Python。
我想说,在机器人编程方面,C/C++ 比 Java 和 Python 等语言使用更广泛,仅仅是因为已经有很多东西了。而且C也是嵌入式应用中非常常用的语言。我在业界认识的许多人都使用 C 作为控制机器人和硬件(如 RS-232、UART、步进电机等)的手段。
当我从事学术研究时,我的德国同事几乎只在自主机器人上使用 Java,并取得了令人满意的结果。如果您使用 Java,则只需在使用时抽象硬件即可,这可以通过 Player / Stage 或 ROS 来完成。
我想这完全取决于你想做什么。在我的特定领域(三菱 PLC),C++ 是首选语言。其他行业使用 C++ 来对机器人进行编程,例如本田 ASIMO。 AMD ATi 使用 Python 对其图形加速器进行编程。几乎任何可以与通信端口对话的语言都可以用于机器人技术。
至于远程控制它们,Battlebots 可能是一个很好的例子:
无论您选择哪种语言,您都会很快你就会发现你需要用零和一来说话;)
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 ;)
我最近在这本书的帮助下用 Java 编写了一个简单的远程控制机器人
http://www.google.co.uk/products/catalog?q=build+java+robots&hl= en&cid=346434932749925759&ei=WATITISGE5_g2ASm_tilCQ&sa=title&ved=0CAcQ8wIwADgA#p
这本书向我展示了如何使用蓝牙与机器人对话。
我还了解到,在构建您的第一个机器人时,BASIC 是一种很好的入门语言。
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.
免责声明:我不是专家。
我只对Arduino有过真正的经验,它可以用汇编语言或C语言进行编程(AVR-GCC 工具链)。然而,如果目标环境足够强大或有足够的内存,就没有什么可以阻止人们使用更高级的语言——除了其他技术限制,例如 硬实时 要求——例如 Lua 或更高级别的东西。
至于通信,也取决于最终的传输介质。例如,蓝牙、Zigbee、数字无线电通信,或者,您知道,可能是几根电线(甚至一根线)或其他什么,它会足够低-带宽串行协议...但是当然,这一切都取决于目标平台。
就 HTTP 而言,我使用 Arduino 和可用的以太网扩展板构建了一个 HTTP 可控 RGB 情绪灯(颜色之间平滑渐变!:P)。 HTTP 服务器在 Arduino 上运行。
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.
您可以使用您最熟悉的不同类型的语言来控制机器人和电子设备。但这也取决于您想要控制的设备的类型,即如果您从头开始开发机器人或设备,您可以使用它进行编程您选择的语言,如 C、C++。 Python,Java等。您还可以使用嵌入式语言对您选择的语言进行控制器编程,有许多不同的编译器仅可用于从控制器编译您的程序,例如MicroC是我经常使用的编译器之一我的微控制器嵌入式代码。如果您正在对某种板(如 Arduino)进行编程,那么您可以使用它自己的 IDE 对其进行编程。要远程控制机器人和小工具,您可以使用多种不同的方式,即:
2.蓝牙:您甚至可以通过将蓝牙模块与设备集成来使用蓝牙来控制设备,但蓝牙的范围较低。
You can control Robots and electronic gadgets with different type of languages in which you are most comfortable .But it also depends on the type of the gadgets you are trying to control i.e if you are developing a robot or gadget from scratch you can program it with the language of your choice like C ,C++. Python ,Java etc .You can also use the the Embedded language to program the controller with your choice of language there are many different compilers available only to compile your program form the controller for example MicroC is one of them which I use often use to compile my Embedded code for microcontrollers .If you are programming some kind of board like Arduino then you can use its own IDE where you can program it . To control the the Robots and gadgets remotely you can use many different ways i.e .:
2.Bluetooth : You can even use Bluetooth to control the devices by integrating a bluetooth module with your device but the range of bluetooth is low .