#include "rclcpp/rclcpp.hpp" #include "hexapod_robot/srv/hexapod_robot_inverse_kinematics.hpp" #include void ik(const std::shared_ptr request, std::shared_ptr response) { response -> angles.push_back(42); } int main(int argc, char **argv) { rclcpp::init(argc, argv); std::shared_ptr node = rclcpp::Node::make_shared("hexapod_robot_inverse_kinematics_server"); rclcpp::Service::SharedPtr service = node -> create_service("hexapod_robot_inverse_kinematics", &ik); rclcpp::spin(node); rclcpp::shutdown(); }