Which language is best for robotics? | Sololearn: Learn to code for FREE!

+121

Which language is best for robotics?

I’m relatively new to coding. Currently learning Python. If I want to build say mechanical arms or hardware as such in robotics, which program would be best suited for those programs?

2/26/2018 2:24:21 AM

Justin Amos

277 Answers

New Answer

+125

C, C++, and Python. Python is higher level, thus doesn't run as well, however is certainly doable via Micropython or Raspberry Pi. Arduino's use C and C++ to my knowledge. C++ can be complex to learn but C is simple.

+48

https://www.sololearn.com/Discuss/953227/?ref=app https://www.sololearn.com/Discuss/920085/?ref=app https://www.sololearn.com/Discuss/877772/?ref=app https://www.sololearn.com/Discuss/1041574/?ref=app https://www.sololearn.com/Discuss/1081585/?ref=app

+38

It is pretty irrelevant which programming language you will use as long as there is an interface for corresponding between the language and your hardware.

+35

It'll be driven by the processor and computing environment available on the robot itself. C is the typical language for embedded devices, but Forth is also a common language for industrial robots. Python is pretty expensive as a language and would require a "real computer" and OS to run, which may not be available. As Turing-complete languages, there isn't anything in principle that can't be done in one or the other, although - assuming you actually have an environment capable of running Python on the robot - low-level access and control is likely to be easier to do in C than Python. Python will be a lot slower than C (or Forth), which may or may not be an issue depending on what you're doing.

+24

agreed @ahri C++ is more complex than C, because the language has much more functionality. C++ is basically an extension of C. It can be useful to learn at least a little bit of C first, so that you can recognize it when you find a hardware library written in C. C/C++ are not as simple to use as, say, Python or MATLAB. It can take quite a lot longer to implement the same functionality using C and it will require many more lines of code. However, as robotics is very dependent on real time performance, C and C++ are probably the closest thing that we roboticists have to "a standard language".

+19

c/c++ python Java c#

+17

Robotics require processing speed combination with fast response to mechanical system. Better performance programs must be closer to the operating system and the choice for programming language should be C or C++. Beginners can always choose easy programming language like the Python.

+14

Good information on programming language for robotics .. https://blog.robotiq.com/what-is-the-best-programming-language-for-robotics

+12

In 2018, the easiest and most convenient way is to use JavaScript. Nodebots or the powerful cyclone.js are great solutions. And there's more. I had seen a youtube video that showed the power of node.js for this kind of thing and explained why it was the future.

+12

In conclusion most languages are Assembly C C++ Python Lisp Java JavaScript All these are free.

+11

Most important is not which language but why is important. I hope all can provide the reason behind why such language is important.

+11

what programming? @Gayathri Gayu

+10

It's a question that a lot of new roboticists will ask at least once in their career. Found somewhere, hope that will help: https://blog.robotiq.com/what-is-the-best-programming-language-for-robotics https://engineering.eckovation.com/best-programming-languages-robotics/

+10

@Timon ^^ Yes. But it was a conf in France on the subject.

+10

Python script can run from Android using ssh client or juicessh . http://mygeeks014.blogspot.my/2015/02/remote-control-your-raspberry-pi-with.html?m=1

+9

if you are going to make a robot u must learn a chip programming language... such as PIC programming language,raspberry and arduino... PIC programming language is pretty Complecated because its a mid level language.You can programme PIC Ics using PIC Programming language. PIC ic is cost about 1$ to 3$ Basicaly arduino is a kind of "C" or "C++"language with its own commands... and You must buy a development board with atmega chip.Most of the beginners use arduino Uno and it cost about 6$.There are so many kinds of arduino boards and you can easily find modules for arduino board like bluetooth modules,gyrascopes,etc.. if you want to get readings to pc you can use PROCESSING IDE to programme a software.its base language is java and you can also download python plugins and cording using python.. So as a begginner I recommend you to use arduino...becouse it is very easy and it gets low costs than others I tell these with my expiriance

+9

On my side python is the best for machine learning programming, but also you can use C or C++ according to your needs.

+8

Could you explain why one may be better over the other. I’ve heard c++ is harder and python is more simple. But what makes one better for certain things than others?

+8

As what @Amit said many doesn't seem to understand the terms robotics and mixed up with Arduino. I suggest pls do proper search and try to understand what are those. As I replied earlier this link gives a very good understanding on programming language for robotics. https://blog.robotiq.com/what-is-the-best-programming-language-for-robotics

+7

You can use C++, it should work fine