ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Rosjava import defaultnodefactory fails

asked 2012-01-16 05:37:19 -0600

KoenBuys gravatar image

Hi all, I've checked out rosjava from mercurial in my ros package path. It complains with the import statement of DefaultNodeFactory:

      [javac] /home/u0062536/ros/raw/kb-home-pkg/HA_android_GUI/build.xml:26: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
      [javac] Compiling 2 source files to /home/u0062536/ros/raw/kb-home-pkg/HA_android_GUI/build
      [javac] /home/u0062536/ros/raw/kb-home-pkg/HA_android_GUI/src/ cannot find symbol
      [javac] symbol  : class DefaultNodeFactory
      [javac] location: package org.ros.node
      [javac] import org.ros.node.DefaultNodeFactory;
      [javac]                    ^
      [javac] 1 error


This on a easy java code example:

import org.ros.address.InetAddressFactory;
import org.ros.node.Node;
import org.ros.node.NodeConfiguration;
import org.ros.node.DefaultNodeFactory;

 * The HelloWorldApp class implements an application that
 * simply prints "Hello World!" to standard output.
class RosTestApp {
    public static void main(String[] args) {
        System.out.println("Hello World, trying to get ROS to work, with NF!"); // Display the string.

If the DefaultNodeFactory is commented out the code does work perfect. Rosjava compiles fine and is added in the manifest of this package. The goal of the package is to build a android app that uses rosjava to connect to a roscore.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2012-01-16 19:35:48 -0600

damonkohler gravatar image

The wiki documentation is for the released version of rosjava. If you're using rosjava from head, then you should start with the rosjava_tutorial_pubsub package or the android_tutorial_pubsub package.

edit flag offensive delete link more


I've tried the code which works. As my goal is to write a publisher on android tablet I've tried to check out the code, however this one doesn't compile. When I do rosmake --rosdep-install --pre-clean I get an error.
KoenBuys gravatar image KoenBuys  ( 2012-01-21 21:27:27 -0600 )edit
roslib.packages.InvalidROSPkgException: Cannot locate installation of package parsec_msgs: [rospack] couldn't find package [parsec_msgs]. ROS_ROOT[/opt/ros/electric/ros] ROS_PACKAGE_PATH[/home/u0062536/ros:/opt/ros/electric/stacks] However on the ros website this package is unknown.
KoenBuys gravatar image KoenBuys  ( 2012-01-21 21:28:56 -0600 )edit
That's a bug. Instead of trying to build the whole stack, build the packages individually. The parsec_msgs package is only a dependency of android_rosserial
damonkohler gravatar image damonkohler  ( 2012-01-23 01:20:05 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-01-16 05:37:19 -0600

Seen: 297 times

Last updated: Jan 16 '12