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

Is possible to read/write ros topic from Java?

asked 2012-10-01 02:21:56 -0500

Andrea Luzzana gravatar image

updated 2012-10-10 08:56:01 -0500

SL Remy gravatar image

I would like to write a (initially) simple Java program that writes messages to a ros topic and reads messages from another topic. Is this possible?

Thank you!

Andrea Luzzana

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2012-10-01 03:17:52 -0500

MarkyMark2012 gravatar image

updated 2012-10-10 05:40:50 -0500

damonkohler gravatar image
edit flag offensive delete link more

answered 2012-10-01 02:31:46 -0500

Lorenz gravatar image

Sure. Why not? All you need is one subscriber and one publisher.

edit flag offensive delete link more

answered 2013-12-18 10:03:22 -0500

Ivano Malavolta gravatar image

You can also use the well-known Ros Bridge package (

edit flag offensive delete link more

answered 2012-10-01 02:59:53 -0500

Andrea Luzzana gravatar image

Ok! Now i am a little confused about how to write such a java program. I found a small java example that simply imports some "ros java packages" and extends NodeMain class to make a ros node in java.

The big question is where to find these packages, in particular org.ros.node.* and org.ros.node.topic.Publisher and so on.

Are they distributed with rosjava_core?

edit flag offensive delete link more



Please do not create answers just for discussion. Instead, please either edit your original question or use the comment functionality.

Lorenz gravatar image Lorenz  ( 2012-10-01 03:18:53 -0500 )edit

Yes they are, you need to install do the proper install though, its more lengthy than typical for a ros package

Jyo gravatar image Jyo  ( 2012-10-03 11:04:26 -0500 )edit

Question Tools


Asked: 2012-10-01 02:21:56 -0500

Seen: 940 times

Last updated: Dec 18 '13