Skip to content

Commit

Permalink
Fix link pose not exported in sdf dfki-ric#338 (1) dfki-ric#339
Browse files Browse the repository at this point in the history
Exporting pose relative to root link because gazebo 9 ignores relative_to attribute
  • Loading branch information
AlpenAalAlex committed Jan 9, 2024
1 parent fb86732 commit 82ffa29
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions phobos/blender/io/blender2phobos.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,18 @@ def deriveLink(obj, objectlist=None, logging=True, errors=None):
annotations[k1] = {}
annotations[k1][k2] = v

root = obj
while sUtils.getEffectiveParent(root) is not None:
root = sUtils.getEffectiveParent(root)

# Exporting pose relative to root link because gazebo 9 ignores relative_to attribute

return representation.Link(
name=obj.get("link/name", obj.name), # this is for backwards compatibility normally the linkname should be the object name
visuals=visuals,
collisions=collisions,
inertial=inertial,
#origin=deriveObjectPose(obj, effectiveparent=root),
# [TODO v2.1.0] Add KCCD support
kccd_hull=None,
**annotations
Expand Down

0 comments on commit 82ffa29

Please sign in to comment.