Skip to content

Conversation

@ikwilnaarhuisman
Copy link
Contributor

The Ros1 ActionClient has the functionality that allows all goals to be canceled that were associated with the ActionClient. I thought this was very nice and useful, but missing in the Ros2 implementation of the Action / ActionClient.

Because I'm working on a project that allows for multiple users / clients to send goals and cancel those goals I don't have the correct goalID nor the means to really get it. Hence why I think this is useful.

Changes:

  • Added cancelAllGoals -> cancels all goals for an action.
  • Added integration tests
    • Added ROS2 fibonacci integration test based on the ROS1 fibonacci integration test. (There's an issue in the fibonacci server though; it doesn't return the correct order. But this doesn't change anything for the implementation of the test).
    • Added an integration test that verifies (based on fibonacci Action) that cancelAllGoals works, by checking whether failedCallback was invoked and not resultCallback.

@ikwilnaarhuisman
Copy link
Contributor Author

ikwilnaarhuisman commented Dec 16, 2025

@EzraBrooks Because process.env["ROS_VERSION"] === "2" didn't work for skipping specific tests I chose to use process.env["ROS_DISTRO"] === "humble" because this is the only ros2 version the pipeline uses. I think in the future we may want to fix / set process.env["ROS_VERSION"] because of jammy.

@EzraBrooks EzraBrooks changed the title Feat/cancel all goals with tests Add Action.cancelAllGoals() Dec 16, 2025
Copy link
Collaborator

@EzraBrooks EzraBrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@EzraBrooks EzraBrooks merged commit 72002ea into RobotWebTools:develop Dec 16, 2025
8 checks passed
@ikwilnaarhuisman
Copy link
Contributor Author

No problem, happy to help! We at Lowpad are very thankful for this repo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants