Skip to content

Instantly share code, notes, and snippets.

View rpavlik's full-sized avatar

Rylie Pavlik rpavlik

View GitHub Profile
@rpavlik
rpavlik / building-osvr-on-debian-jessie.sh
Last active November 21, 2016 12:24
Building OSVR on debian jessie
# Git - for retrieving source
sudo apt-get install git gitk git-core
# CMake - for configuring the source, ccmake is a command-line "gui" provided by cmake-curses-gui, while cmake-gui is provided by cmake-qt-gui
# Pulls in a lot of basic build deps with it if you don't have them.
sudo apt-get install cmake cmake-curses-gui cmake-qt-gui
# Installs the standard compilers, etc.
sudo apt-get install build-essential
@rpavlik
rpavlik / 99-sensics-usb.rules
Created January 11, 2016 23:24
udev rules for sensics HMDs
# udev file for USB interfaces on Sensics-based HMDs and emulated devices
###
# Section to permit access to HID streaming
###
# OSVR HDK (via HIDAPI/libusb)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="0b00", MODE="0660", GROUP="plugdev"
@rpavlik
rpavlik / check-for-camera-firmware.ps1
Created January 5, 2016 03:12
powershell one-liner to check firmware version on hdk camera
if (@(Get-WmiObject -class Win32_PnPEntity -namespace 'root\CIMV2' | where {$_.DeviceID -like 'USB\VID_0BDA&PID_57E8&REV_0005' -or $_.DeviceID -like 'USB\VID_0BDA&PID_57E8&REV_0006'}).Count -gt 0) { echo "You need firmware updates" } else {echo "No devices found or they're up to date!"}
@rpavlik
rpavlik / 99-sensics-usb.rules
Created November 23, 2015 19:42
Sensics Linux UDEV rules
# udev file for USB interfaces on Sensics-based HMDs and emulated devices
###
# Section to permit access to HID streaming
###
# OSVR HDK (via HIDAPI/libusb)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="0b00", MODE="0660", GROUP="plugdev"
@rpavlik
rpavlik / Basic Mac Support.md
Created September 28, 2015 14:51
Mac OS X Todo List

Status: We know it could be built last December (prior to public release), and all external dependencies have Mac support, so we should have a good idea of the missing pieces.

  • Set up homebrew builds for libfunctionality and jsoncpp (if needed)
    • Potential implementation (libltdl or other) needed in libfunctionality (which is a simple wrapper for loading plugins at runtime)
  • Set up homebrew build for OSVR-Core (though it won't build fully at first) - known implementation details needed:
    • usbserialenum - could just use dummy impl right now
    • plugin search path code (in PluginHost)
@rpavlik
rpavlik / USBLayouts.asset
Last active September 24, 2015 16:43
Microsoft Message Analyzer layouts for USB debugging.
<?xml version="1.0" encoding="utf-8"?>
<AssetCollection xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Metadata>
<UniqueId>e5089b72-45f7-4d4e-a5fd-4cfab9e8c139</UniqueId>
<GroupId>e5089b72-45f7-4d4e-a5fd-4cfab9e8c139</GroupId>
<Name>USB Layouts</Name>
<AssetType>SummaryViewAsset</AssetType>
<VersionNumber>0</VersionNumber>
<Author>Ryan Pavlik</Author>
<Corporation>Sensics, Inc.</Corporation>
@rpavlik
rpavlik / log.txt
Created September 22, 2015 16:58
aliases, and turning off predictive tracking.
$ bin/osvr_print_tree.exe
[OSVR] Connecting to default (local) host
[OSVR] Client context initialized for com.osvr.tools.printtree
[OSVR] Got connection to main OSVR server
[OSVR] Got updated path tree, processing
[OSVR] Connected 0 of 0 unconnected paths successfully
[OSVR] Connection process took 9ms: have connection to server, have path tree
[OSVR] Client context shut down for com.osvr.tools.printtree
@rpavlik
rpavlik / README.md
Last active October 23, 2015 18:34
Data structures in meta and typepack

(Based in part on https://ericniebler.github.io/meta/index.html, designed to be a printable quick reference.)

Quick reference examples

Using the C++14 standard library.

  • Trait: std::add_pointer
    • is a "template" (has template parameters) - not a type unless evaluated.
    • Evaluate: typename std::add_pointer<int>::type (aka typepack::t_<std::add_pointer<int>>) is int *
  • Alias (alias template): std::add_pointer_t
    • is a "template" (has template parameters) - not a type unless evaluated.
  • application: std::add_pointer_t is int *
@rpavlik
rpavlik / quaternion rate.cpp
Created August 31, 2015 16:25
Conversion to a quaternion rate
// Given XYZ radians per second velocity.
q_from_euler(vel_quat, angVel[2] * vel_quat_dt, angVel[1] * vel_quat_dt,
angVel[0] * vel_quat_dt);
// Small angle approximation from exponential map
vel_quat[Q_X] = angVel[0] * 0.5 * vel_quat_dt;
vel_quat[Q_Y] = angVel[1] * 0.5 * vel_quat_dt;
vel_quat[Q_Z] = angVel[2] * 0.5 * vel_quat_dt;
vel_quat[Q_W] = 1.0;
q_normalize(vel_quat, vel_quat);
@rpavlik
rpavlik / eigen 3.2.5 warning.txt
Created August 19, 2015 16:07
MSVC 2013 warning with Eigen 3.2.5
14>c:\users\ryan\desktop\src\osvr-core\vendor\eigen-3.2.5\eigen\src/Geometry/Quaternion.h(291): warning C4522: 'Eigen::Quaternion<float,0>' : multiple assignment operators specified (C:\Users\Ryan\Desktop\src\OSVR-Core\src\osvr\Util\MatrixConventionsC.cpp)
14> c:\users\ryan\desktop\src\osvr-core\vendor\eigen-3.2.5\eigen\src/Geometry/arch/Geometry_SSE.h(22) : see reference to class template instantiation 'Eigen::Quaternion<float,0>' being compiled
14> c:\users\ryan\desktop\src\osvr-core\vendor\eigen-3.2.5\eigen\src/Geometry/arch/Geometry_SSE.h(38) : see reference to class template instantiation 'Eigen::internal::quat_product<1,Derived,OtherDerived,float,1>' being compiled