[ROS In 5 Minutes] 001- How to create a ROS Catkin Workspace

Written by Ruben Alves

22/04/2018

Hi all,

welcome to this “ROS In 5 Minutes” videos series.

In today’s videos we are going to see how to create a catkin workspace.

But before we start, if you want to Learn ROS Fast, we recommend you the following courses:

ROS In 5 Days (Python) 
ROS In 5 Days (C++)

Either you like the video or not, please leave a comment on the comments section below, so we can interact and learn from each other.

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! We’ll use the ROS Basics in 5 Days course as an example today.

Step2. Create catkin workspace

In the course, we have already created a catkin workspace for you called catkin_ws. You can create it yourself. For example, if you don’t have catkin_ws, you can create it using the following command.

cd ~
mkdir catkin_ws/src -p
cd ~/catkin_ws/src
catkin_init_workspace

You should see that a file called CMakeLists.txt is created which will help you compile the files in the workspace.

cd ~/catkin_ws
catkin_make

With this command, ROS created two extra folders for you called build and devel. To use the package, type

source devel/setup.bash

This command will make sure that you source the right directory which contends all the package you’ve compiled.

Remember that to avoid having to source the ~/catkin_ws/devel/setup.bash each time you open a new shell, you can add the “source ~/catkin_ws/devel/setup.bash” on your ~/.bashrc

Want to learn more?

If you are interested in this topic, please visit our ROS In 5 Days (Python)  course. You’ll learn not only how to create the workspace, but also packages, topic, service, and action in ROS.

 

Edit by: Tony Huang

Topics:
Masterclass 2023 batch2 blog banner

Check Out These Related Posts

0 Comments

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest

Share This