Java or C++ for Robot programmeng?

  • Context: C/C++ 
  • Thread starter Thread starter matinking
  • Start date Start date
  • Tags Tags
    C++ Java Robot
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
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!
 
Physics news on Phys.org
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