Skip to content

A question in rotations.py #50

Description

@youngfriday

Hi team,

First of all, thank you for your awesome work on this project!

While reviewing the codebase, I noticed a potential inconsistency regarding quaternion ordering and rotation conventions between different modules.

  • Inconsistency in rotations.py:
    In rotations.py, the euler_2_quat function uses a custom implementation that appears to return quaternions in WXYZ format. However, quat_2_euler uses R.from_euler("xyz", xyz).as_quat(), which typically follows the Scipy standard XYZW format. Furthermore, the axis convention in the custom method seems to differ from the standard "XYZ" Euler order.

  • Inconsistency in franka_env.py:
    In franka_env.py, there are two different approaches used for pose commands:

    • self._send_pos_command uses Scipy’s R.from_euler("xyz", xyz).as_quat(), resulting in XYZW.

    • interpolate_move calls the custom euler_2_quat mentioned above, which results in WXYZ.

I initially suspected this might be due to the requirements of serl_franka_controllers, but a quick check suggests that the controller also expects XYZW ordering.

Given that many users have successfully reproduced this work, I assume there is a functional reason for this implementation. Could you help clarify why these different conventions are used?

Looking forward to your insights. Thanks a lot!

Update:

  • I changed the custom euler_2_quat with R.from_euler('xyz', xyz).as_quat() and then tested the code on franka, and everything works well -- while the original euler_2_quat turned to a wrong reset pose.
  • So I think it may be a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions