Robotics StackExchange | Archived questions

How do I use Java with ros melodic?

What is the best way to use ROS with Java? Searching online I found the rosjava and rosbridge package, which one is the best?

Asked by rezenders on 2018-10-04 11:11:30 UTC

Comments

Answers

Hi @rezenders,

rosbridge is not implemented in Java; it's a library that allows you to bridge, for example, ROS topics with web client applications.

If you want to use ROS with Java, you will need rosjava. Start looking here: https://wiki.ros.org/rosjava.

You will notice that there's no release for Melodic just yet. To start with, the only difference would be differences in standard ROS messages. Other than that, you can still use it and it should still work. What do you want to do exactly?

Asked by jubeira on 2018-10-04 13:36:05 UTC

Comments

Thank you for answering.

I have a system that is composed by some ROS nodes, and due to a specific requirement I need to make a Java program that is able to subscribe and publish to the topics that are being used by those ROS nodes.

So far I only used ROS with c++ and python.

Asked by rezenders on 2018-10-04 19:14:49 UTC

Can I install rosjava from other release with no problem? Is there any difference when installing?

Asked by rezenders on 2018-10-04 19:15:47 UTC

@jubeira: rosbridge itself is not implemented in Java, but there are client implementations available in that language:

Asked by gvdhoorn on 2018-10-05 02:06:09 UTC