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

Correct Euler sequence for object rotation #984

Closed
fortminors opened this issue Sep 27, 2023 · 1 comment
Closed

Correct Euler sequence for object rotation #984

fortminors opened this issue Sep 27, 2023 · 1 comment
Labels
first answer provided question Question, not yet a bug ;)

Comments

@fortminors
Copy link

Describe the issue

I am trying to find out what sequence of rotations is used for euler angles, however it is not mentioned anywhere as far as I know.
I assumed it to be XYZ but there is some discrepancy with the expected rotation, but perhaps there is an error somewhere in my code.

Minimal code example

orientation_euler = scipy.spatial.transform.Rotation.from_quat(rot_quat).as_euler('XYZ', degrees=False)

obj = bproc.loader.load_obj(file_path)
        
for o in obj:
    o.set_location(position)
    o.set_rotation_euler(orientation_euler)

Files required to run the code

No response

Expected behavior

I expect to find the correct sequence of Euler rotations ('XYZ', 'ZYZ', 'ZXY' or something else)

From wikipedia
image

BlenderProc version

v2.6.1

@fortminors fortminors added the question Question, not yet a bug ;) label Sep 27, 2023
@cornerfarmer
Copy link
Member

Hey @fortminors,

blender is using XYZ euler angles per default, so the problem is probably somewhere else. You can also set the rotation via set_rotation_mat() or set the full pose of the object via set_local2world_mat(). Maybe these work better for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first answer provided question Question, not yet a bug ;)
Projects
None yet
Development

No branches or pull requests

2 participants