#include "rclcpp/rclcpp.hpp"
#include "hexapod_robot/srv/hexapod_robot_inverse_kinematics.hpp"

#include <memory>

void ik(const std::shared_ptr<hexapod_robot::srv::HexapodRobotInverseKinematics::Request> request,
        std::shared_ptr<hexapod_robot::srv::HexapodRobotInverseKinematics::Response> response) {

    response -> angles.push_back(42);
     
}

int main(int argc, char **argv) {
    rclcpp::init(argc, argv);

    std::shared_ptr<rclcpp::Node> node = rclcpp::Node::make_shared("hexapod_robot_inverse_kinematics_server");

    rclcpp::Service<hexapod_robot::srv::HexapodRobotInverseKinematics>::SharedPtr service = 
        node -> create_service<hexapod_robot::srv::HexapodRobotInverseKinematics>("hexapod_robot_inverse_kinematics", &ik);

    rclcpp::spin(node);
    rclcpp::shutdown();
}