Why are C, C++, and LISP so prevalent in embedded devices and robots?

后端 未结 16 607
后悔当初
后悔当初 2021-01-31 10:57

It seems that the software language skills most sought for embedded devices and robots are C, C++, and LISP. Why haven\'t more recent languages made inroads into these applicat

相关标签:
16条回答
  • 2021-01-31 11:01

    My guess is that C/C++ are used because they are closer to the hardware and allow for resource-aware programming. This is generally true for all embedded projects, not just robotics.

    Then I guess that LISP is often chosen, because it still seems the predominant language in artificial intelligence research. LISP is probably used for the higher level workings of the robot, I suppose.

    0 讨论(0)
  • 2021-01-31 11:02

    Java made another milestone this year when it became a programming option for the FIRST Robotics Competition. FRC is an impressive competition involving over 77,000 high-school students, mentors, and volunteers from around the world building 120 pound robots in six weeks. I just posted some results about this on my blog.

    By strange coincidence (or not), it uses the same Java VM as the Sun SPOTs mentioned in the original question.

    0 讨论(0)
  • 2021-01-31 11:04

    Having worked with robotics, my answer is efficiency. Yes, you can run a Java Virtual Machine on cell phones. But how efficient will it be? I was on a team that wanted to run a Java Virtual Machine on a full Windows XP machine on a robot, running multiple realtime monitoring applications in Matlab. Needless to say, we were dropping frames like it was no one's business. Moral of the story, override people who don't understand computing even if you need to override your supervisors if it's going to sink your operation.

    Yes, you could run Python, and I've seen it done to manage multiple C processes. But at the end of the day, running C allows you to do some direct manipulation of connections so much easier and reliably than some of the higher level codes, and therefore is preferred.

    0 讨论(0)
  • 2021-01-31 11:06

    Lisp is/was used in some research and some commercial robots. iRobot for example uses it. Here is an older article about their Common Lisp variant called L (<- Link).

    Lisp is used when there is need for special higher level libraries, for example for complex planning operations. There are lots of libraries written over time for various planning operations, including planning of actions and movements of autonomous systems.

    0 讨论(0)
  • I just read some introductory Erlang materials and one of the first things they said was that Erlang was suitable for "Soft" real-time control. This is not something that I would want in any robot near me.

    In addition I would say that robots (as in industrial) currently have no real need for hot swapped code. They are working on a piece basis and there will always be scheduled downtime to reload code at an appropriate moment - which of course is well tested in an offline unit.

    0 讨论(0)
  • 2021-01-31 11:14

    I once built a robot based on Java. It garbage collected right into a wall.

    If you're going to have processes running that you can't micromanage (eg, a Linux based system) then they must know to yield to certain high priority processes like motion control. So either you do it yourself in a low level language like C, or you use an RTOS.

    0 讨论(0)
提交回复
热议问题