-
Notifications
You must be signed in to change notification settings - Fork 7
fix double transformation in viewer #30
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
Conversation
|
why was this not an issue before? |
gonzalocasas
left a comment
There was a problem hiding this 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 ;)
| # if i > 0: | ||
| # parent = objects[i - 1] | ||
| self.viewer.scene.add(obj, parent) | ||
| self.viewer.scene.instance_colors[obj.instance_color.rgb255] = obj |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool done!
There was a problem hiding this comment.
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
There was a problem hiding this 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?)
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 |
Not the perfect fix, but works for now.
The issue of the double transformation was because compas_robot as been calculating the
tranformationvalue as the aggregatedworldtransformation. 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.