C/C++ Java or C++ for Robot programmeng?

  • Thread starter Thread starter matinking
  • Start date Start date
  • Tags Tags
    C++ Java Robot
AI Thread Summary
The discussion revolves around the choice between C++ and Java for programming mobile robots, particularly in the context of implementing complex navigation algorithms and localization strategies. The primary concern is performance, especially when deploying on ARM microprocessors or DSPs. The original poster expresses a preference for Java due to its interesting features but worries about its speed compared to C++. Responses highlight that while Java can be powerful, it often requires advanced knowledge to optimize performance, and many users find C++ faster for critical tasks such as file handling and memory management. C++ is noted for its efficiency and support for pointers, making it a strong candidate for embedded systems. Overall, the consensus leans towards C++ for performance-critical applications in robotics.
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!
 
Technology 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 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:
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
What percentage of programmers have learned to touch type? Have you? Do you think it's important, not just for programming, but for more-than-casual computer users generally? ChatGPT didn't have much on it ("Research indicates that less than 20% of people can touch type fluently, with many relying on the hunt-and-peck method for typing ."). 'Hunt-and-peck method' made me smile. It added, "For programmers, touch typing is a valuable skill that can enhance speed, accuracy, and focus. While...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top