(3) Function package

concept

1. package: the folder where the user function diamante is stored.
2. The function package is stored in the src path of the workspace.
3. The content in the function package is the source code written by the user.
4. In addition to the main program, there are header files, Parameter file waitingInsert picture description here

Contents of the feature pack

The naming of the folder installs the following naming rules to name, easy to find
① include: .h header file
② src: some c code files of cpp
③ launch: some executable launch files
④ urdf: put the .urdf file (a description file of the 3D model in the rviz tool)
⑤ config : Put some parameter files (some .yaml parameter files, or some srv, msg, action, some user-defined data message data message types and some files)
⑥ scripts: executable script files (some python files)
CMakeLists .txt: the file that defines the compilation rules of the function package
package.xml: the file that defines the package attribute (a file that describes the function package)

Create new feature pack

instruction

catkin_create_pkg<package_name>[depend1][depend2][depend3]	

Interpretation:
catkin_create_pkg + function package name + which one the function package depends on

Example
Enter the src path of the workspace

catkin_create_pkg new_package std_msgs rospy roscpp

Guess you like

Origin blog.csdn.net/m0_46278925/article/details/114818554