ROS Components for hexapod_robot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
798B

  1. #include "rclcpp/rclcpp.hpp"
  2. #include "hexapod_robot/srv/hexapod_robot_inverse_kinematics.hpp"
  3. #include <memory>
  4. void ik(const std::shared_ptr<hexapod_robot::srv::HexapodRobotInverseKinematics::Request> request,
  5. std::shared_ptr<hexapod_robot::srv::HexapodRobotInverseKinematics::Response> response) {
  6. response -> bar = request -> foo;
  7. }
  8. int main(int argc, char **argv) {
  9. rclcpp::init(argc, argv);
  10. std::shared_ptr<rclcpp::Node> node = rclcpp::Node::make_shared("hexapod_robot_inverse_kinematics_server");
  11. rclcpp::Service<hexapod_robot::srv::HexapodRobotInverseKinematics>::SharedPtr service =
  12. node -> create_service<hexapod_robot::srv::HexapodRobotInverseKinematics>("hexapod_robot_inverse_kinematics", &ik);
  13. rclcpp::spin(node);
  14. rclcpp::shutdown();
  15. }