Skip to content

Conversation

@Licini
Copy link
Contributor

@Licini Licini commented Jun 3, 2025

Not the perfect fix, but works for now.
The issue of the double transformation was because compas_robot as been calculating the tranformation value as the aggregated worldtransformation. So if we nest these joints in Viewer, the parent transformations got repeated applied. The fastest fix is that instead of nesting joints, we add them flatly under the robot object.

image

@Licini Licini requested a review from tomvanmele June 3, 2025 14:23
@Licini Licini changed the title fix double translation fix double transformation in viewer Jun 3, 2025
@tomvanmele tomvanmele dismissed a stale review June 3, 2025 16:05

was too quick

@tomvanmele
Copy link
Member

why was this not an issue before?

Copy link
Member

@gonzalocasas gonzalocasas left a comment

Choose a reason for hiding this comment

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

Besides the need for an extra clarifying comment, and changelog, I guess it's good to go ;)

Comment on lines +116 to 119
# if i > 0:
# parent = objects[i - 1]
self.viewer.scene.add(obj, parent)
self.viewer.scene.instance_colors[obj.instance_color.rgb255] = obj
Copy link
Member

Choose a reason for hiding this comment

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

Even though it's (likely) a temporary fix, we should drop a quick comment in here explaining why this is like it is now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cool done!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I totally forgot about this PR until @chenkasirer reminded me today

@Licini Licini requested a review from chenkasirer June 23, 2025 12:14
Copy link
Member

@chenkasirer chenkasirer left a comment

Choose a reason for hiding this comment

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

LGTM!

Would love some guidelines for how to make SceneObjects for types that have a hierarchy (is there one for Model?)

@Licini Licini merged commit fefe302 into main Jun 26, 2025
14 checks passed
@Licini
Copy link
Contributor Author

Licini commented Jun 26, 2025

LGTM!

Would love some guidelines for how to make SceneObjects for types that have a hierarchy (is there one for Model?)

That's a good point let me make this a issue so I remember to add it to the documentation of Viewer. And yes, there is a ModelObject and ElementObject, they basically recursively add their children at __init__

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.

5 participants