ROS Filesystem
rospack find [package_name]
roscd <package-or-stack>[/subdir]
rosls <package-or-stack>[/subdir]
(source /devel/setup.sh
)
ROS Package
标准的文件树关系
workspace_folder/ -- WORKSPACE
src/ -- SOURCE SPACE
CMakeLists.txt -- 'Toplevel' CMake file, provided by catkin
package_1/
CMakeLists.txt -- CMakeLists.txt file for package_1
package.xml -- Package manifest for package_1
...
package_n/
CMakeLists.txt -- CMakeLists.txt file for package_n
package.xml -- Package manifest for package_n
说明package是建立在src里面的
Creating a catkin package
$ cd ~/catkin_ws/src
$ catkin_create_pkg <name> [depen1] [depend2]...
Building a catkin workspace and sourcing the setup file
$ cd ~/catkin_ws
$ catkin_make
$ . ~/catkin_ws/devel/setup.bash
Check package
$ rospack depends1 beginner_tutorials
Introduce package.xml
Final package.xml is like this
<?xml version="1.0"?>
<package format="2">
<name>talker</name>
<version>0.0.0</version>
<description>The talker package</description>
<maintainer email="jk@todo.todo">jk</maintainer>
<license>MIT</license>
<url type="website">http://wiki.ros.org/talker</url>
<author email="jane.doe@example.com">Jane Doe</author>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
</package>
作用如其内容所示
网友评论