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

trying to publish from rospy and subscribe with rosjava

asked 2013-11-22 10:03:24 -0600

uzair gravatar image

updated 2014-01-28 17:18:37 -0600

ngrennan gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-26 19:46:50 -0600

Daniel Stonier gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-11-22 10:03:24 -0600

Seen: 149 times

Last updated: Nov 26 '13