Run ROS node on target
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
Asked by Fresh on 2018-04-20 03:41:59 UTC
Answers
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.
Asked by PeteBlackerThe3rd on 2018-04-22 13:45:46 UTC
Comments
I'm confused as to why you would want to avoid a launch file?
Asked by PeteBlackerThe3rd on 2018-04-25 03:31:50 UTC