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

Able to use rosjava and roscore together?

asked 2012-04-23 22:01:00 -0500

MarkyMark2012 gravatar image

Hi all,

Sorry another question as I dig through the documentation - am I able to use rosjava to create a publishing node and have the C++ roscore/rest of ros pick it up?

Reason I'm asking is because I've already got some parsing code in Java that I can reuse, but will prog the rest of my system in C++.

Thanks

Mark

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2012-04-24 06:54:01 -0500

Chad Rockey gravatar image

updated 2012-04-25 08:01:30 -0500

Yes, the ROS publish subscribe system allows you to publish in one language, but subscribe in others. This is useful for having high performance nodes in C++ but high complexity nodes in Python. Since you already have functionality in Java, it's perfect to use Java to parse and then send it to another node in another language for processing.

You should note that there isn't a requirement to have a 'roscore' for each language. A roscore is a program that acts as a control hub to tell subscribers where to ask for data from a topic. These only interact with other nodes over the network. For example, it is NOT necessary to launch the python roscore for python nodes and launch the Java roscore if you have nodes in Java. You only need to have one roscore running.

More information on that, see these links. Concepts Master

edit flag offensive delete link more

Comments

Chad - thanks for the info - I was hoping that'd be the case

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-24 12:19:22 -0500 )edit

You should note that although there isn't a roscore for every language, there is one for Java. It is interchangeable with the official roscore in Python.

damonkohler gravatar image damonkohler  ( 2012-04-25 07:57:00 -0500 )edit

Thanks Damon. I tried to clarify this in an edit. I meant to say that you aren't forced to run the Java roscore to run Java nodes.

Chad Rockey gravatar image Chad Rockey  ( 2012-04-25 08:02:43 -0500 )edit

Cool - figured that'd be the case. Once I get Eclipse to work (Found the tuts on that) hope to have a basic node connecting to my existing svr over the weekend. Cheers M

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-25 21:54:55 -0500 )edit

Question Tools

Stats

Asked: 2012-04-23 22:01:00 -0500

Seen: 462 times

Last updated: Apr 25 '12