ros another departure (a): package

Before looking too and learned ros, also recorded on the blog.

Personally I think that the technology of learning, from the macro level, it takes roughly two points: combination of theory and practice of repetition.

Read it again do not understand, it does not matter, go use.

Do not use the order in the study.

After I learned seemed to understand, and then practice the consolidation.

************************************************** ******** nonsense dividing line ************************************** ********************************

A configuration environment

I use Ubuntu16 and ROS Kinetic Kame, before the concrete realization blog there.

Use the command to view the results after configured.

export | grep ROS
echo $ROS_PACKAGE_PATH

 

 Note:  You need to run every time you open the following termination to use ros

source /opt/ros/indigo/setup.sh

Therefore, we added directly to the ~ / .bashrc as follows:

 

The source devel setup.bash the update package ros (doubt, be verified update)

 

Two introductory package

Development ros package in two ways: rosbuild and catkin space.

rosbuild already old-fashioned way, we advance with the times with catkin.

 

Create a package

Catkin_ws space created in the root directory, the new source folder src.

Command in the src directory catkin_create_pkg create a new package, and instructions dependent package.

Package called test-hedq later are dependent.

 

package introduced

Package structure.

  package.xml is a description of the package.

 

package compilation

After you create is compile, use the command catkin_make 

 

These are compile a specific packet, if the compiler catkin_ws all packages directly catkin_make without parameters.

 

Three commonly used commands introduced in ros

查看某个包的所有依赖

 

 当然,也可以查看一级依赖 depnds1

roscd  rosls是ros系统中的命令 对应bash 中的cd ls 跳转某个包下,展示所有子文件。

 

 

 

 

 

 

发布了128 篇原创文章 · 获赞 21 · 访问量 3万+

Guess you like

Origin blog.csdn.net/Bluenapa/article/details/102940629