ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Would ROS developers prefer a Java or Python application on the command line?

asked 2021-05-21 05:19:50 -0500

updated 2021-05-21 14:15:31 -0500

jayess gravatar image

I am writing code for a command-line application for testing ROS packages automatically. My current plan is to code it in Java (due to its potential, future deployment on the web).

I doubt if ROS developers mind installing a Java Virtual Machine to run a third-party Java tool (if it works well)? Ease-of-use will be my priority in making the decision. The application could also be written in Python, but I vaguely feel it would be somewhat harder to maintain due to my limited knowledge to Python ecosystem. Yet, if the ROS community prefers a tool in Python, I can go that way too.

Any input about Python vs Java in the scope of this question will be appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
8

answered 2021-05-21 06:47:51 -0500

gvdhoorn gravatar image

I'm only one voice here, but my preference would be Python.

Python is already installed on most platforms ROS 2 developers will be using, as many parts of ROS 2 are written in Python.

I doubt if ROS developers mind installing a Java Virtual Machine to run a third-party Java tool (if it works well)?

installing a JVM is indeed not too much overhead, but it is more work, so with all else equal, Python would probably still be preferable.

My current plan is to code it in Java (due to its potential, future deployment on the web).

With things like FastAPI, writing a web-enabled version of whatever you create should not be too difficult I believe.

edit flag offensive delete link more
1

answered 2021-05-21 17:21:54 -0500

Orhan gravatar image

If it is going to be open source or if it won't be containing any secret code that belongs to the company that will be using it, Python is the choice. I don't think maintaining a Python code will be too hard for a Java developer who is willing to get better in Python.

Unfortunately, some companies don't like a Python code being openly present in a product so if that's the case, due to closed source / obfuscation possibilities, Java would be preferable.

My answer might not sound nice from an Open Sourcer perspective but to future wonderers of this versus, I'd like to mention that some companies still work this way.

edit flag offensive delete link more

Comments

1

There are ways to distribute binary versions of Python applications, similar to how you'd do this with Java .class or .jar files. Obfuscation of both is possible.

There are certainly limitations to such approaches (as in: a determined adversary will be able to recover at least the byte-code with many of those methods, if not more), but I don't believe that's very much different from Java. Decompilation and reverse engineering of Java .class files is also very much possible.

gvdhoorn gravatar image gvdhoorn  ( 2021-05-22 02:37:26 -0500 )edit

I agree with your comment, people even hack embedded firmwares and there's no such system that is 100% hack proof. I actually used decompilers on Java codes very recently but some businesses still don't understand this or just some developers don't want to show their code. And there are more tools for obfuscation in Java and it is easier to obfuscate it comparing to Python.

Orhan gravatar image Orhan  ( 2021-05-24 07:42:23 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-05-21 05:19:50 -0500

Seen: 285 times

Last updated: May 21 '21