-
Notifications
You must be signed in to change notification settings - Fork 45
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
Containment & Rules #275
Open
AbdelrhmanBassiouny
wants to merge
28
commits into
cram2:dev
Choose a base branch
from
AbdelrhmanBassiouny:spatial_relations
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Containment & Rules #275
AbdelrhmanBassiouny
wants to merge
28
commits into
cram2:dev
from
AbdelrhmanBassiouny:spatial_relations
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # examples/migrate_neems.md # requirements.txt # src/pycram/datastructures/world.py # src/pycram/world_concepts/world_object.py # src/pycrap/base.py # src/pycrap/objects.py # test/test_butterworth_filter.py
…and tested reasoning with them.
…s and is working.
…relations # Conflicts: # examples/migrate_neems.md # src/pycram/datastructures/mixins.py # src/pycram/datastructures/world_entity.py # src/pycram/description.py # src/pycram/world_concepts/world_object.py # src/pycrap/urdf_parser.py
…ed HasConcept from PhysicalBody to WorldEntity so as to make joints also have a concept as they inherit from WorldEntity not from PhysicalBody, it also makes sense as every thing in the world should theoretically have a concept.
…spatial_relations # Conflicts: # src/pycram/datastructures/world.py
…rected bounding box extents, and duplicate scaling of mesh.
…relations # Conflicts: # test/test_links.py
tomsch420
approved these changes
Feb 26, 2025
@property | ||
def rule_body(self): | ||
return f""" | ||
{is_part_of}(?part, ?parent), {contains_object}(?part, ?object) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heyyy very cool way of doing it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 😄 it took multiple iterations to reach this way of doing it haha.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added containment relations and an update method that updated the containment of given bodies.
This is based on the containment of bounding boxes.
Also added a SWRL rule in Owlready2 to assert that parents contain the objects contained by the parts.
Created a Rule class that inherits from HasConcept to facilitate the creation of rules.
Added a collection of rules for the world.
Added a couple of tests in test_links to test this functionality.