What is in the directories src, build and devel?

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值