Java or C++ for Robot programmeng?

  • Topic: C/C++ 
  • Thread starter matinking
  • Start date
  • Tags Tags
    C++ Java Robot
2 replies · 2K views · last reply
matinking
Messages
15
Reaction score
0
Hi everyone!

I am a mobile robot designer in autonomous space robotics. there is a great dilemma in front of me to opt a programming language for the robots between C++ and Java.
the most important factor for me is performance of the language when i want to use it for applying very complicated navigation algorithms and very sophisticated localization strategies, for example.
I have experience in working both of them. I got Java more interesting but because of the special compiling process which it has, I feel that it could be run on the PC slower than C++!
I've tried to investigate about them collected the opinions of the other and find somethings but they couldn't help me deciding.
for example:

many of the programmers think that java is faster and have better performance whereas I found it slower...! of course, there is a very important thing. I finally want to program my on a ARM microprocessor or a DSP and I'm not sure that java is slow on them too or not!

but the others think that C++ is more powerful than all languages such as java and its operation is better than Java noticeably. furthermore, descendent of the C++ in design of different robotic packages is undeniable.

All in all, what is your opinion? which one could be the best choice for me?

Thank you!
 
Hi matinking,

I have some experience in quad-copter algorithms and a bit of experience in localization.
I use C/C++ for the quad-copter I am developing and it is for some specific reasons.
Java is a easy programming language. Yes it has many features and can be very powerful.
Although if you want to make Java fast you need to be a Pro in Java knowing all its features.
I experienced that Java is slow in the simplest calculations and tasks.

Like I said I use C for my quad-copter because it is faster in the tasks it needs to perform.
Like writing files, writing registers and reading buffers.
I use C++ for some visualisation and logging it has to do.
Furthermore it supports pointers which is the big thing in Embedded Systems.

I hope I helped you making a decision.
If you have any questions, feel free to ask!
btw. my quadcopter is running on a ARM-cortex A8.

Good luck,
Zakaria
 
  • Like
Likes   Reactions: Tosh5457
ZlBarnoussi said:
I hope I helped you making a decision.

Look at the date on his post. I hope he's not still trying to make up his mind after more than three years. :biggrin: