ROS2 Learning
Classes | Functions
service_node_class.cpp File Reference

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>
Include dependency graph for service_node_class.cpp:

Classes

class  MyServiceNode
 

Functions

int main (int argc, char **argv)
 

Detailed Description

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}".

Author
Antonio Mauro Galiano Contact: https://www.linkedin.com/in/antoniomaurogaliano/