ROS2 Learning
Functions
service_node.cpp File Reference

A basic ROS2 service server node 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.cpp:

Functions

void ComposeFullName (const std::shared_ptr< custom_srv_msg::srv::CapitalFullName::Request > request, std::shared_ptr< custom_srv_msg::srv::CapitalFullName::Response > response)
 
int main (int argc, char **argv)
 

Detailed Description

A basic ROS2 service server node 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/