Step 0. 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 FlexBe with ROS unit 0 as an example today.
Step 1. What’s in the ROS directories
At first, let’s print what is under a ROS working space by typing the following command in a terminal
cd ~/catkin_ws
You should see there are three folders called build/, devel/, and src/
To check what files will be created, we’ll use git here.
git init
git add .
git commit -m "Initial"
These commands will create a commit with the files currently in the working space.
Then we’ll create a ros package under the src folder.
cd src/
catkin_create_pkg ros_dir_demo rospy
A package is created under the src folder in the ros working space. You can see that with the following command
cd ..
git status
Let’s commit it again
git add .
git commit -m "create package"
Then let’s compile the code and see what will ROS generates for us.
catkin_make
Now you can check it with the git status command again.
This time, you should see there are tons of changes in the build and devel directories.
In conclusion, these are the folders under the ros working space and what they aim to do.
src – contain the souce files for packages created
build – Cmake is run from hereto build the packages in src
devel – built files of package are placed here for development/testing
install – this folder will be created if you compile with the command catkin_make install