In the ROS system, whether it's topics, services, or actions, a key concept is used: the communication interface.
Communication isn't just one person talking to themselves; it's an exchange between two or more people. What's the content of this communication? To make it easier for everyone to understand, we can define a standard structure for the data being passed. This is the communication interface.
Interfaces reduce dependencies between programs, making it easier for us to use others' code and for others to use ours. This is the core goal of ROS: to reduce reinventing the wheel.

ROS has three common communication mechanisms: topics, services, and actions. Through the interfaces defined for each communication type, various nodes are organically connected.
The process for creating custom interface messages is similar to writing an executable program in a function package. The main steps are as follows:
In the [11. ROS2 Action Communication Server Implementation] example, we demonstrated the complete process for creating an action communication interface. You can review it first; we will not repeat it here.
xxxxxxxxxxstring nameint32 agefloat64 height
xxxxxxxxxxrosidl_generate_interfaces(${PROJECT_NAME}"action/Progress.action""msg/Person.msg")xxxxxxxxxx<buildtool_depend>rosidl_default_generators</buildtool_depend><exec_depend>rosidl_default_runtime</exec_depend><depend>action_msgs</depend><member_of_group>rosidl_interface_packages</member_of_group>
xxxxxxxxxxcolcon build --packages-select pkg_interfaces
xxxxxxxxxxsource install/setup.bashxxxxxxxxxxros2 interface show pkg_interfaces/msg/PersonUnder normal circumstances, the terminal output will be consistent with the Person.msg file.

xxxxxxxxxxint32 num1int32 num2---int32 sum

xxxxxxxxxxrosidl_generate_interfaces(${PROJECT_NAME} "action/Progress.action" "msg/Person.msg" "srv/Add.srv")xxxxxxxxxx<buildtool_depend>rosidl_default_generators</buildtool_depend><exec_depend>rosidl_default_runtime</exec_depend><depend>action_msgs</depend><member_of_group>rosidl_interface_packages</member_of_group>
xxxxxxxxxxcd ~/yahboomcar_ros2_ws/yahboomcar_wscolcon build --packages-select pkg_interfacessource install/setup.bash
xxxxxxxxxxros2 interface show pkg_interfaces/srv/Add
Under normal circumstances, the terminal will output the same content as the Person.msg file.
