Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a VR controller.
Works with any OpenVR compatible controller, tested with Valve Index knuckles. Quite low latency, I estimate it at under <50ms. This is possible in particular thanks to OpenVR's future position estimation, which here is set to 50ms. The 6d pose of the controller is obtained through OpenVR API, and the roll angle is used to control the wrist angle. The 3 joint angles of the base, shoulder and elbow are calculated through inverse kinematics. The main trigger of the Index controller is mapped to the gripper opening.
Pretty flexible, and cheaper than building the leader arm if you already own such controller.
Right now I set it up as separate scripts, but we could make the main script take in a flag for leader arm or vr control.
Really awesome project btw :)
vr_controller.mov