ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Which message type is needed for sending an action cancel request()?

I’m working on rclswi, a ROS2 client library for SWI-Prolog. In general progress is good. While trying to get action cancellation to work it seems I have a misunderstanding. I though the request must be send using rcl_action_send_cancel_request() and the message type is action_msgs/srv/CancelGoal. Trying to do so get a corrupted message on the other side. As type conversion works fine both ways for other topics and services this must be something else.

Now, in the docs for rcl_action_send_cancel_request() it says “The caller is responsible for ensuring that the type of ros_cancel_request and the type associate with the client (via the type support) match”. This suggests the type is action specific, but actions only define a type for the goal and result services and the feedback topic.

Can someone point me to what I’m missing?

1 Like