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

Is possible to read/write ros topic from Java?

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

Andrea Luzzana gravatar image

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

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
2

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

MarkyMark2012 gravatar image

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

damonkohler gravatar image
edit flag offensive delete link more
1

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

Lorenz gravatar image

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

edit flag offensive delete link more
0

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

Ivano Malavolta gravatar image

You can also use the well-known Ros Bridge package (http://rosbridge.org/doku.php?id=rosbridge_protocol_v2.0)

edit flag offensive delete link more
0

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

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

Comments

2

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 -0600 )edit

Yes they are, you need to install do the proper install though, its more lengthy than typical for a ros package http://docs.rosjava.googlecode.com/hg/rosjava_core/html/index.html

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

Question Tools

Stats

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

Seen: 987 times

Last updated: Dec 18 '13