0
$\begingroup$

Rosanswers logo

I have tried to follow the tutorials regarding building rosjava:

First, I installed rosjava from source, as described here: http://www.ros.org/wiki/rosjava/Tutorials/Install

Next, I tried to build it: roscd rosjava_core rosmake There were no errors, but plenty of warnings, including: [rosmake-0] Finished <<< rosjava No Makefile in package rosjava

What steps am I missing? Do I create a makefile by hand as described for a new package? Ant does not work, because there is not a build.xml file. There is, however, a build.gradle file. However running gradle returns an error.

Basically, I would like to compile rosjava from source and then run the tutorial as described here: http://www.ros.org/wiki/rosjava/Tutorials/Running%20rosjava_tutorial_pubsub

What am I missing to get rosjava installed and built?

Thanks in advance.

Update: I should add that when I tried to run 'gradle build' in the rosjava_core directory, the error was something like, "Could not find method maven() for arguments". Then, I updated my gradle by downloading it, to version 1.0-milestone-8a, and that error went away.

Now, when I try to run 'gradle build', it gets much farther, but then stops at another error: Could not resolve all dependencies for configuration ':rosjava:compile'.

Could not find group:ros, module:message.std_msgs, version:0.0.0-SNAPSHOT. Required by: ros.rosjava_core:rosjava:0.0.0-SNAPSHOT Could not find group:ros, module:message.rosgraph_msgs, version:0.0.0-SNAPSHOT. Required by: ros.rosjava_core:rosjava:0.0.0-SNAPSHOT

This seems very similar to an unresolved issue: http://forums.gradle.org/gradle/topics/maven_plugin_install_task_not_being_called

Perhaps the current source snapshot of rosjava is not buildable? Please correct me if I am building this incorrectly, the tutorial seems to be out of date. Thanks.


Originally posted by ceverett on ROS Answers with karma: 332 on 2012-03-07

Post score: 2

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I'm having the same problem. I updated from the repo on Monday and everything built fine. I updated again Tuesday afternoon and it failed to build. It appears the problem is with the commits merged by Damon on Tuesday morning.

Going back to hash 1084ec6c569c (the last commit before his changes) builds for me with no modifications. This is a slightly newer version than the one suggested in the previous answer.


Originally posted by david.hodo with karma: 395 on 2012-03-07

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by ceverett on 2012-03-07:
Thanks for confirming the issue. I tried this later version, and it works as well: rosinstall using that tag; roscd rosjava_core; rosmake. That worked. Then, I followed the steps on the tutorial to run roscore, the listener and the talker. Thanks!

Comment by david.hodo on 2012-03-08:
Also, if you are using rosjava for Android, the rosjava.android repository should be checked out with revision hash 2feb1d497d6e. Changes were made to convert it to Gradle at the same time as rosjava and seem to have broken it as well.

Comment by damonkohler on 2012-03-11:
FYI, I've started adding documentation on the new build system: http://docs.rosjava.googlecode.com/hg/html/building.html

$\endgroup$
0
$\begingroup$

Rosanswers logo

I solved this issue this way, by using an old version of rosjava for now, and also modifying the files slightly.

  • Use the rosjava_core from hash ea121c0749f2 by using this .rosinstall snippet:
- hg:
    local-name: rosjava_core
    uri: https://rosjava.googlecode.com/hg
    version: ea121c0749f2
  • Running rosmake rosjava doesn't just work on that for me (although it might for you) so I had to also remove references to debuglevel="${debuglevel}" in the files rosjava/build.xml and rosjava_bootstrap/scripts/build-msg.xml.

Once I did these two things, rosmake rosjava worked as expected, and the tutorial steps on the Tutorial Page worked as expected.


Originally posted by jamuraa with karma: 218 on 2012-03-07

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by ceverett on 2012-03-07:
Thanks for your help. That works. I suppose this will suffice until the latest rosjava is working. I got the version you showed here, did rosmake in rosjava_core, and the tutorial steps work.

$\endgroup$

Your Answer

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