Author: Arun Kumar
This repository contains the software for a VR Haptic drum kit. Click Here For An In-Depth Project Summary
This software is meant for use with the Valve Index, SteamVR Base Station 2.0, and ODrive.
- OpenXR
- Vulkan
- Eigen3
- nuhal
- data
- logged data from haptic experiments
- each folder within data has a python script that is used to plot the csv files
- drum
- Pure Data drum synthesizer
- samples used in synthesizer
- include
- graphics
- header files for OpenXR program
- these files are stripped back versions of the hello_xr OpenXR example
- haptics
- header files for motor communication and haptic modeling
- graphics
- src
- graphics
- source files for OpenXR program
- these files are stripped back versions of the hello_xr OpenXR example
- haptics
- source files for motor communication and haptic modeling
- graphics
- vulkan_shaders
- shaders for OpenXR program
- compile
- make build directory
mkdir build
- change directory to build
cd build
- build project
cmake ..
- compile project
make
- make build directory
- setup Odrive
- power ODrive and connect it to computer
- launch odrivetool in terminal
odrivetool
- calibrate motor
odrv0.axis0.requested_state=AXIS_STATE_FULL_CALIBRATION_SEQUENCE
- set motor in closed loop control
odrv0.axis0.requested_state=AXIS_STATE_CLOSED_LOOP_CONTROL
- There is a bug in the ODrive ASCII protocol that prevents you from setting the state. These steps cannot be done through the motor communication library.
- launch drum_kit.pd
pd {project}/drum/drum_kit.pd
- launch SteamVR
- put on haptice device
- place controller vertical in the location you want the snare drum
- run executable and pipe output to Pure Data
{project}/build/drumkit | pdsend 8080
- drumkit - haptic drum kit
- arguement 1 - ODrive port name
- if no arguements given, script uses the default port name
- output must be piped to Pure Data through port 8080
- encoder_spring - 1 degree of freedom spring using encoder feedback, see this for more details
- argurement 1 - log file name
- arguement 2 - port name
- if no arguements given, script does not log data and uses the default port name
- vr_spring - 1 degree of freedom spring using vr tracking feedback, see this for more details
- argurement 1 - log file name
- arguement 2 - port name
- if no arguements given, script does not log data and uses the default port name