Ask Your Question
0

Unknown CMake command "catkin_run_tests_target"

asked 2018-05-14 04:53:39 -0500

Creesy gravatar image

updated 2018-05-14 17:51:19 -0500

Hello, i am currently working to get packages working and activating the workspace in catkin

When i start a new Terminal i get this:

bash: ~catkin_ws/devel/setup.bash: Datei oder Verzeichnis nicht gefunden

in english that would be no files or directory found

Using the command "catkin_init_workspace" gives me the response:

File "/home/creesy/catkin_ws/src/CMakeLists.txt" already exists

when I got for cd .. to get to the upper directory and use "catkin_make" I get the following error:

CMake Error at /opt/ros/kinetic/share/roslint/cmake/roslint-extras.cmake:67 (catkin_run_tests_target):

Unknown CMake command "catkin_run_tests_target".

Call Stack (most recent call first):
  operator_ws/src/taurobtrackerapi/taurob_teleop_twist_joy/CMakeLists.txt:35 (roslint_add_test)


-- Configuring incomplete, errors occurred!
See also "/home/creesy/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/creesy/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:1356: die Regel für Ziel „cmake_check_build_system“ scheiterte
make: *** [cmake_check_build_system] Fehler 1
Invoking "make cmake_check_build_system" failed

Edit1:

My developement environment paths looks like following

~/catkin_ws/src/operator_ws and ~/catkin_ws/src/realsense-2.0.3

I also have I think the normal installfiles of ROS under /opt/ros/kinetic/..

I think that means i have 2 different workspaces in catkin named operator_ws and realsense-2.0.3

Edit2:

After experimenting now further and getting the operator_ws folder out of catkin workspace i can at least build the realsense folder. That could mean that in the first folder there are undefined dependencies or errors. I cant really understand that since it works for collegues of me

Edit3:

I just figured why it works for my collegues. they are not using the realsense camera and only the operator_ws which means they don have the problems with nested things. does that mean i have to get both the operator_wsfolder and the realsense folder in one upper folder for a single workspace?

Edit4:

I am trying to build only the operator_ws workspace and leaving out the realsense camera related packages getting the error i have problems with all together.

-- +++ processing catkin package: 'rosserial_server'
-- ==> add_subdirectory(operator_ws/src/rosserial/rosserial_server)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- +++ processing catkin package: 'taurob_teleop_twist_joy'
-- ==> add_subdirectory(operator_ws/src/taurobtrackerapi/taurob_teleop_twist_joy)
CMake Error at /opt/ros/kinetic/share/roslint/cmake/roslint-extras.cmake:67
(catkin_run_tests_target):
  Unknown CMake command "catkin_run_tests_target".
Call Stack (most recent call first):
  operator_ws/src/taurobtrackerapi/taurob_teleop_twist_joy/CMakeLists.txt:35
(roslint_add_test)


-- Configuring incomplete, errors occurred!
See also "/home/creesy/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/creesy/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

I have the feeling that there must be a fault in the files themself which cancels the invoking of cmake could that be right or is it still about the nesting issue? It just looks for me like there are problems with taurobtrackerapi and if that is the case i have to ask my collegues what they have done different

Edit5:

Here is a picture of the workspace operator_ws collegues said i just have to download it and it works. Maybe that isnt the whole ... (more)

edit retag flag offensive close merge delete

Comments

1
~catkin_ws/

Could you please post the line from your .bashrc where the workspace is sourced? It is at least missing a slash (/) between ~ and catkin_ws, but perhaps also either a dot (.) or source.

gvdhoorn gravatar imagegvdhoorn ( 2018-05-14 05:29:21 -0500 )edit

i managed to get rid of the first problem i had by opening a new terminal with gedit ~/.bashrc & and then outcommenting the last lines in there. you mean: source ~/catkin_ws/devel/setup.bash ? i still have the problem that somehow the CMake command is unknown

Creesy gravatar imageCreesy ( 2018-05-14 05:52:05 -0500 )edit
1

The line you commented is probably something you'd want there. Unless you want to source your workspace manually in each new terminal.

re: other problem(s): at this point I'd recommend to rm -rf $HOME/catkin_ws/build $HOME/catkin_ws/devel and redo all steps.

gvdhoorn gravatar imagegvdhoorn ( 2018-05-14 05:54:38 -0500 )edit
1

Don't forget source /opt/ros/kinetic/setup.bash before you start using catkin_make or any of the other commands.

Also: what is the operator_ws path that appears in the error message? Do you have multiple workspaces?

gvdhoorn gravatar imagegvdhoorn ( 2018-05-14 05:55:02 -0500 )edit

operator_ws path are multiple ros packages for the robot we are using. it could be that i have multiple workspaces since everything got a bit messy there. about the sources in .bashrc i have multiple lines with the same sources i just outcommented the ones making problems.

Creesy gravatar imageCreesy ( 2018-05-14 06:26:34 -0500 )edit
1

I recommend you read up on Catkin workspaces, particularly how things work with multiple workspaces and when you should/shouldn't source others. I suspect all of your workspaces are now chained, which is probably not a desirable situation.

gvdhoorn gravatar imagegvdhoorn ( 2018-05-14 06:28:18 -0500 )edit

yeah if it prevents me from using the different packages for the robot then definately not desired. im currently trying to rebuild catkin

Creesy gravatar imageCreesy ( 2018-05-14 06:30:33 -0500 )edit

OK I used your suggestions about removing build and devel. now when i try to redo the steps for making the directories I get the error that invoking "make -j4 -l4" failed because there are denied permissions.

Creesy gravatar imageCreesy ( 2018-05-14 06:48:18 -0500 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2018-05-14 12:14:03 -0500

gvdhoorn gravatar image

updated 2018-05-14 16:22:44 -0500

Edit1: My developement environment paths looks like following

~/catkin_ws/src/operator_ws and ~/catkin_ws/src/realsense-2.0.3

I also have I think the normal installfiles of ROS under /opt/ros/kinetic/..

I think that means i have 2 different workspaces in catkin named operator_ws and realsense-2.0.3

yes, I agree. And they also seem to be nested. That is not ok.

Edit2: After experimenting now further and getting the operator_ws folder out of catkin workspace i can at least build the realsense folder.

This confirms my suspicions. Workspaces cannot be nested.

That could mean that in the first folder there are undefined dependencies or errors. I cant really understand that since it works for collegues of me

I don't know why it works for your colleagues. Perhaps they've ran rosdep install -y --from-paths ~/catkin_ws/src/operator_ws -i and didn't nest their workspaces?


Edit:

I just figured why it works for my collegues. they are not using the realsense camera and only the operator_ws which means they don have the problems with nested things. does that mean i have to get both the operator_wsfolder and the realsense folder in one upper folder for a single workspace?

You can either add all packages to a single workspace, or use workspace chaining. That is explained in the Catkin pages I linked to earlier.


re: edit 4:

I have the feeling that there must be a fault in the files themself which cancels the invoking of cmake could that be right or is it still about the nesting issue?

I'm confused about this:

-- ==> add_subdirectory(operator_ws/src/taurobtrackerapi/taurob_teleop_twist_joy)
...
See also "/home/creesy/catkin_ws/build/CMakeFiles/CMakeOutput.log".

notice the last line: why is Catkin entering the operator_ws/src/rosserial/rosserial_server directory while it is building the /home/creesy/catkin_ws workspace? Do you still have those workspaces nested? Or is the operator_ws/src directory the only directory in operator_ws?


re: edit 5: if operator_ws is in $HOME/Documents, how can it be built by Catkin when you're building $HOME/catkin_ws? That does not make sense to me. Have you symlinked it into your catkin_ws? Can you please:

  1. comment all source lines in your .bashrc
  2. start a new terminal
  3. source /opt/ros/$distro/setup.bash
  4. rm -rf $HOME/catkin_ws/build
  5. rm -rf $HOME/catkin_ws/devel
  6. cd $HOME/catkin_ws
  7. catkin_make

If that succeeds, then we can try building the other workspace.


re: edit 6 & 7: yes, you were still nesting two workspaces. operator_ws contained its own devel and build folders. That probably won't work.

You have two options:

  1. put everything that is now inside operator_ws/src inside $HOME/catkin_ws/src. Treat it as a single workspace, and build that using catkin_make
  2. move operator_ws out of catkin_ws/src, make sure to not have sourced catkin_ws/devel and build operator_ws in isolation

In short: you can have as many packages as you want in a single workspace, but you cannot have devel, build and / or install spaces inside another src space ... (more)

edit flag offensive delete link more

Comments

ok thank you very much. I will try the first solution for the beginning, but since there will be other packages from my collegues who also have to get into one place i might have to go for option too later and should learn how to do it correctly . I will review the docu again.

Creesy gravatar imageCreesy ( 2018-05-14 16:26:21 -0500 )edit

Could you please mark the question as answered by ticking the checkmark (✓) to the left of the answer if you feel it has been answered? Thanks.

gvdhoorn gravatar imagegvdhoorn ( 2018-05-15 01:18:50 -0500 )edit
1

answered 2018-05-21 14:49:15 -0500

vinaykumarhs2020 gravatar image

updated 2018-05-21 14:50:40 -0500

Not sure if you still have this issue. I had the same issue after installing Realsense ROS driver in my catkin workspace. I figured out the recommended instructions in Realsense installation page asks you to run:

catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release

In that case, it will set your local build CMakeCache with that variable as:

catkin_ws$ grep -irInH 'CATKIN_ENABLE_TESTING' . ./build/CMakeCache.txt:96:CATKIN_ENABLE_TESTING:BOOL=False

So, You can solve this issue by running with tests enabled (catking_make -DCMAKE_ENABLE_TESTING=True) and building the Realsense in an isolated work area.

edit flag offensive delete link more

Comments

the part with building all the files seems to have worked now. currently my biggest problem is: how do i get the camera working how i want it to work and to get 3d mapping rolling since i only find tutorials for realsense r200 and zr300 who doesnt seem to work with d435

Creesy gravatar imageCreesy ( 2018-05-21 14:58:09 -0500 )edit
1

You can use roslaunch realsense2_camera rs_rgbd.launch enable_pointcloud:=true to start the realsense with rgbd data and use a RGBD SLAM package like: https://github.com/felixendres/rgbdsl...

vinaykumarhs2020 gravatar imagevinaykumarhs2020 ( 2018-05-21 16:57:20 -0500 )edit

Ahh thanks for that. im working with rtabmap but i will try the suggested slam packages. thanks.

Creesy gravatar imageCreesy ( 2018-05-22 03:47:48 -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

1 follower

Stats

Asked: 2018-05-14 04:53:39 -0500

Seen: 726 times

Last updated: May 21 '18