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

How to launch node from install directory

asked 2021-08-25 09:07:14 -0500

Zekarias Taye Hirpo gravatar image

What I wanted

I want to reduce my docker image size through removing a cloned source code from my workspace in 'src' directory according to this suggestion. For that matter, I have just deployed my source code using the following commands:

    # install package
   sudo catkin config --install
   catkin_make
   catkin_make install

The problem

As a result, three folder have been generated inside 'catking_ws' workspace it self. Namely, build, devel and install. install directory generate with many other library folders. I then navigated in to /share/ folder and tried to roslaunch one of my launch file. This is the error that I got:

ERROR: cannot launch node of type [oxford_gps_eth/gps_node]: oxford_gps_eth
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/ubuntu/catkin_ws/src
ROS path [2]=/opt/ros/melodic/share

No processes to monitor shutting down processing monitor...

Expectation

I was able to launch my node, even being in /install/share/ directory without removing the cloned source code in 'src' directory. I wanted to launch my nodes after building and remove my source code so that I can utilize my image.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-08-25 09:54:59 -0500

Zekarias Taye Hirpo gravatar image

I just got an answer. Source this file

source install/setup.bash
edit flag offensive delete link more

Comments

Yes, that's exactly the same as you do when you source /opt/ros/$ROS_DISTRO/setup.bash :)

gvdhoorn gravatar image gvdhoorn  ( 2021-08-25 10:51:24 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-08-25 08:25:09 -0500

Seen: 413 times

Last updated: Aug 25 '21