Hello ROS Developers! In this ROS in 5 min tutorial, we’re going to see what catkin_make is, how it works, and what its advantages are.
For that, we are going to use Robot Ignite Academy.
But before we start, if you are new to ROS and want to Learn ROS fast, I recommend that you take any of the following courses in Robot Ignite Academy:
Whether you like the video or not, or if you want to learn about specific ROS subjects, please leave a comment in the comments section below, so we can interact and learn from each other.
Question: What is catkin_make
Step1. Create a project in Robot Ignite Academy(RIA)
We have the best online ROS course available in RIA. It helps you learn ROS in the easiest way without setting up ROS environment locally. The only thing you need is a browser! Create an account here and start to browse the trial course for free now!
Step2. Create a package
Almost all the package you will need is already installed in RIA. We’ll create the package in the ROS Autonomous Vehicles 101 course as an example in this video, but you can choose any course you want to do this.
Please type the following command in shell to create a new package
cd ~/catkin_ws/src catkin_create_pkg test roscpp
Step3. Compile the package with catkin_make
Now you can type catkin_make to compile the package.
cd .. catkin_make
It shows a lot of outputs, but what did it really do?
The catkin_make is actually a macro which creates directories and runs cmake command for you. If you want to do it yourself, just delete the build and devel directories first.
rm -rf build/ devel/
Now you can create a build directory and run the cmake command by yourself to get the exact same result as catkin_make did.
mkdir build&&cd build cmake /home/user/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/user/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/user/catkin_ws/install -G "Unix Makefiles"
Take away today- The Answer:
catkin_make is a macro which creates source directories and runs the cmake commands for you. You can test out with the following step.
Edit by Tony Huang
Sorry, but I have a hard time understanding you. I am from the USA.