1 配置信息
1.1 package.xml
<name>
<version>
<description>
<maintainer email=””>
<license>
<buildtool_depnd>
<build_depend>
rclpy
std_msg
message_generation
<exec_depend>
turtlesim
rclpy
std_msgs
message_runtime
sensor_msgs
open3d
geometry_msgs
tf_transformations
tf_ros
launch
launch_ros
<test_depend>
<build_export_depend>
ament_python
<run_depend>
1.2 C++(CMakeLists.txt)
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(example_interfaces REQUIRED)
add_executable(server src/add_two_ints_server.cpp)
ament_target_dependencies(server
rclcpp example_interfaces)
add_executable(client src/add_two_ints_client.cpp)
ament_target_dependencies(client
rclcpp example_interfaces)
install(TARGETS
server
client
DESTINATION lib/${PROJECT_NAME})
1.3 Python(setup.py)
data_files
启动文件: (os.path.join('share', package_name, "launch"), glob('launch/*.launch.py')),
配置文件: (os.path.join('share', package_name, "config"), glob('config/*')),
三维模型文件: (os.path.join('share', package_name, "resource"), glob('resource/*.ply')),
机器人描述文件: (os.path.join('share', package_name), glob('urdf/*'))
entry_points
节点名 = 包名.文件名:main