lonetech / nolo-osvr

OSVR plugin for LYRobotix Nolo VR tracker system
Apache License 2.0
12 stars 8 forks source link

Coordinate Bases Incorrect #10

Open nanospork opened 7 years ago

nanospork commented 7 years ago

At least with the current Windows build provided on Reddit - which otherwise works beautifully by the way - the coordinate bases appear to be incorrect. That is, real-world motion along what should be the X axis produces motion in the tracker viewer on the Y axis, etc. This can easily be fixed in the right JSON files (although I'm not sure which.)

I'm currently in the process of figuring out exactly what needs to go into that JSON by testing it in the osvr_server_config. Will post again with results.

nanospork commented 7 years ago

This may actually be bogus, after re-aligning with double-tap power button and osvr_reset_yaw/Recenter

Still, the HDK coordinate system does not appear to line up the same with this one. No amount of Rotate or ChangeBasis seemed to work properly. In the example below I work around it with the OSVR-Fusion plugin. I ended up taking the un-rotated pitch and roll and combining it with rotated yaw (See yawFast. Ignore yawAccurate, that's part of my new complementary filter code.)

    "drivers": [
        {
            "plugin": "je_nourish_fusion",
            "driver": "FusionDevice",
            "params": {
                "name": "NoloFusedHead",
                "position": "/com_osvr_Nolo/LYRobotix Nolo/tracker/1",
                "orientation": {
                    "roll": "/com_osvr_Multiserver/OSVRHackerDevKit0/semantic/hmd",
                    "pitch": "/com_osvr_Multiserver/OSVRHackerDevKit0/semantic/hmd",
                    "yawFast": "/headSpace",
                    "yawAccurate": "/com_osvr_Nolo/LYRobotix Nolo/tracker/1",
                    "alpha": 0.995
                },
                "timestamp": "rotation"
            }
        }
    ],
    "aliases": {
        "/me/head": "/je_nourish_fusion/NoloFusedHead/tracker/0",
        "/headSpace": {
            "rotate": {
                "axis": "y",
                "degrees": -180
            },
            "child": {
                "changeBasis": {
                    "x": "x",
                    "y": "y",
                    "z": "z"
                },
                "child": "/com_osvr_Multiserver/OSVRHackerDevKit0/semantic/hmd"
            }
        }
    },