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

Do I have to build a package, when I want to run a node?

asked 2018-04-12 03:43:22 -0500

JonasG gravatar image

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/movei... )

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

edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-12 04:08:18 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-13 08:02:35 -0500

mgruhler gravatar image

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>.
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-04-12 03:43:22 -0500

Seen: 144 times

Last updated: Apr 13 '18