How to use the pysurvive.install_angle_fn function in pysurvive

To help you get started, we’ve selected a few pysurvive examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cnlohr / libsurvive / bindings / python / pysurvive / recorder.py View on Github external
def install(ctx):
    recorder = Recorder()

    def cb_fn(class_fn, so, *args):
        dat = recorder.get(so)
        time = pysurvive.survive_run_time(so.contents.ctx)
        return class_fn(dat, time, *args)

    pysurvive.install_angle_fn(ctx, partial(cb_fn, RecordedData.record_angle))
    pysurvive.install_light_fn(ctx, partial(cb_fn, RecordedData.record_light))
    pysurvive.install_imu_fn(ctx, partial(cb_fn, RecordedData.record_imu))
    pysurvive.install_pose_fn(ctx, partial(cb_fn, RecordedData.record_pose))
    pysurvive.install_sweep_fn(ctx, partial(cb_fn, RecordedData.record_sweep))
    pysurvive.install_sync_fn(ctx, partial(cb_fn, RecordedData.record_sync))
    pysurvive.install_sweep_angle_fn(ctx, partial(cb_fn, RecordedData.record_sweep_angle))

    return recorder

pysurvive

Libsurvive is a set of tools and libraries that enable 6 dof tracking on lighthouse and vive based systems that is completely open source and can run on any device. It currently supports both SteamVR 1.0 and SteamVR 2.0 generation of devices and should support any tracked object commercially available.

MIT
Latest version published 2 years ago

Package Health Score

57 / 100
Full package analysis