Skip to content

publish_feedback should effect only on executing state. - #3118

Merged
fujitatomoya merged 1 commit into
rollingfrom
fujitatomoya/publish_feedback_only_executing
Apr 1, 2026
Merged

fujitatomoya merged 1 commit into
rollingfrom
fujitatomoya/publish_feedback_only_executing

Conversation

@fujitatomoya

Copy link
Copy Markdown
Collaborator

Description

Closes #3117

Is this user-facing behavior change?

Yes, only warning is going to be popped up that tells user application publish_feedback can be effective only executing state.

Did you use Generative AI?

No

Additional Information

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya fujitatomoya self-assigned this Mar 31, 2026
@fujitatomoya
fujitatomoya requested a review from ahcorde March 31, 2026 07:38
* If execution of a goal is deferred then `ServerGoalHandle::set_executing()` must be called
* first.
*
* \throws std::runtime_error If the goal is in any state besides executing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i was going to honor this original design behavior, but this could be a bit surprising for user application. so this PR only prints the warning that instead.

@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

Pulls: #3118
Gist: https://gist.githubusercontent.com/fujitatomoya/d6cdd9c1593d2a24a4e7eba4f190264c/raw/5d1301a472c408d21d17f962af36ab4a9825a182/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp_action
TEST args: --packages-above rclcpp_action
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18749

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@jmachowinski

Copy link
Copy Markdown
Collaborator

Was that actually throwing before ?
I would prefer a throw there, as this trying to publish feedback after the goal was closed is a clear logic programming error.

@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

@jmachowinski no it was never implemented in that way... even though doc section defines that behavior.

i was going to that way, but my though is that would be kinda surprising...

@jmachowinski

Copy link
Copy Markdown
Collaborator

Judging from our own stack, warnings get ignored, as they are in the general console spam.
Exceptions get fixed... I can't think of a scenario were sending feedback after sending the goal result is correct. Especially as the doc already mentioned it, the exception seems more as the way to go...

@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

i will go ahead to merge this, if necessary, we can enforce the exception after some period that prints the warning.

@fujitatomoya
fujitatomoya merged commit b731eb2 into rolling Apr 1, 2026
3 checks passed
@ahcorde
ahcorde deleted the fujitatomoya/publish_feedback_only_executing branch April 7, 2026 08:42
bartalor pushed a commit to bartalor/rclcpp that referenced this pull request Jul 15, 2026
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
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.

ServerGoalHandle::publish_feedback() does not enforce precondition that goal must be in EXECUTING state

3 participants