Skip to content

axis conventions #40

@v4hn

Description

@v4hn

Thank you for this great project.

I would like to clarify coordinate conventions for the reported state of devices.

The spacemouse devices follow the HID usage specification, where 4.2 specifies axis conventions for HID devices. This follows a regular right-handed coordinate system X pointing right and Z downwards.

These signals are partly inverted in the library for the .state/.read() interfaces though, e.g., here.
This is probably done for a more intuitive interpretation of Z which now points upwards.

Per se that's no big deal, but the reported values for the rotations do not seem to match a regular coordinate system anymore.
For both my SpaceExplorer and a Spacemouse Compact,

  • roll rotates negatively around the new Y axis (instead of positively around X),
  • pitch rotates positively around X (instead of Y),
  • and yaw rotates negatively around the new Z axis (instead of positively).

It would be nice if someone could confirm that this is indeed the consistent interpretation in this library and we could document it here. I expect that this convention should not change anymore to retain API, but it seems entirely arbitrary to me. It's not a big problem either because it can always be adjusted in calling code once one knows about it.

Although I looked at this quite a bit now, it might also be that I misuse some component and the whole issue is on my side only. I would be grateful if someone could point this out :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions