Do I have to setup.source for every node when using catkin_make_isolated --install --use-ninja? [closed]

asked 2019-04-23 04:20:20 -0500

RosNav gravatar image

Hello,

I am using the ROS cartographer. I can build just find, and run the cartographer just after runinng : $source install_isolated/setup.bash.

But when I try to run my own nodes I get the error: [rosrun] Couldn't find executable named ...

If I source: $source devel_isolated/myNode/setup.bash I can find the executeable.

Do I really have to do that for every file?

Running catkin_make won't work with the cartographer. I am quite new to cmake, maybe I have to add my target there?

Thanks in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by RosNav
close date 2019-08-19 04:20:37.080186

Comments

Hello Guys, for those who have the same issue: You need to add the installation to to your CMakeList similar to:

Mark executables and/or libraries for installation

install(TARGETS node_1 node_2 node_3 ... RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} )

Furthermore you can add if existing in your pkg:

Mark cpp header files for installation

install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN ".git" EXCLUDE )

Mark other files for installation (e.g. launch and bag files, etc.)

install(DIRECTORY launch/ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch PATTERN ".git" EXCLUDE)

install(DIRECTORY config/ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config PATTERN ".git" EXCLUDE)

RosNav gravatar imageRosNav ( 2019-08-20 01:46:39 -0500 )edit