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

Add BT.CPP solutions to Problems 2, 3, and 4 #72

Merged
merged 4 commits into from
Oct 20, 2024

Conversation

sea-bass
Copy link
Contributor

@sea-bass sea-bass commented Oct 17, 2024

This PR:

  • Fixes the Problem 2 solution
  • Adds a really, really, really bad (but working) solution to Problem 3
  • Adds a similarly bad solution to Problem 4, but it can solve the task with only some minor inefficiencies (and a potential issue with canceling Navigate) actions. It also shows subtrees and port remapping quite well.

@facontidavide feel free to take over this PR with better solutions as you see fit

@facontidavide
Copy link
Contributor

Thanks a lot @sea-bass . Do we want to give th full solution to everyone. isn't this supposed to be an excercise?

@matthias-mayr
Copy link
Contributor

Thanks a lot @sea-bass . Do we want to give th full solution to everyone. isn't this supposed to be an excercise?

At least I voted for providing solutions as well. If people want to cheat, I don't care - they are here voluntarily. Maybe some people get severely stuck and need a good indication on where to go.

At least for SkiROS2, the later problems should also build on earlier ones, so if someone was not able to solve p1 or p2, I want them to be able to hop back in and copy the solutions from previous problems.

@sea-bass
Copy link
Contributor Author

Agree with @matthias-mayr -- these are the solution trees. Presumably the workshop will involve opening up Groot and building these from scratch, but referring to these XMLs as/if needed.

@ct2034
Copy link
Contributor

ct2034 commented Oct 18, 2024

I was thinking like you before, @facontidavide.
But now I also like the idea of treating the participants as adults and my convince stuff also contains the full solutions.

@ct2034
Copy link
Contributor

ct2034 commented Oct 19, 2024

I was thinking like you before, @facontidavide. But now I also like the idea of treating the participants as adults and my convince stuff also contains the full solutions.

However, maybe we could move them to another folder. Something like solutions. Because right now, the readme suggests creating your trees in the technologies/BehaviorTree.CPP/pyrobosim_btcpp/trees folder. But when the participants navigate there, they find all the solutions and then their work may feel a bit pointless, I guess.

@sea-bass
Copy link
Contributor Author

All PR comments implemented, and I got an (almost fully) working Problem 4 solution!

@sea-bass sea-bass requested a review from ct2034 October 19, 2024 20:22
@sea-bass
Copy link
Contributor Author

@facontidavide I am getting sporadic errors canceling the Navigate action when the battery going low coincides with that... I'm not 100% sure if the bug is on PyRoboSim or BT.CPP end, since the FlexBE and ros_bt_py examples cancel properly, as do my unit tests.

@sea-bass sea-bass changed the title Add simple BT.CPP solutions to Problems 2 and 3 Add simple BT.CPP solutions to Problems 2, 3, and 4 Oct 19, 2024
@sea-bass sea-bass changed the title Add simple BT.CPP solutions to Problems 2, 3, and 4 Add BT.CPP solutions to Problems 2, 3, and 4 Oct 19, 2024
@sea-bass sea-bass requested a review from Oberacda October 19, 2024 20:41
@ct2034
Copy link
Contributor

ct2034 commented Oct 19, 2024 via email

@facontidavide facontidavide merged commit f52a109 into main Oct 20, 2024
2 checks passed
@facontidavide
Copy link
Contributor

I too the liberty to push directly to main some cleanup of problem 1 and 2.
d6b8531

Thanks a lot!!!

@ros-wg-delib ros-wg-delib deleted a comment from ct2034 Nov 7, 2024
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.

4 participants