Skip to content

Commit

Permalink
[Attach] Set the child object pose to parent pose in attach if coinci…
Browse files Browse the repository at this point in the history
…de is true.
  • Loading branch information
AbdelrhmanBassiouny committed Nov 5, 2024
1 parent dc6fa95 commit 8420a67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pycram/world_concepts/world_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from ..local_transformer import LocalTransformer
from ..object_descriptors.generic import ObjectDescription as GenericObjectDescription
from ..object_descriptors.urdf import ObjectDescription as URDF
from ..ros.data_types import Time
from ..ros.logging import logwarn

try:
Expand Down Expand Up @@ -640,6 +641,7 @@ def attach(self,

if coincide_the_objects and parent_to_child_transform is None:
parent_to_child_transform = Transform()
child_link.set_pose(parent_link.pose)
attachment = Attachment(parent_link, child_link, bidirectional, parent_to_child_transform)

self.attachments[child_object] = attachment
Expand Down

0 comments on commit 8420a67

Please sign in to comment.