Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Where is message_runtime for ROSJava without ROS Installation? #55

Open
Eatapie opened this issue May 24, 2018 · 2 comments
Open

Where is message_runtime for ROSJava without ROS Installation? #55

Eatapie opened this issue May 24, 2018 · 2 comments
Labels

Comments

@Eatapie
Copy link

Eatapie commented May 24, 2018

Hi, I'm new to ROSJava and I want to use ROSJava without ROS Installation to make a server and client just like in the rosjava tutorial, but it seems there's no message_runtime artificate in repository. Does it work still? Does anyone have experience of converting gradle project into maven? Since ROSJava uses gradle but I have to use Rosjava with maven.
Thanks in advance!

@jubeira
Copy link

jubeira commented May 24, 2018

Hi @Eatapie,

Yes, you can import rosjava dependencies into your Maven POM and it should work just fine. Try something like this (add rosjava_mvn_repo to your repository list where it corresponds before):

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

       <!-- Add whatever messages you need -->
        <dependency>
            <groupId>org.ros.rosjava_messages</groupId>
            <artifactId>std_msgs</artifactId>
            <version>[0.5, 0.6)</version>
        </dependency>

This should include the dependencies you need to start with without any ROS installation, as everything comes from Maven. Note that you will only be able to use the messages that are already defined in rosjava_mvn_repo; you will need a workaround if you need custom messages (such as creating a fork, or generating the messages and including them locally).

@Eatapie
Copy link
Author

Eatapie commented May 25, 2018

Thanks a lot! I want to repeat the pub-sub-tutorial in rosjava.
I see in build.gradle there is
apply plugin: 'application'
mainClassName = 'org.ros.RosRun
which adds a mainClass to java software and has a pre-configured task of this type named "startScripts", which creates start scripts for launching JVM applications.
In the tutorial when we accomplish all the compile and install tasks, we can call the Listener and Talker node, but how can I create java executable to start Listener node and Talker node with Maven? They are two node who share the same mainClass, how should I configure it to load the mainClass seperately with two these two sources? Where is org.ros.RosRun Class?
I really appreciate your help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants