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

Containment & Rules #275

Open
wants to merge 28 commits into
base: dev
Choose a base branch
from

Conversation

AbdelrhmanBassiouny
Copy link
Collaborator

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.

# 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
…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.
@property
def rule_body(self):
return f"""
{is_part_of}(?part, ?parent), {contains_object}(?part, ?object)
Copy link
Collaborator

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!

Copy link
Collaborator Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants