Ask Your Question
0

Roscd cannot find catkin_make 'd package

asked 2018-03-22 12:44:11 -0500

tolga-uni-lu gravatar image

updated 2018-03-22 14:05:12 -0500

gvdhoorn gravatar image

I run ros kinetic on Ubuntu 16.04. I try to use openpose ros wrapper on my platform. I share the error log below. Best,

robolab3@robolab3-Inspiron-7566:~/catkin_ws$ catkin_make
Base path: /home/robolab3/catkin_ws
Source space: /home/robolab3/catkin_ws/src
Build space: /home/robolab3/catkin_ws/build
Devel space: /home/robolab3/catkin_ws/devel
Install space: /home/robolab3/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/robolab3/catkin_ws/build"
####
####
#### Running command: "make -j8 -l8" in "/home/robolab3/catkin_ws/build"
####
[  0%] Built target sensor_msgs_generate_messages_cpp
[  0%] Built target _image_recognition_msgs_generate_messages_check_deps_Recognitions
...
[ 92%] Built target image_recognition_msgs_generate_messages_eus
Scanning dependencies of target openpose_wrapper
[ 92%] Built target image_recognition_msgs_generate_messages
[ 94%] Building CXX object image_recognition/openpose_ros/CMakeFiles/openpose_wrapper.dir/src/openpose_wrapper_mock.cpp.o
[ 96%] Linking CXX shared library /home/robolab3/catkin_ws/devel/lib/libopenpose_wrapper.so
[ 96%] Built target openpose_wrapper
Scanning dependencies of target openpose_ros_node
[ 98%] Building CXX object image_recognition/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose_ros_node.cpp.o
[100%] Linking CXX executable /home/robolab3/catkin_ws/devel/lib/openpose_ros/openpose_ros_node
[100%] Built target openpose_ros_node
robolab3@robolab3-Inspiron-7566:~/catkin_ws$ roscd openpose_ros
roscd: No such package/stack 'openpose_ros'
robolab3@robolab3-Inspiron-7566:~/catkin_ws$ roslaunch openpose_ros_node
[openpose_ros_node] is not a launch file name
The traceback for the exception was written to the log file
robolab3@robolab3-Inspiron-7566:~/catkin_ws$
edit retag flag offensive close merge delete

Comments

Please only include the console output that actually shows the error message in future questions.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-22 14:05:37 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-22 14:07:15 -0500

gvdhoorn gravatar image

updated 2018-03-25 06:16:10 -0500

$ catkin_make
$ roscd openpose_ros
$ roslaunch openpose_ros_node

I don't see a source devel/setup.bash in your copy-pasted console text.

You need to "activate" your workspace after you've built it using catkin_make, otherwise utilities like roscd and roslaunch will not know where to find the new packages that you just built.


Edit: I only now see this:

$ roslaunch openpose_ros_node

roslaunch takes either one or two arguments:

  1. a direct path to a .launch file
  2. a package name and a (package relative path to a) .launch file

Your invocation is neither: openpose_ros_node is not a package name (that would probably be openpose_ros), and it's also not a launch file name.

From the build output you show, it would appear openpose_ros_node is a ROS node (ie: an executable binary).

Those you should start with rosrun $pkg $node_name, not roslaunch.

edit flag offensive delete link more

Comments

Thank you for your answer. How can I activate it? I already exported it on .bashrc.

tolga-uni-lu gravatar image tolga-uni-lu  ( 2018-03-25 06:04:14 -0500 )edit

I already exported it on .bashrc

Doing it that way, your workspace is only sourced (ie: activated) when you start a new bash session (ie: open a new terminal). Any pkgs that you add in such a session will not be found, untill you catkin_make and source devel/setup.bash yourself. Or ..

gvdhoorn gravatar image gvdhoorn  ( 2018-03-25 06:10:32 -0500 )edit

.. when you start a new terminal.

A simple rule is this: add or created a new package -> build your workspace and source $CATKIN_WS/devel/setup.bash.

If you don't, your new package(s) won't be found.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-25 06:12:34 -0500 )edit

Hello, I had this issue previously and solved it with the way you showed. Today I changed the name of my node to make it easier to understand. I cleaned with catkin_make clean, rebuilt with catkin_make, and source devel/setup.bash . However now ros cannot locate my renamed node, nor it can build it.

tolga-uni-lu gravatar image tolga-uni-lu  ( 2018-04-10 04:03:15 -0500 )edit

ERROR: cannot launch node of type [gesture_detector/gesture_listener.py]: gesture_detector

ROS path [0]=/opt/ros/kinetic/share/ros

ROS path [1]=/home/robolab3/catkin_ws/src

ROS path [2]=/opt/ros/kinetic/share

:~/catkin_ws$ ls src/gesture_detector/scripts/

gesture_listener.py

tolga-uni-lu gravatar image tolga-uni-lu  ( 2018-04-10 04:13:45 -0500 )edit

Delete your build and devel folders, rebuild your workspace, then try again.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-10 05:06:31 -0500 )edit

If this is a Python script, make sure that it has executable permissions set as well.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-10 05:06:56 -0500 )edit

I solved it with going inside the catkin_ws/src/gesture_detector and executing catkin_create_package I did not need to call chmod +x after this.

tolga-uni-lu gravatar image tolga-uni-lu  ( 2018-04-10 07:33:06 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-03-22 12:44:11 -0500

Seen: 350 times

Last updated: Mar 25 '18