In preparation for International Nodebots Day this July 30th 2016, I built this Bot that can be controlled in Virtual Reality.
When we went to Mars, we sent a Mars Rover. In Virtual Reality, I sent an Earth Rover to explore our world. I control the bot using browser using WebVR.
My name is Ron Dagdag and I'm doing a series of VR projects. This is part 5 of 6 series project exploring Virtual Reality as a Maker. I'm not going to create games, I am going to explore different ways to create new experiences and interact in VR/AR.
Part 1: Amazon Echo VR Controller
Part 2: Gesture Controller using Particle Photon and Sparkfun RGB and Gesture Sensor APDS-9960
Part 3: Virtual Reality Fireworks using Color Sensor
Part 4: ConstructAR - The Holographic Tool Belt
Part 5: Control your "Earth Rover" in Virtual Reality
Part 6: Posture Recognition using Kinect, Azure IoT, ML and WebVR
Using Virtual Reality and Leap Motion to control a robot is awesome.
I bought one on aliexpress because it's cheaper, it came everything you need including an Arduino Uno. It has Motor Drivers, Servo Controller, the Wheels, the Base, Battery even Distance Sensors.
The instructions are easy to follow and came with pictures, just what I need.
So instead of using Arduino Uno, I replaced it with Intel Edison with Intel Edison Arduino Breakout Board.
The Intel Edison Arduino Breakout Board allows us to connect the Intel Edison to Arduino shields. It has integrated Wifi, Bluetooth, storage and USB connectors. I plugged in my USB Camera and found this project called edi-cam.
I based my project here. Since the Intel Edison support Yocto Linux, I has NodeJS built in. Everything I need for my Nodebot.
edi-cam project demonstrates live video streaming on Intel Edison using Node.js and WebSockets.
To get the USB camera working, make sure that you're powering it up with a 9-Volt battery or the Wall plug. You can't use the USB if you're using the micro USB to power up Intel Edison from your computer. It's not enough power to run the camera.
After getting the edi-cam going on my Intel Edison, I've noticed that the camera would just freeze after two minutes. I scratched my head. After digging into, I found out that the later version of NodeJS would timeout and close the http socket connection after 2 minutes. I fixed that by changing the timeout to zero.
Now, I need to control my robot. Move left, right, forward or back. I saw this project on Github.
Just what I need. It's using NodeJS and Johnny Five to control the Bot.
I have Oculus Rift and I've done programming with it inside Unity. I want to try a different way without installing any apps and using VR Web.
I came across Aframe.io while I'm browsing about Virtual Reality and I'm amazed how easy and extensible it is to do Virtual Reality applications.
To read more about Aframe.io, use this link
It reminded me of VRML back in the early days of the web. Aframe is way better though. It's extensible, and open source. I found this component that allows to use Leap Motion in Aframe.
Leap Motion and Virtual Reality works well together. Leap Motion a great way to interact with Virtual Reality, being able to see and manipulate virtual things is awesome. That's why I included it in this project. I can use a "planet" to make the robot turn left or right just by grabbing it.
Since I'm using Aframe.io, Google Cardboard integration came with it. So I can go to the website on my phone, put it on VR mode and plug my phone to Google Cardboard.
1. Rover Bot
2. USB Camera
3. Intel Edison Arduino Breakout
4. Leap Motion
To Setup, follow the instructions here:
Also, I only deploy it in one place which is inside Intel Edison. There are no extra installs on my laptop or my phone. I start my web server and It just works.
If this project made you interested in developing in Oculus Rift, tinker with Aframe.io, Johnny-Five, or just learned something from this article, please click Respect Thumbs Up button and follow me. Feel free to contact me if you have questions. Thanks.