catkin_make 与 catkin build指令记录

catkin_make 与 catkin build指令记录

catkin build作为catkin_make的接班者,https://catkin-tools.readthedocs.io/en/latest/history.html (catkin_make -> catkin_make_isolated-> catkin build),看到有很多的package都是使用这个命令编译的。

sudo apt-get install python-catkin-tools 

mkdir -p /tmp/quickstart_ws/src            # Make a new workspace and source space
cd /tmp/quickstart_ws                      # Navigate to the workspace root

catkin init                                # Initialize it with a hidden marker file

catkin create pkg pkg_a                    # Populate the source space with packages...
catkin create pkg pkg_b
catkin create pkg pkg_c --catkin-deps pkg_a
catkin create pkg pkg_d --catkin-deps pkg_a pkg_b

catkin list                                # List the packages in the workspace

catkin build                               # Build all packages in the workspace

source /tmp/quickstart_ws/devel/setup.bash # Load the workspace's environment

catkin clean                               # Clean all the build products

catkin build xpp_vis --no-deps --verbose --catkin-make-args run_tests

catkin build free_gait_core --no-deps --verbose --catkin-make-args run_tests

rosdep install -y --from-paths . --ignore-src --rosdistro kinetic

cd ~/ws_moveit

catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release

catkin build

前两个就是编译具体的包,详细输出,且不编译依赖项,然后启动test选项。https://catkin-tools.readthedocs.io/en/latest/verbs/catkin_build.html#building-and-running-tests

caktin_make 代替我们做了一件这样的事情

mkdir build
cd build
cmake ../src -DCATKIN_DEVEL_SPACE=../devel -DCMAKE_INSTALL_PREFIX=../install
make -j3 -l3 

说起继任者,首先需要注意的是catkin build工具编译的workspace最好和catkin_make 的分开

猜你喜欢

转载自blog.csdn.net/yaked/article/details/105083307