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

Difference between catkin_init_workspace inside src vs catkin_make

asked 2017-10-30 13:03:55 -0500

bpinaya gravatar image

updated 2017-10-30 13:30:15 -0500

Hi there, I guess this is more of a conceptual question, what are the differences (or even benefits) of running:

catkin_init_workspace

inside the workspace/src directory vs running:

catkin_make

In the root of the workspace. According to me they are equal and I've always preferred to just create the workspace and src inside and then run catkin_make directly, but I haven't found out if there are big differences from one to the other.

Thanks for your time!

EDIT: I've seen that catkin_init_workspace will:

" Actually, it creates a symbolic link to a system-wide CMakeLists.txt file."

According to the Programming Robots with ROS book.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2017-10-30 13:08:39 -0500

Dirk Thomas gravatar image

catkin_make is performing the actual build. It will implicitly initialize the workspace for you.

catkin_init_workspace only creates the CMakeLists.txt file in the root of the source space (see https://github.com/ros/catkin/blob/c0... ). You only need to use it if you later want to call something like cmake and make manually. So usually you never have to invoke catkin_init_workspace yourself.

edit flag offensive delete link more

Comments

Thanks for the quick answer, so catkin_make will also generate the CMakeLists.txt right? So just running catkin_make will also allow me to use cmake and make?

bpinaya gravatar image bpinaya  ( 2017-10-30 13:20:48 -0500 )edit

Yes, that is correct.

Dirk Thomas gravatar image Dirk Thomas  ( 2017-10-30 13:24:00 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-10-30 13:03:55 -0500

Seen: 1,632 times

Last updated: Oct 30 '17