Erlang 中的机器人应用

发布于 2024-10-14 08:58:19 字数 451 浏览 6 评论 0原文

我想使用 Erlang 来实现机器人应用程序。当前在 Erlang 中实现的大多数现实世界应用程序都是基于网络的。 corrado教授实现的机器人没有利用Erlang的并发性,这是Erlang的核心,而更多地专注于人工智能(根据我对该项目的理解)。

我想到了一些想法,例如 Soccor 机器人、多个机器人清洁房间,但在此类系统中,机器人可以用 C(或任何其他编程语言)进行编程,并可以使用 MATLAB 进行控制。 MATLAB有助于图像处理(视觉系统)和解决复杂的数组计算,那么使用Erlang有什么意义?(如果我错了,请纠正我)

有人可以建议我一些机器人应用程序,它可以特别利用Erlang的功能并发,人们可以说,与其他语言相比,Erlang 最适合这种应用程序

一点详细的答案会对我有很大帮助。

I want to use Erlang for implementing a Robotic Application. Most current real world applications implemented in Erlang are web based. Robot implemented by Prof. corrado didn't utilize concurrency of Erlang which is the heart of Erlang and concentrated on Artificial intelligence more(according to my understanding of that project).

Some ideas come to my mind are like Soccor Robots, Multiple robots cleaning a room but in such systems Robots can be programmed in C (or any other programming language) which can be controlled using MATLAB. MATLAB helps in image processing(vision system) and solving complex array calculations, so what is the point of using Erlang?.(please correct me if I am wrong)

Can somebody suggest me some Robotic Application which can utilize Erlang's feature especially concurrency and one can argue that Erlang is best suited for such application over other languages.

Little bit detailed answer would help me a lot.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那伤。 2024-10-21 08:58:19

但 Erlang 可能根本不是任何机器人应用程序的最佳方法。但是您可以选择不太雄心勃勃的论文,证明 Erlang 支持在许多机器人应用程序中很重要的计算模型。使用 Erlang 进行机器人技术的要点包括

  • 并发来建模和监控并发世界;
  • 传感器、执行器和计算资源的分配
  • 状态机将行为联系在一起;和
  • 用于容错的主管

任何语言都可以完成任何事情,但 Erlang 使某些事情变得方便,特别是在架构层面。

Erlang 中的并发编程中的第 14 章例如通过一个电梯控制系统建模每部电梯和每层楼都有一个流程,稍后讨论卫星控制系统的流程结构。电梯或卫星可能不太像机器人,但原理是相同的。

Erlang & Corrado Santoro 等人的机器人技术工作。充分利用并发性。他们的 2007 移动机器人项目 有一堆不同的(并发)OTP 行为,范围从低级 I/O 到高级规划。 使用机器人和播放器/舞台教授 Erlang 是另一项最近的工作。

您的机器人足球或清洁机器人的想法很好,并且有足够的并发和机器人间通信的空间。但您不只是做一个任意大小的机器人应用程序。要么你有一个团队和一些特定的机器人来工作,要么你给自己买一个模拟器(无论哪种方式都买一个模拟器)。

尝试模拟多个机器人,它们相互转向,直到全部碰撞,每个机器人都运行自己的进程。当它起作用时,替换任务并添加(假装)控制电机、感知墙壁、查看环境、理解用户命令、故障等的进程,以及与其他机器人和规划进程交换消息。

阅读机器人系统架构,了解此类设计很常见及其原因。 Erlang 是否促进了这种类型的编程?

But Erlang might not be the best approach to any robot application at all. But you can go for the less ambitious thesis of demonstrating that Erlang supports a computing model that is important in many robotics applications. The points of using Erlang for robotics include

  • concurrency to model and monitor a concurrent world;
  • distribution of sensor, actuator and computing resources;
  • state machines to tie the behaviors together; and
  • supervisors for fault tolerance.

Anything can be done in any language, but Erlang makes some things convenient, particularly on the architectural level.

Chapter 14 in Concurrent Programming in Erlang for example models a lift control system by one process for each lift and one for each floor, and later discusses the process structure for a satellite control system. Lifts or satellites maybe aren't very robot-like, but the principles are the same.

The Erlang & Robotics work by Corrado Santoro et al. makes plenty use of concurrency. Their 2007 mobile robot project has bunch of different (concurrent) OTP behaviors that range from low level I/O to high level planning. Teaching Erlang using robotics and player/stage is another recent work.

Your Robot Soccer or Cleaning Robot ideas are fine and have plenty of scope for concurrency and inter-robot communication. But you don't just do an arbitrary robot application of that size. Either you have a team and some specific robots to work on, or you get yourself a simulator (get a simulator either way).

Try simulating a number of robots that steer towards each other until they all collide, each robot running a process of its own. When that is working, replace the task and add processes that (pretend to) control motors, feel walls, see the environment, understand user commands, break down, etc., and exchange messages with other robots and planning processes.

Read up on robotic systems architectures to understand that such designs are common and why. Did Erlang facilitate this type of programming?

两个我 2024-10-21 08:58:19

了解 erlang 哪里最好以及什么时候最好的唯一方法就是在 erlang 中编程一段时间。这不是关于 erlang 做得最好的问题,而是更多地关于理解使用 erlang 的小型生成和 otp 的功能设计模式与尝试用命令式语言解决相同问题的比较。简短的利弊清单并不能公正地说明问题。 Google 的 go 例程和通道、haskell 和 D 都可以进行类似的操作,没有任何问题。 Erlang 特别擅长分布式。在较新的并发语言中,您实际上不必太努力地使事情并发。特别是在 erlang 中,如果你让你的生成均匀地执行 CPU 密集型任务,那么你正在使用并发。您不会找到太多关于 erlang 机器人技术的信息,但您会找到 3 本书,其中有很多关于使事物分布式和并发的示例,这些示例解决了许多相同的问题。其他并发语言通常不以这种方式专门化。 Erlang 中内置了许多有用的原语。

很多帖子都是关于用其他语言做类似的事情,但坚持使用 erlang 可以节省大量工作。

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=%22erlang+style%22+%22(并发|消息+传递)%22
http://groups.google.com/group/golang-dev/browse_thread/thread/e120a586441b9b24/806eab93bd5281a0?#806eab93bd5281a0

the only way to understand where erlang is best and when it's best, is to program in erlang for awhile. It's not about what erlang does best, it's more about understanding how a functional design pattern using erlang's small spawns and otp compares to trying to solve the same problems in a imperative language. A short bulleted pros and cons list will not do justice. Google's go routines and channels, haskell and D can act similarly without any problem. Erlang is particularly good at being distributed. In newer concurrent languages you don't really have to work too hard to make things concurrent. In erlang in particular, if you're making your spawns evenly do the cpu intensive tasks you are using concurrency. You won't find much information on erlang for robotics, but you'll find 3 books with lots of examples on making things distributed and concurrent which tackle many of the same problems. The other concurrent languages don't usually specialize in such a way. Many useful primitives are built into erlang.

A lot of posts have been made about doing similar things in other languages but sticking with erlang saves a lot of work.

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=%22erlang+style%22+%22(concurrency|message+passing)%22
http://groups.google.com/group/golang-dev/browse_thread/thread/e120a586441b9b24/806eab93bd5281a0?#806eab93bd5281a0

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文