|
ROS2 Learning
|
A basic ROS2 service server node with class implementation that gets two strings as request and answer with a capitalized full string as response. It's necessary to use the custom message defined in the external package "Custom msg and srv" To call the service from a terminal use on a single line: ros2 service call /create_cap_full_name custom_srv_msg/srv/CapitalFullName "{name: x, surname: y}". More...
#include "rclcpp/rclcpp.hpp"#include "custom_srv_msg/srv/capital_full_name.hpp"#include <boost/algorithm/string.hpp>
Classes | |
| class | MyServiceNode |
Functions | |
| int | main (int argc, char **argv) |
A basic ROS2 service server node with class implementation that gets two strings as request and answer with a capitalized full string as response. It's necessary to use the custom message defined in the external package "Custom msg and srv" To call the service from a terminal use on a single line: ros2 service call /create_cap_full_name custom_srv_msg/srv/CapitalFullName "{name: x, surname: y}".