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

how to run rosjava_tutorial_pubsub? [closed]

asked 2012-03-20 02:40:27 -0600

Ze JI gravatar image

updated 2012-03-20 02:41:29 -0600

I might have missed something, but based on the wiki and tutorial of Rosjava, I can not figure out how to run the tutorial code of Rosjava_tutorial_pubsub.

I compiled rosjava with Gradle (earlier have tried to install from Ubuntu repository as well as compiled with Rosmake).

  1. There is no run.py in rosjava_bootstrap, so that I cannot use the command from the tutorial: rosrun rosjava_bootstrap run.py <> <*>

  2. Also, Rosrun won't find any executable from rosjava_tutorial_pubsub.

Any idea or link that can help?

Thanks.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by damonkohler
close date 2012-07-10 21:20:32

4 Answers

Sort by » oldest newest most voted
1

answered 2012-03-27 02:23:54 -0600

damonkohler gravatar image

updated 2012-04-11 03:12:26 -0600

The run.py script is no longer used since the switch to Gradle. Instead, rosjava_tutorial_pubsub creates an executable jar using Gradle's Application plugin. See the documentation which describes how to execute the Talker and Listener nodes from the pubsub tutorial:

http://docs.rosjava.googlecode.com/hg/rosjava_core/html/getting_started.html#executing-nodes

Also make sure to follow the documentation on installing and building rosjava_core:

http://docs.rosjava.googlecode.com/hg/rosjava_core/html/installing.html http://docs.rosjava.googlecode.com/hg/rosjava_core/html/building.html

edit flag offensive delete link more
0

answered 2012-03-20 04:08:44 -0600

edit flag offensive delete link more
0

answered 2012-04-06 22:08:22 -0600

adam gravatar image

hi,

is there any consensus on how to run the pubsub tutorial for rosjava post the switch to gradle? I can't get the above 'dirty workaround' to work, and am not sure how to otherwise run this tutorial. (I have successfully installed and compiled rosjava_core using ./gradlew install). Is the jar created by the pubsub tutorial supposed to be executable? If i run

java -jar rosjava_tutorial_pubsub-0.0.0-SNAPSHOT.jar

i get:

no main manifest attribute, in rosjava_tutorial_pubsub-0.0.0-SNAPSHOT.jar

thanks

edit flag offensive delete link more

Comments

See the documentation linked from the accepted answer above.

damonkohler gravatar image damonkohler  ( 2012-04-11 03:12:59 -0600 )edit
0

answered 2012-07-05 23:36:47 -0600

ChrisEule gravatar image

updated 2012-07-06 00:50:52 -0600

Hello guys,

i also have a problem to build and run the pubsub tutorial project. I followed that tutorial http://docs.rosjava.googlecode.com/hg/rosjava_core/html/getting_started.html but the step "Executing nodes" doesn't work for me unfortunatelly. The build process (../gradlew installApp) runs without any errors 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. Isn't the tutorial up to date or may this be a bug?

Edit: In the consoleoutput I found that warning when the build process is building rosjava_tutorial_pubsub project:

warning: [options] bootstrap class path not set in conjunction with -source 1.6

That warning appears for several projects in the rosjava_core folder (e.g. rosjava_bootstrap, rosjava_messages, etc.). May this be the reason for the problem?

thanks

edit flag offensive delete link more

Comments

Please do not post new questions as answers to existing questions. Create a new question instead.

damonkohler gravatar image damonkohler  ( 2012-07-10 21:20:24 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2012-03-20 02:40:27 -0600

Seen: 612 times

Last updated: Jul 06 '12