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

How to build and run the pub sub tutorial in rosjava?

asked 2012-07-13 02:34:16 -0600

ChrisEule gravatar image

updated 2012-07-13 02:35:03 -0600

Hello guys,

i have a problem to run the pubsub tutorial project in rosjava. I build rosjava_core successfully and followed this tutorial but the step "Executing nodes" doesn't work for me unfortunatelly. The build process (../gradlew installApp) runs without any errors (only a warning "bootstrap class path not set in conjunction with -source 1.6") but there is no path "/rosjava_tutorial_pubsub/bin/rosjava_tutorial_pubsub" in directory build. Even the executable nodes (Talker and Listener) cannot be found anywhere in the project. Maybe the tutorial isn't up to date here?


edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2012-07-21 15:20:58 -0600

liangfok gravatar image

I also ran into the same problem and think there is an error in the tutorial. To execute the example, I had to change:

./build/rosjava_tutorial_pubsub/bin/rosjava_tutorial_pubsub org.ros.rosjava_tutorial_pubsub.Talker & ./build/rosjava_tutorial_pubsub/bin/rosjava_tutorial_pubsub org.ros.rosjava_tutorial_pubsub.Listener


./build/install/rosjava_tutorial_pubsub/bin/rosjava_tutorial_pubsub org.ros.sjava_tutorial_pubsub.Talker & ./build/install/rosjava_tutorial_pubsub/bin/rosjava_tutorial_pubsub org.ros.sjava_tutorial_pubsub.Listener

edit flag offensive delete link more


What ROS version is used for this tutorial?

uzair gravatar image uzair  ( 2013-11-23 09:39:36 -0600 )edit

answered 2012-07-13 02:53:44 -0600

KruseT gravatar image

updated 2012-07-13 02:54:45 -0600

I just ran the tutorials, and they worked fine for me. I summarized what I found on a tutorial wiki page.

For me the executable is located in build/install.

Maybe you can paste the contents of your build.gradle as well as the results of

$ find src
$ find build

here so that it is easier to understand what happened. For now I would suspect that you did not create the folder structure src/main/java as required by gradle.

edit flag offensive delete link more

answered 2013-11-23 18:59:05 -0600

Daniel Stonier gravatar image

Rosjava has been moving on - some up to date information (Nov '13) for appropriate tutorial documentation:

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-07-13 02:34:16 -0600

Seen: 1,845 times

Last updated: Nov 24 '13