VR Headset Control Camera
I decided I wanted a “remote vision” kind of project after seeing the new VR goggle products hitting the market.
Basically, it’d be fun to look through the goggles and see a live video stream and keep seeing live video wherever I turned my head.
This could be done using a stationary camera which can tilt/pan, and a system to receive the video and control direction. And I wanted it to work over the internet.
To do this would require a number of technical elements:
- Real-time video streaming, point-to-point (using WebRTC)
- Raspberry Pi operating webcam and software to publish via WebRTC
- Remote-control via the internet for the device
- Custom software running on Raspberry Pi controlled via the internet and driving servos
- Javascript phone orientation sensors
- Webpage and javascript client on phone, runs inside the goggles, communicates to Pi over the internet via websockets
- Some electronics basics (servo motor control)
It took quite a lot of research and testing but I was able to pull it together in the end.
I have a separate (and not maintained) series of blog posts about the work that went into it here (link).
For the highlights, see below:
The camera tilt/pan rig: Raspberry pi controlled servos for tilt and pan:
Video of the camera system responding to changes in orientation:
Video of what the user sees: