0

Rosanswers logo

Hello,

I am working on my Bachelor-Thesis and I want to run a node from a MoveIt! tutorial. (http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/pr2_tutorials/kinematics/src/doc/kinematic_model_tutorial.html)

Do I have to build a package and set dependencies or is it enough to make a launch file? In which directory do I have to save the launch.file?

Thanks for your help.

Greetings Jonas


Originally posted by JonasG on ROS Answers with karma: 1 on 2018-04-12

Post score: 0


Original comments

Comment by gvdhoorn on 2018-04-12:\

Do I have to build a package

Not an answer, more a comment: technically: no, nodes can be started and created without packages, but it's perhaps not straightforward for novices and will make it more difficult to work with some/many of the tools ROS provides.

1 Answers1

0

Rosanswers logo

Quick answer: It is enough to make a launchfile, and it doesn't matter where you put it, as long as you have the compiled (in the sense of ready to run) node.

I'll try to shed some light on the "Do I have to build a package" part:

  • If you have a node installed as binary (e.g. via apt), you can run it directly without having to build a package, the package and the node are installed.
  • If you have the node only as source-code, you obviously have to compile the node, but as @gvdhoorn said, this technically doesn't need to be in a ROS package, even though I'd recommend you do that. (And actually, all tutorials and any prepared repositories will provide ROS packages).
  • To be able to use roslaunch, a node needs to be in a package. Otherwise, the <node> tag will not work due to the required pkg arg.
  • The roslaunch file doesn't need to be in a ROS package, as long as you call it like this: roslaunch <Path/to/launchfile>. If you put it in a ROS package, you can call it as roslaunch <PKG> <LAUNCHFILE>.

Originally posted by mgruhler with karma: 12390 on 2018-04-13

This answer was ACCEPTED on the original site

Post score: 0

Matthias
  • 5,805
  • 1
  • 1
  • 1