|
22 | 22 | #include <unordered_map>
|
23 | 23 | #include <utility>
|
24 | 24 |
|
| 25 | +#include "action_msgs/srv/cancel_goal.hpp" |
25 | 26 | #include "rcl/event_callback.h"
|
26 | 27 | #include "rcl_action/action_server.h"
|
27 | 28 | #include "rosidl_runtime_c/action_type_support_struct.h"
|
@@ -77,6 +78,7 @@ class ServerBase : public rclcpp::Waitable
|
77 | 78 | GoalService,
|
78 | 79 | ResultService,
|
79 | 80 | CancelService,
|
| 81 | + Expired, |
80 | 82 | };
|
81 | 83 |
|
82 | 84 | RCLCPP_ACTION_PUBLIC
|
@@ -279,19 +281,29 @@ class ServerBase : public rclcpp::Waitable
|
279 | 281 | /// \internal
|
280 | 282 | RCLCPP_ACTION_PUBLIC
|
281 | 283 | void
|
282 |
| - execute_goal_request_received(const std::shared_ptr<void> & data); |
| 284 | + execute_goal_request_received( |
| 285 | + rcl_ret_t ret, |
| 286 | + rcl_action_goal_info_t goal_info, |
| 287 | + rmw_request_id_t request_header, |
| 288 | + std::shared_ptr<void> message); |
283 | 289 |
|
284 | 290 | /// Handle a request to cancel goals on the server
|
285 | 291 | /// \internal
|
286 | 292 | RCLCPP_ACTION_PUBLIC
|
287 | 293 | void
|
288 |
| - execute_cancel_request_received(const std::shared_ptr<void> & data); |
| 294 | + execute_cancel_request_received( |
| 295 | + rcl_ret_t ret, |
| 296 | + std::shared_ptr<action_msgs::srv::CancelGoal::Request> request, |
| 297 | + rmw_request_id_t request_header); |
289 | 298 |
|
290 | 299 | /// Handle a request to get the result of an action
|
291 | 300 | /// \internal
|
292 | 301 | RCLCPP_ACTION_PUBLIC
|
293 | 302 | void
|
294 |
| - execute_result_request_received(const std::shared_ptr<void> & data); |
| 303 | + execute_result_request_received( |
| 304 | + rcl_ret_t ret, |
| 305 | + std::shared_ptr<void> result_request, |
| 306 | + rmw_request_id_t request_header); |
295 | 307 |
|
296 | 308 | /// Handle a timeout indicating a completed goal should be forgotten by the server
|
297 | 309 | /// \internal
|
@@ -345,7 +357,8 @@ class Server : public ServerBase, public std::enable_shared_from_this<Server<Act
|
345 | 357 |
|
346 | 358 | /// Signature of a callback that accepts or rejects goal requests.
|
347 | 359 | using GoalCallback = std::function<GoalResponse(
|
348 |
| - const GoalUUID &, std::shared_ptr<const typename ActionT::Goal>)>; |
| 360 | + const GoalUUID &, |
| 361 | + std::shared_ptr<const typename ActionT::Goal>)>; |
349 | 362 | /// Signature of a callback that accepts or rejects requests to cancel a goal.
|
350 | 363 | using CancelCallback = std::function<CancelResponse(std::shared_ptr<ServerGoalHandle<ActionT>>)>;
|
351 | 364 | /// Signature of a callback that is used to notify when the goal has been accepted.
|
@@ -455,7 +468,8 @@ class Server : public ServerBase, public std::enable_shared_from_this<Server<Act
|
455 | 468 | void
|
456 | 469 | call_goal_accepted_callback(
|
457 | 470 | std::shared_ptr<rcl_action_goal_handle_t> rcl_goal_handle,
|
458 |
| - GoalUUID uuid, std::shared_ptr<void> goal_request_message) override |
| 471 | + GoalUUID uuid, |
| 472 | + std::shared_ptr<void> goal_request_message) override |
459 | 473 | {
|
460 | 474 | std::shared_ptr<ServerGoalHandle<ActionT>> goal_handle;
|
461 | 475 | std::weak_ptr<Server<ActionT>> weak_this = this->shared_from_this();
|
|
0 commit comments