ros2 service server callback interface

asked 2020-05-25 07:41:03 -0500

Mbuijs gravatar image

updated 2020-08-17 09:58:41 -0500

Why do service serverss in rclcpp have a callback interface in which the request is not const?

From https://github.com/ros2/rclcpp/blob/8...:

  using CallbackType = std::function<
    void (
      const std::shared_ptr<typename ServiceT::Request>,
      std::shared_ptr<typename ServiceT::Response>)>;

instead of

  using CallbackType = std::function<
    void (
      const std::shared_ptr<const typename ServiceT::Request>,
      std::shared_ptr<typename ServiceT::Response>)>;
edit retag flag offensive close merge delete