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

Object dynamic state #234

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

Conversation

AbdelrhmanBassiouny
Copy link
Collaborator

@AbdelrhmanBassiouny AbdelrhmanBassiouny commented Dec 2, 2024

This depends on #227
Created a super class for Object and Link called PhysicalBody, this hast common attributes for any physical body like pose, velocity, contact points.

Also changed ContactPoint to use bodies instead of links as datatype for returned bodies.

Also Everything now is a WorldEntity including PhysicalBody, and Wolrd, this unified the methods eq and hash so they are only implemented in WorldEntity except for World which overwrites them.

Also every WorldEntity has a parent_entity, so Link has parent as Object and Object has parent as world, while World has None.

In addition the ontology_concept class variable was moved from Object class to PhysicalBody class because now it makes more sense there since any PhysicalBody is a PhysicalObject by Default.

Added attributes for PhysicalBody like velocity, is_translating, is_rotating, is_moving but currently they are not set by anything, one way could be through querying the simulation but one could also set them by performing their own calculation and according to their own thresholds for that, they just are helpful to be inside physical body if someone is interested in its dynamic state.

Also Added a PhysicalBodyState that includes pose, velocity, is_translating, and is_rotating.

@AbdelrhmanBassiouny AbdelrhmanBassiouny marked this pull request as draft December 11, 2024 09:51
@AbdelrhmanBassiouny AbdelrhmanBassiouny marked this pull request as ready for review December 13, 2024 16:17
mohammadkhoshnazarr and others added 24 commits December 13, 2024 17:18
… ability for the used to specift the state id.
… pycram objects, closing and opening gripper works.
… giskard.

Updated robot_description usage from old version to new version in Giskard.

Added options for disabling monitors and allowing gripper collision in achieve_cartesian_goal in Giskard and added these options to the configurations of the world.

Added a globale variable that indicates if robokudo was found or not to avoid using real detection processs module if Robokudo was not found.
… is not synced correctly.

Fixed Goal Validator.

robot_state_updater.py also updates states of objects.

no need for original pose anymore to move mobile robot in multiverse.
Added mutex for multiverse writer client
src/pycram/datastructures/dataclasses.py Outdated Show resolved Hide resolved
src/pycram/datastructures/dataclasses.py Outdated Show resolved Hide resolved
src/pycram/datastructures/world.py Show resolved Hide resolved
src/pycram/datastructures/world_entity.py Outdated Show resolved Hide resolved
@@ -303,7 +294,7 @@ def get_mesh_filename(self, geometry: MeshVisualShape) -> str:
else:
raise LinkGeometryHasNoMesh(self.name, type(geometry).__name__)

def set_pose(self, pose: Pose) -> None:
def set_object_pose_given_link_pose(self, pose: Pose) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That name sounds confusing

Copy link
Collaborator Author

@AbdelrhmanBassiouny AbdelrhmanBassiouny Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm the thing is the link pose shouldn't be settable, but you can move the object such that the link has this given pose, and I would like users to know that what they are doing is actually moving the whole object when doing this

Copy link
Collaborator Author

@AbdelrhmanBassiouny AbdelrhmanBassiouny Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so there is the usual set_pose of the link but what I did there was issue a warning that link poses are not settable.

@@ -51,7 +51,7 @@ def set_child_link_pose(self):
"""
Set the target pose of the child object to the current pose of the child object in the parent object frame.
"""
self.child_link.set_pose(self.get_child_link_target_pose())
self.child_link.set_object_pose_given_link_pose(self.get_child_link_target_pose())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also confusing name

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.

3 participants