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

[rosjava] How to start to use rosjava_core with maven

asked 2019-01-21 04:08:07 -0500

OliverR gravatar image

Hi,

I want to start to work with rosjava. I have cloned https://github.com/rosjava/rosjava_core and I try to follow the tutorial http://rosjava.github.io/rosjava_core...

./gradlew install and ./gradlew docs works fine

./gradlew test failed for 4 from 145 test.

I am working on Ubuntu 16.

In the next step I want to implement a simple test class to listen to a "native" ros node of my roboter. Befor this I want to create some java code to get a list auf running nodes. I am working with the Netbeans IDE. I do want to create a maven project because I am not so familar with gradle and I am unclear about the current status of the Netbeans gradle support.

How to come to a pom.xml with the needed dependencies pointing to the my local rosjava_core installation?

best regards Oliver

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-21 07:16:29 -0500

jubeira gravatar image

updated 2019-01-21 07:16:45 -0500

I've never tried pointing to a local installation with Maven; for a remote one you can do:

<repositories>
    <repository>
        <id>rosjava_mvn</id>
        <name>Public Rosjava repository</name>
        <url>https://github.com/rosjava/rosjava_mvn_repo/raw/master</url>
    </repository>
    <repository>
      <id>jcenter</id>
      <url>https://jcenter.bintray.com/</url>
    </repository>
</repositories>

And then add rosjava_core as dependency:

<dependencies>
    <dependency>
        <groupId>org.ros.rosjava_core</groupId>
        <artifactId>rosjava</artifactId>
        <version>[0.3, 0.4)</version>
    </dependency>
</dependencies>

I'd guess there's some equivalent to the url tag to access your local installation; perhaps you can look for that in StackOverflow. If you are not editing rosjava_core's source, just point to the official maven repo as described above. You can also point to a remote fork with your changes if you want by specifying another URL.

Hope it heps!

edit flag offensive delete link more

Comments

Thanks a lot for your quick help. Now I have a working maven project with the needed ROS dependencies to the remote repository.

OliverR gravatar image OliverR  ( 2019-01-22 04:36:48 -0500 )edit

Great! Please mark the answer as correct when you can so others can make use of it :)

jubeira gravatar image jubeira  ( 2019-01-22 06:30:00 -0500 )edit

Did you manage building it? Can you share your source code on how to get the running ros nodes?

CoderOfTheForce gravatar image CoderOfTheForce  ( 2020-11-24 12:08:43 -0500 )edit

Question Tools

Stats

Asked: 2019-01-21 04:08:07 -0500

Seen: 678 times

Last updated: Jan 21 '19