0
$\begingroup$

Rosanswers logo

Hi, I am trying to publish a message from rospy to a subscriber in rosjava. I am using ros hydro. I copy pasted the subscriber code from the tutorials into my rosjava folder and built it with catkin_make. I am getting errors related to adding the dependencies. I need to add them in the gradle file i think and i dont know how. can somebody help me with this? thanks I searched all the old and the new tutorials. I am using the subscriber code found here: http ://docs.rosjava.googlecode.com/hg/rosjava_core/html/getting_started.html#publishers-and-subscribers


Originally posted by uzair on ROS Answers with karma: 87 on 2013-11-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Dependencies go in the sub-project build.gradle files.

Dependencies for fellow sub-projects have the format (note you don't need any version specification):

dependencies {
  compile project(':fellow_sub_project_name')
}

Dependencies for artifacts (jars) that are outside your gradle super project (typically repo) have the format:

dependencies {
 compile 'org.ros.rosjava_messages:rosjava_test_msgs:[0.1,0.2)'
}

The uniquely qualified name here (org.ros.rosjava_messages) is the directory the artifact can be found. The name (rosjava_test_msgs) is the jar name. The [) brackets tell it to pick up the latest release in that range (e.g. 0.1.6).

Artifacts can usually be found either in /opt/ros/hydro/share/maven or at https://github.com/rosjava/rosjava_mvn_repo.


Originally posted by Daniel Stonier with karma: 3170 on 2013-11-26

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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