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

Run ROS node on target

asked 2018-04-20 03:41:59 -0600

Fresh gravatar image

updated 2018-04-24 09:29:58 -0600

Edit 1: Thanks for the answer. The node that I want to start is not self written and is used to use a hardware. The node uses nodelets and a launch file to start the node. When I use the launchfile and I sourced the setup.bash before everthing works fine. But I want to avoid a launchfile. Is it possible to start a node with nodelets without a launchfile? The node must start two nodelets at the same time.

Hi I wrote a ROS node and want to run the node on another target. So my plan was to copy the executable to the target and start it there with rosrun. The project is a CMake project and when i have the whole workspace on the target and do a source command before it works. But when i only copy the executable i am not able to start the node with rosnode name /path-of-the-executable.

Is there something missing?

best regards Harald

edit retag flag offensive close merge delete


I'm confused as to why you would want to avoid a launch file?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-04-25 03:31:50 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-22 13:45:46 -0600

You cannot start a node using rosrun and the binary executable directly.

What you should do to deploy a node to a new target is to setup the installation parameters in your CMakeLists.txt as described here and run:

catkin_make install

Then you can copy the package directory containing only the install directory. If you then source this new work space you'll be able to rosrun your node.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-04-20 03:41:59 -0600

Seen: 249 times

Last updated: Apr 24 '18