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

rosjava maven dependencies

asked 2013-12-31 12:53:06 -0600

rlsutton1 gravatar image

I'm following the steps listed here http://rosjava.github.io/rosjava_core/hydro/installing.html

What I really want to do, is add some maven dependencies to my existing maven (eclipse) project and start writing and testing rosjava.

Issues I found:

  1. The eclipse target doesn't exist in the gradle build.
  2. The build creates some maven artifacts, but is quite there are quite a few missing.
  3. Gradle was not able to find dependencies that were not already in my maven repo.

I checked out rosjava_core from git, gradle was not able to find dependencies that were not already in my maven repo. I've manually added them to my maven repo.

Once rosjava_core was built, I worked out that it added the below artifact to my maven repo, so I added this dependency to my maven project...

    <dependency>
        <groupId>org.ros.rosjava_core</groupId>
        <artifactId>rosjava</artifactId>
        <version>0.1.6</version>
    </dependency>

My maven project build then failed with:

No versions are present in the repository for the artifact with a range [1.9,1.10)
  org.ros.rosjava_messages:rosgraph_msgs:jar:null

So I proceeded to checkout rosjava_messages and build it, which produced lots of messages like this:

Couldn't find gateway_msgs on the ROS_PACKAGE_PATH

I have a full install for ros and my ROS_PACKAGE_PATH seems to be correct : /opt/ros/hydro/share:/opt/ros/hydro/stacks

and finally the build failed with this message:

FAILURE: Build failed with an exception.

* What went wrong:
Could not copy MANIFEST.MF to '/home/rsutton/git/rosjava_messages/rosjava_test_msgs/build/tmp/jar/MANIFEST.MF'.

At this point I returned to try to build my project which failed with this message:

No versions are present in the repository for the artifact with a range [0.1,0.2)
  org.ros.rosjava_bootstrap:message_generation:jar:null

So I proceeded to checkout and build rosjava_bootstrap, which built without any issues. :)

returning to my project it now fails with this message:

No versions are present in the repository for the artifact with a range [0.4,0.5)
  org.ros.rosjava_messages:tf2_msgs:jar:null

I expect this last error is because of the failures building rosjava_messages.

In summary

  1. There are a couple of issues with following the instructions.
  2. It would be really useful if there maven dependencies for ros java in an accessible maven repo somewhere.

Finally can someone point me in the right direction.

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-07-30 15:19:07 -0600

doc d. gravatar image

Hi, I'm trying the same with maven but get some compilation errors which I honestly don't understand why they appear. Could you provide a small demo project where you compiled a ros-Project with maven.

Thanks in advance

d.

edit flag offensive delete link more
0

answered 2014-01-01 11:36:57 -0600

rlsutton1 gravatar image

updated 2014-01-01 11:39:18 -0600

Answering my own question for the benefit of others, and the possiblity that someone might point out any issues with what I have done.

I have given up trying to build ros_java and have found a maven repo which contains it...

After some digging around, I've added the following repo to my pom.xml

    <repository>
        <id>ros</id>
        <name>ros</name>
        <url>https://github.com/stonier/rosjava_mvn_repo/raw/master</url>
    </repository>

along with this dependency (which I had before)

 <dependency>
        <groupId>org.ros.rosjava_core</groupId>
        <artifactId>rosjava</artifactId>
        <version>0.1.6</version>
    </dependency>

I am now able to build my maven project and have sucessfully started a pair of nodes which talk to each other.

edit flag offensive delete link more

Comments

The maven repo seems to be outdated as of now.

peci1 gravatar image peci1  ( 2014-11-13 07:51:34 -0600 )edit

Question Tools

Stats

Asked: 2013-12-31 12:53:06 -0600

Seen: 1,881 times

Last updated: Jan 01 '14