Sunday, July 31, 2016

Programming


So here's the code I written so far for Fetch. On the left and upper right is the code for driving the motors around with the Tiva C Launchpad. The bottom right is the code for the Ultra Sonic Sensor and the arm for the Arduino Mega, though both controllers use .ino files.

I reveal here that I use Linux *gasp*. I originally started using Linux a while back in order to use and learn ROS (Robot Operating System) by myself, and ever since then I've never looked back. Though I do dual boot with Windows 10 just in case.

Fetch will be using ROS' amazing framework to function, luckily I've had experience with it in the past with either work or my own self learning. Fetch will also be implementing live video processing. Fortunately, I love C++ (and C too!) and use OpenCV for work and my own personal shenanigans on a daily basis.

I also reveal here that I use Emacs, er rather Spacemacs, a modified version of Emacs! (Sorry Vim users, but Emacs truly is the way to go). In the past I used various other text editors or sometimes IDEs. This continued until an older friend of mine introduced me the wonders of Emacs. Took a solid week during an in-school break to fully master it, but that learning curve was truly worth it! Now I can't live without emacs on my side.

relevant xkcd:


Fetch Itself

So here's what Fetch looks like with it's frame all put together, took around a week to fully finish building the frame and now I'm working on getting the circuits to actually work with my code after soldering all the components together. The kinect sensor on top will be Fetch's main sensor for mapping and navigation. I haven't decided what computer I want to use as the brain for Fetch. At first I was planning on using my nice ol' thinkpad, but that only has two USB A ports when I need 2 for each micro-controller (Arduino Mega and Tiva C Launchpad), 1 for the Kinect Sensor, and one for the camera on Fetch's arm. And getting a USB hub may not work as each controller/sensor needs its own dedicated port either for serial or for data, but I'll have to see.

Arm + Ultrasonic Sensor

Here's the Open Source MeArm that I modified slightly from its joints and claw for Fetch. The camera is simply a web camera that I took apart and modified to fit inside a quick little plastic case I put together. It's meant to aid in Fetch's object tracking. Underneath it is an ultrasonic sensor that is meant for Fetch's navigation and obstacle avoidance along with aiding the Fetch's obtaining of target objects.


Circuits

So here's the current jungle of a circuit that I made for Fetch, it consists of four 5 V to 3.3 V converters, a 12 V to 5 V Buck Converter, a motor driver, and finally a Tiva C Launchpad.

Bottom Base

     So here's the bottom base of Fetch.
     Starting from left to right and top to bottom; the Dual VNH2SP30 Motor Driver Carrier MD03A, TivaC TM4C123GXL Launchpad, and a breadboard with 3.3 V, 5.0 V, to 12.0 V. The top of the breadboard includes four Logic Level Converter Bi-Directional Module 5V to 3.3V, and a DC Buck Converter for 12 V to 5 V. The battery case is simply 12 V from eight 1.5 V AA batteries, which is a stand in for the Turnigy LiPo Battery I'm going to use. Finally there's an Arduino Mega with a motor shield on top, then there is the slightly modified open source MeArm with a web camera module that I took apart and modified sitting on top of the claw.

Underneath the Bottom Base

These motors are 131:1 Metal Gearmotor 37Dx73L mm with 64 CPR Encoder. They should be enough to carry the frame of Fetch along with the arm, controllers, laptop, kinect sensor, and electronics. The wheels are polulu 90mm black wheels and while they are not in the shot there are also a couple of casters from Lowe's to make sure Fetch stays upright.

Hello, World

    I heard that it's a good idea to document my progress on my projects for future me and future people to take a look at. So, that's the exact function of this blog. As of the starting of this blog I, Roy Xing, am a rising junior in High School. Unfortunately my previous self ventures have already been completed and scrapped for future projects (as of starting this I'm still a lowly high school student without proper funding haha).

    Here I'm going start with publishing the parts and progress of a particular robot that I'm working on, Fetch. As the name implies the robot is meant to fetch objects. The frame of the robot is inspired and modified based off of the Chefbot made by Lentin Joseph. The entire robot is scratch built as I firstly didn't have the money for a Create or Kobuki and there's just something about building your own frame that's so satisfying.

    The Goal: Fetch will be able to autonomously map out its room with a depth sensor (an Xbox 360 Kinect Sensor) and navigate around its environment to locate and obtain a particular object (a green pom pom for example).

    How: By me building the robot

    Why: This is a tricky part to answer with in-depth insight. Am I doing it for school? No. Am I doing it for work? No. Am I doing it to impress others? No.
           
              If I had to sum it up quickly my answer would simply be, because I want to. Now I know that isn't much of a satisfying answer, but if I went more in-depth it might get all feelsy and sappy peering into the past of a probably angsty 16 year old who still hasn't been able to get into a nice relationship.

              However, there is a feeling of enjoyment and devotion I have towards creating things. Starting from making papercrafts as a child, to moving onto battlebots as a middle schooler, and now creating full autonomous robots as a high schooler there has always been a feeling. A feeling of accomplishment, struggle, enjoyment, an intangible sense of more. I want to create.

Welp, that got sappy at the end, to be expected of kid who's still a teen. But yeah.

TL;DR: This blog is about the on-going documentation and progress of a robot named Fetch.