0
$\begingroup$

Rosanswers logo

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

compile:
      [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/rostest.java:6: cannot find symbol
      [javac] symbol  : class DefaultNodeFactory
      [javac] location: package org.ros.node
      [javac] import org.ros.node.DefaultNodeFactory;
      [javac]                    ^
      [javac] 1 error
  
  BUILD FAILED

This on a easy java code example:

import java.net.URI;
import java.net.URISyntaxException;
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.


Originally posted by KoenBuys on ROS Answers with karma: 2314 on 2012-01-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by damonkohler with karma: 3838 on 2012-01-16

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by damonkohler on 2012-01-23:
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

Comment by KoenBuys on 2012-01-21:
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.

Comment by KoenBuys on 2012-01-21:
I've tried the http://www.ros.org/wiki/rosjava/Tutorials code which works. As my goal is to write a publisher on android tablet I've tried to check out the http://www.ros.org/wiki/android_core code, however this one doesn't compile. When I do rosmake --rosdep-install --pre-clean I get an error.

$\endgroup$

Your Answer

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