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

simple stand alone way to generate .java file from .msg file

asked 2013-11-13 07:03:20 -0500

elkcahsw gravatar image

updated 2013-11-14 22:34:21 -0500

Is there a simple way to generate a .java file from a .msg file?

I don't want to use gradle/maven/cmake/catkin_make/rosmake etc

I already have an existing java application with a existing build/project files where I want to read data someone else is posting in a ROS topic. I can add the rosjava jar files easily enough but I don't have the .java file for specific custom message being published.

The tutorials seem to imply that I need to create a very complicated gradle/catkin project just to get the .java generated. I tried following the tutorials but just get bogged down in a lot of problems that don't seem relevant to my real goal anyway.

edit retag flag offensive close merge delete

Comments

What is your real goal? If you actually want to subscribe to a ROS topic from Java, then I'm afraid there is no easier way than creating a full-blown rosjava application.

Martin Günther gravatar image Martin Günther  ( 2013-11-14 22:35:38 -0500 )edit

I think I made the "real goal" clear already. I have an existing application that can read data from a number of possible data sources with different API's/protocols etc. Only one provider of data wished to publish data using a ROS topic. All of the other data providers had no trouble understanding that asking me to rebuild my application from scratch just to add their data source was completely unreasonable.

elkcahsw gravatar image elkcahsw  ( 2013-11-15 03:02:27 -0500 )edit

No reason to get all excited, I'm just trying to help you out here - don't shoot the messenger. Maybe you find a way to accomplish what you want, good luck!

Martin Günther gravatar image Martin Günther  ( 2013-11-15 05:29:05 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2013-11-21 11:38:40 -0500

Daniel Stonier gravatar image

It would be good to get your feedback on where you got bogged down so we could improve the automated process rather than opting for a custom, manual approach.

If that is what you want to do, you can find the relevant details in the plugin code here.

Essentially you are just executing java on the message_generation jar's org.ros.internal.message.GenerateInterfaces method.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-11-13 07:03:20 -0500

Seen: 422 times

Last updated: Nov 21 '13