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

Revision history [back]

The rosdep error is not critical, it just means that the ROS doesn't know about the correct package for your Ubuntu version. Just compile without the --rosdep-install flag, i.e rosmake rosjava. To me the error doesn't look like an the system cannot find ant, I don't see anything like ant missing when you are compiling. In particular the message says that the error happens in an ant file which indicates that ant was actually called.

After calling rosmake once on your package, you can directly call ant to just compile it. Did you try that? Also, you didn't paste the compiler error output which might really help.

Your current code will not compile against current rosjava. Rosjava has been refactored a lot over the last few weeks and the NodeMain interface changed. DefaultNodeFactory is gone, too.

The rosdep error is not critical, it just means that the ROS doesn't know about the correct package for your Ubuntu version. Just compile without the --rosdep-install flag, i.e rosmake rosjava. To me the error doesn't look like an the system cannot find ant, I don't see anything like ant missing when you are compiling. In particular the message says that the error happens in an ant file which indicates that ant was actually called.

After calling rosmake once on your package, you can directly call ant to just compile it. Did you try that? Also, you didn't paste the compiler error output which might really help.

Your current code will not compile against current rosjava. Rosjava has been refactored a lot over the last few weeks and the NodeMain interface changed. DefaultNodeFactory is gone, too.

EDIT: The output definitely shows a problem when compiling rosjava:

...
[javac] RosoutLogger.java:188: package org.ros.message.rosgraph_msgs does not exist
[javac]       publish(org.ros.message.rosgraph_msgs.Log.FATAL, message);
[javac]                                            ^
[javac] RosoutLogger.java:196: package org.ros.message.rosgraph_msgs does not exist
[javac]       publish(org.ros.message.rosgraph_msgs.Log.FATAL, message, t);
[javac]                                            ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 24 errors

Some of the required messages could not be found. There is a certain chance that the following steps could work:

  1. Check that rosgraph_msgs is installed on your system: 'rospack find rosgraph_msgs' should print a path.
  2. Remove all build relicts from previous rosjava builds:

    rm -rf ~/.ros/rosjava

  3. Rebuild everything:

    rosmake --pre-clean rosjava

Now, the compiler shouldn't complain anymore. However, your package isn't built yet. You can try compiling it with 'rosmake my_package'. With your current code, this will fail however because your package uses a deprecated rosjava API.