简介
- ros2基于ros
- 在ros的基础上进行了去中心化(roscore)的升级
- ros2使用component的概念
- catkin_make 换成了 ament_cmake (CMakeList.txt的写法上有较多的改变)
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(std_msgs REQUIRED)
ament_target_dependencies(composition_nodes rclcpp rclcpp_components std_msgs)
ament_package()
<buildtool_depend>ament_cmake</buildtool_depend>
<build_depend>rclcpp</build_depend>
<build_depend>rclcpp_components</build_depend>
<build_depend>std_msgs</build_depend>
<exec_depend>rclcpp</exec_depend>
<exec_depend>rclcpp_components</exec_depend>
<exec_depend>std_msgs</exec_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
Practice
- Pre:
- colcon 包组织工具
- 安装colcon:
sudo apt install python3-colcon-c