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

Tutorial 5 - not fully implemented? #141

Closed
msadowski opened this issue Dec 18, 2019 · 1 comment
Closed

Tutorial 5 - not fully implemented? #141

msadowski opened this issue Dec 18, 2019 · 1 comment

Comments

@msadowski
Copy link
Contributor

Hi Davide!

Once again many thanks for this library and excellent tutorials!

I have noticed that in the example 5 (the one with door crossing) the unlocking is not implemented (I think it makes for a very good homework, could be useful to note it in the tutorial itself).

In this line: https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/sample_nodes/crossdoor_nodes.cpp#L48 for opening the door we have:

NodeStatus CrossDoor::OpenDoor()
{
    if (_door_locked)
    {
        SleepMS(2000);
        _door_open = true;
    }

    return NodeStatus::SUCCESS;
}

But should the condition be if (!_door_locked) ? We should only be able to open it if it was previously unlocked.

facontidavide added a commit that referenced this issue Mar 18, 2020
@facontidavide
Copy link
Collaborator

fixed. thanks

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

2 participants