I am trying to follow the publisher/subscriber tutorial for rosjava provided at this link.
http : //rosjava.github.io/rosjava_core/latest/getting_started.html#creating-a-new-java-package
However, when i copy paste the code into a file in my project, I am getting compilation errors like (1)package std_msgs does not exist and 2)cannot find symbol) when i build my package with catkin_make. I am using catkin_make for building because this tutorial says so: --http ://wiki.ros.org/rosjava_build_tools/Tutorials/hydro/Creating%20Rosjava%20Packages
I added my dependencies (rosjava_bootstrap,rosjava_build_tools,std_msgs,rosjava_messages) in my package.xml file like this.(i think i should be doing this in the gradle file)
<build_depend>rosjava_build_tools</build_depend> <run_depend>rosjava_build_tools</run_depend>
How do I add the dependencies for the modules being imported in the begining of the publisher program. the modules are-
import org.ros.namespace.GraphName; import org.ros.node.Node; import org.ros.node.NodeMain;
Can somebody tell me how to add the dependencies?
Originally posted by uzair on ROS Answers with karma: 87 on 2013-11-15
Post score: 0
Original comments
Comment by uzair on 2013-11-15:
I am using ROS hydro.
Comment by jorge on 2013-11-17:
So you create a package following the second tutorial, and then you add the code from the first one? right? Can you just follow the second tutorial and compile without errors?
Comment by uzair on 2013-11-17:
I couldnt find any code for publisher or subscriber for the second tutorial using catkin_make for building. I am pretty sure i need to add the dependencies in the gradle file but i dont know how. I read the gradle tutorial where it says i need to specify the version of the package too. How do i specify these packages [.org.ros.namespace.GraphName; org.ros.node.Node; org.ros.node.NodeMain]according to the syntax given here for dependencies [http://www.gradle.org/docs/current/userguide/tutorial_java_projects.html]-go to example 7.4;