install ros nodelet

asked 2018-07-23 06:55:14 -0500

Fresh gravatar image

updated 2018-07-23 07:49:23 -0500

Hi I try to write my own ros nodelet but now i can not start it in my launchfile because it doesn't find the nodelet. When i source the deve/setup.bash file i can start it but now i want to start it in a launch file of another ros node. So i copied the content of devel/lib and devel/share to the /opt/ros/indigo/ lib and share folder. I opend a new shell sourced the setip.bash file from ros but the nodelet is not found with "rosrun nodelet declared_nodelets". What is the missing step that i can use the nodelet in my launch file?!

best regards Harald


Edit: I used the following example to implement my nodelet "https://github.com/cryborg21/sample_nodelet". It is a cmake project and the compilation works fine but there is no install target. What is the correct setup that i dont have to copy anything. The goal is to source the /opt/ros/indigo/setup.bash file and everythink works!


Edit: I use the git repo and compile the nodelet with the following commands

source /opt/ros/indigo/setup.bash
cmake . 
make  
source devel/setup.bash
roslaunch launch/sample_nodelet_class.launch

This works but i want to run the nodelet without sourcing the devel/setup.bash

edit retag flag offensive close merge delete

Comments

Just a comment:

So i copied the content of devel/lib and devel/share to the /opt/ros/indigo/ lib and share folder

never do this. If you've setup everything correctly in your workspace, there is also no need to do this. Ever. You run the risk of overwriting base files of ROS and breaking it.

gvdhoorn gravatar image gvdhoorn  ( 2018-07-23 07:27:27 -0500 )edit

the compilation works fine but there is no install target

if there is no install target then you'll have to keep working with your devel space and source the devel/setup.bash instead of something else.

You'll have to tell us exactly what your development workflow is (ie: all commands, ..

gvdhoorn gravatar image gvdhoorn  ( 2018-07-23 07:39:50 -0500 )edit

.. workspace setup and layout, what you source, when, where your package is, what commands you use to roslaunch things, etc). Otherwise we cannot help you.

gvdhoorn gravatar image gvdhoorn  ( 2018-07-23 07:40:18 -0500 )edit

re: edit 2: please see #q252478 for the correct procedure to build a package from source.

gvdhoorn gravatar image gvdhoorn  ( 2018-07-23 07:55:53 -0500 )edit