작성자: 박준규

2023.01.25(수)

Reading through the official documentation should be enough:

Understanding services - ROS 2 Documentation: Humble documentation

ros2 service call

You can call a service using:

ros2 service call <service_name> <service_type> <arguments>

For example:

ros2 service call /spawn turtlesim/srv/Spawn "{x: 2, y: 2, theta: 0.2, name: ''}"