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

Why catkin_make behaves differently when run consecutively on same terminal ?

asked 2020-10-26 04:46:55 -0500

Aakashp gravatar image

Hi,

I am using Noetic on Ubuntu 20.04. I downloaded a ROS package from official github source. And after making few changes, I executed command catkin_make twice on the downloaded package. As you can see in the below console (terminal) outputs a1 and b2, the two executions of the same command generate different console outputs. (without making any change in code after the 1st execution of catkin_make command)

Also, I noted that after the 2nd execution 'b1' (and not the 1st - a1), my changes were reflecting when I launched a node. Could anyone help me understand the reason behind so ?

Thanks in advance.


CONSOLE OUTPUT a1:

aakash@aakash:~/Desktop/try1/catkin_ws$ catkin_make
Base path: /home/aakash/Desktop/try1/catkin_ws
Source space: /home/aakash/Desktop/try1/catkin_ws/src
Build space: /home/aakash/Desktop/try1/catkin_ws/build
Devel space: /home/aakash/Desktop/try1/catkin_ws/devel
Install space: /home/aakash/Desktop/try1/catkin_ws/install
Creating symlink "/home/aakash/Desktop/try1/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/aakash/Desktop/try1/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/aakash/Desktop/try1/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/aakash/Desktop/try1/catkin_ws/install -G Unix Makefiles" in "/home/aakash/Desktop/try1/catkin_ws/build"
####
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/aakash/Desktop/try1/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/aakash/Desktop/code1/catkin_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/aakash/Desktop/code1/catkin_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.2", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Found PY_em: /usr/lib/python3/dist-packages/em.py  
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/aakash/Desktop/try1/catkin_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.2") 
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.8
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- Configuring done
-- Generating done
-- Build files have been written to: /home/aakash/Desktop/try1/catkin_ws/build
####
#### Running command: "make -j12 -l12" in "/home/aakash/Desktop/try1/catkin_ws/build"
####
aakash@aakash:~/Desktop/try1/catkin_ws$

CONSOLE OUTPUT b1:

aakash@aakash:~/Desktop/try1/catkin_ws$ catkin_make
Base path: /home/aakash/Desktop/try1/catkin_ws
Source space: /home/aakash/Desktop/try1/catkin_ws ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-27 08:27:05 -0500

AndyZe gravatar image

One issue might be an unspecified dependency. For example, Pkg. A depends on a message from Pkg B, but does not list Pkg B in package.xml nor CMakeLists.

If catkin tries to build Pkg. A before it builds Pkg. B, Pkg A will fail. But it may build Pkg. B on that first run.

Next time you run catkin_make, Pkg B has already been built so Pkg A can build successfully now.

edit flag offensive delete link more

Comments

@AndyZe though your reply seems logical but the problem is that I have cloned just a single standard ROS package from the official github webpage in a new workspace. So, there is no such possibility of missing to specify the dependencies in CMakeLists.txt or package.xml.

Aakashp gravatar image Aakashp  ( 2020-10-28 00:57:45 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-10-26 04:46:55 -0500

Seen: 349 times

Last updated: Oct 27 '20