Ask Your Question
3

catkin_make vs catkin build

asked 2016-09-06 07:17:33 -0500

R.Mehra gravatar image

updated 2016-09-06 07:25:07 -0500

Hi,

I was reading about the moveit package and I tried to install from source. My problem was that the catkin build command didn't work. So I did apt-get install catkin_tools and then I was able to install the moveit package.

Then I cloned another package in my workspace and ran catkin_make but it didn't work. This is the error I'm getting :

Built target moveit_robot_interaction
[ 80%] Built target moveit_move_group_capabilities_base 
make[2]: *** [moveit/moveit_ros/warehouse/warehouse/CMakeFiles/moveit_warehouse.dir                    /src/planning_scene_storage.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/include/moveit /warehouse/planning_scene_world_storage.h:40:0,
             from /home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/src/planning_scene_world_storage.cpp:37:
/home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/include/moveit/warehouse    /moveit_message_storage.h:40:47: fatal error: warehouse_ros/database_connection.h: No such file or directory
 #include <warehouse_ros/database_connection.h>
                                           ^
compilation terminated.
In file included from /home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/include/moveit   /warehouse/constraints_storage.h:40:0,
                 from /home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse /src/constraints_storage.cpp:37:
/home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/include/moveit/warehouse    /moveit_message_storage.h:40:47: fatal error: warehouse_ros/database_connection.h: No such file or directory
#include <warehouse_ros/database_connection.h>
                                           ^
compilation terminated.
[ 80%] make[2]: *** [moveit/moveit_ros/warehouse/warehouse/CMakeFiles/moveit_warehouse.dir /src/moveit_message_storage.cpp.o] Error 1
In file included from /home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/include/moveit /warehouse/trajectory_constraints_storage.h:40:0,
                 from /home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse    /src/trajectory_constraints_storage.cpp:37:
/home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/include/moveit/warehouse   /moveit_message_storage.h:40:47: fatal error: warehouse_ros/database_connection.h: No such file or directory
#include <warehouse_ros/database_connection.h>
                                           ^
compilation terminated.
Building CXX object moveit/moveit_ros/warehouse/warehouse/CMakeFiles/moveit_warehouse.dir    /src/state_storage.cpp.o
make[2]: *** [moveit/moveit_ros/warehouse/warehouse/CMakeFiles/moveit_warehouse.dir /src/planning_scene_world_storage.cpp.o] Error 1
In file included from /home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/include/moveit/warehouse/state_storage.h:40:0,
             from /home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/src/state_storage.cpp:37:
/home/sbr/first_workspace/src/moveit/moveit_ros/warehouse/warehouse/include/moveit/warehouse/moveit_message_storage.h:40:47: fatal error: warehouse_ros/database_connection.h: No such file or directory
 #include <warehouse_ros/database_connection.h>
                                           ^
compilation terminated.
make[2]: *** [moveit/moveit_ros/warehouse/warehouse/CMakeFiles/moveit_warehouse.dir/src/constraints_storage.cpp.o] Error 1
make[2]: *** [moveit/moveit_ros/warehouse/warehouse/CMakeFiles/moveit_warehouse.dir/src/trajectory_constraints_storage.cpp.o] Error 1
[ 80%] Built target move_group
make[2]: *** [moveit/moveit_ros/warehouse/warehouse/CMakeFiles/moveit_warehouse.dir/src/state_storage.cpp.o] Error 1
make[1]: *** [moveit/moveit_ros/warehouse/warehouse/CMakeFiles/moveit_warehouse.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 83%] Built target moveit_ompl_interface
[ 84%] Built target moveit_pick_place_planner
[ 85%] Built target moveit_move_group_default_capabilities 
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

What is the issue in using catkin_make and catkin build simultaneously?

edit retag flag offensive close merge delete

Comments

4

They may overwrite each other's devel/setup.bash script

spmaniato gravatar image spmaniato  ( 2016-09-06 09:04:09 -0500 )edit

So if I am building a workspace with catkin build, I should never use that workspace to host other packages and run catkin_make to build those packages, right?

R.Mehra gravatar image R.Mehra  ( 2016-09-08 07:01:24 -0500 )edit

I think so. The catkin build command is like a more modern catkin_make I've migrated to that (meaning catkin_tools ) completely. See http://catkin-tools.readthedocs.io/en...

spmaniato gravatar image spmaniato  ( 2016-09-08 07:22:09 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
6

answered 2016-09-08 10:43:46 -0500

joq gravatar image

Do not combine the two build tools in the same workspace at the same time. Their build artifacts are incompatible.

If you run catkin config, it will tell you which toolset is currently in use. If you wish to switch to catkin build, run catkin clean -bdy first.

edit flag offensive delete link more
2

answered 2018-04-05 15:06:23 -0500

nbro gravatar image

updated 2018-04-05 15:10:59 -0500

If you really want to maintain all spaces (i.e. build and devel) at the same time using catkin command-line tools and the default catkin tools (e.g. catkin_make), you can change the default names of the folders associated with the spaces using the following command:

catkin config --space-suffix _cb

After you type and execute the command catkin build, the folders build_cb, devel_cb and logs_cb (instead of respectively build and devel) will be created.

Now, you can also build the workspace using catkin_make and the folders build and devel will also be created. So, after the two builds (one with the catkin command-line tools and the other with catkin default tools), you should have the following folders:

  1. build
  2. build_cb
  3. devel
  4. devel_cb
  5. logs_cb
  6. src

You can clean the folders associated with catkin build using catkin clean. After catkin clean, you still have the folders generated by catkin_make. Furthermore, you need to execute catkin config --space-suffix _cb only once.

See also: https://catkin-tools.readthedocs.io/en/latest/migration.html.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

3 followers

Stats

Asked: 2016-09-06 07:17:33 -0500

Seen: 17,860 times

Last updated: Apr 05 '18