Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider changing the default behavior of on_cancelled() #227

Open
sarcasticnature opened this issue May 22, 2022 · 2 comments
Open

Consider changing the default behavior of on_cancelled() #227

sarcasticnature opened this issue May 22, 2022 · 2 comments

Comments

@sarcasticnature
Copy link
Contributor

Currently the implementation of BtActionNode::on_cancelled() returns BT::NodeStatus::SUCCESS. I have found this to be counter-intuitive, as the goal has (by definition) not been successfully completed, and may often require overriding to return a failure.

I would like to get @fmrico's opinion on changing the default behavior to BT::NodeStatus::FAILURE to better reflect what is actually happening.

@Splinter1984
Copy link
Contributor

Splinter1984 commented Jun 9, 2022

If I understand correctly, it would not be better in this case to return BT::NodeStatus::IDLE?

@fmrico
Copy link
Contributor

fmrico commented Jun 10, 2022

Well, the current semantic is BtActionNode::on_cancelled() returns BT::NodeStatus::SUCCESS if the action could be succesfully cancelled. I think it is reasonable, isn't it?

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

No branches or pull requests

3 participants