Rosanswers logo

Dear all,

I try to run my rosjava node from within a launchfile. My launchfile looks like this

 <master auto="start"/>
 <node pkg="rosjava_cylinder_reasoner" type="rosjava_cylinder_reasoner"  name="cylinder_reasoner" args="de.dfki.reasoner.Service" 
 respawn="false" output="screen"/>

The problem is that there are two generated wrapper scripts (generated from gradle) which execute the node, one is in build/install/... one is in build/scripts/. Per default roslaunch wants to execute the script in /scripts/ which results in an error because the relative path to lib (the classpath) is not set. The only solution I found so far is to delete the wrapper script from the /build/scripts/ directory. Is there any other solution to point roslaunch to the right wrapper script?

Originally posted by Markus Eich on ROS Answers with karma: 202 on 2012-05-22

Post score: 0


1 Answer 1


Rosanswers logo

I am using the following Makefile in my rosjava package.

SOURCES=$(shell find src/main -name *.java)

all: installed

installed: $(SOURCES)
    `rosstack find rosjava_core`/gradlew installApp
    mkdir -p bin
    ln -sf ../build/install/$(PACKAGE)/bin/$(PACKAGE) bin/execute
    chmod a+x bin/$(PACKAGE)
    touch installed rospack_nosubdirs

    `rosstack find rosjava_core`/gradlew clean
    rm -rf bin installed rospack_nosubdirs

To use this Makefile, you'll have to manually replace PACKAGE-NAME once. You can then use "execute" as the node type.

This solution isn't exactly pretty, but works effectively well. It also allows for rosmake/make to build the package as well. I am also interested if there are any other better solutions around.

Originally posted by piyushk with karma: 2871 on 2012-07-27

This answer was ACCEPTED on the original site

Post score: 2


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.