Life Accomplishments December 18, 2013 No Comments

In no particular order, this is the short list of the accomplishments in life that I am most proud of. This is the most concise way to learn what I’m all about.

Accomplishment Summary Links
CSCI 445 robot Enabled a small robot to have robust localization with a particle filter and basic object recognition from image blob segmentation. blog post, code
USC Illumin website redesign Rewrote a large online magazine from scratch. Biggest success was not the front-end viewing portal, but the rich content editor on the back-end. The entire article submit process and editorial workflow was moved from email, Excel, and Word files to an integration online platform. website
USC AeroDesign Team MDO (PlaneTools) A collection of tools to optimize remote control airplane designs in MATLAB. blog post, website
Mecanumbot robot hardware A custom mobile robot build from scratch. Body is made from CNC’d garolite and acrylic pieces held together by aluminum extruded rods. Features a holonomic locomotion, a quad-core computer, a 2D laser scanner, and a 3D RGBD camera. blog post, cad files
Mecanumbot robot software The code library that runs the Mecanumbot robot. Built on the Robotic Operating System (ROS.) blog posts, code
Mecanumbot power board A custom PCB to control and regulate the power for the Mecanumbot robot. One of only two PCBs that I’ve designed. blog post, schematics
Crew Dragon abort test avionics Lead a team to design and build the avionics system for the SpaceX Crew Dragon abort test vehicle. ITAR…

Mecanumbot Ball Following December 10, 2013 No Comments

I have updated my Mecanumbot code to the latest and greatest ROS distribution – Hydro. During the upgrade, I wrote a companion app to publish velocity commands based of of the output of my ball tracker. The result is that the Mecanumbot can follow a red ball around the room!

I wrote the ball tracking code itself back in college. The segmentation approach is pretty naive, but I only spent a few hours on it so I was pretty happy with the results. The code starts with the point cloud generated by the Kinect. The cloud is reduced by filtering out all points that are not red. A statistical outlier filter is used next to clean up residual noise points. Finally, the cloud is segmented into clusters (small clouds) based on distance. The largest cluster is then considered the point cloud of the ball. A transform between the Kinect and average position of the ball’s point code is broadcasted using the tf library. As a bonus usability features, when at least one cluster is present, the Mecanumbot’s lights turn green!

In order have the robot actually move, a simple controller was created to listen to the aforementioned transform and to publish Twist messages on the cmd_vel topic. A barely did any tuning of the proportional gain here. Since I only made tiny movement in the video, it is hard to see, but the current gain is actually a little strong. When coupled with the low refresh rate of the ball’s position (all processing is done onboard the Mecanumbot’s computer), the robot often oscillates rotationally even when the ball isn’t moving.

The tracking algorithm presented here is pretty fragile. Here are some ideas which could make it a little more robust:

  • segment using HSV color space instead of RGB – this will allow more robust color matching in different light scenarios while simultaneously lowering the number of false positives
  • use additional properties of the ball to improve segmentation – for example, filter clusters against the balls size and the known curvature
  • pass the output through a Bayes filter to clean out infrequent false positives
  • add a derivative component to the controller to reduce oscillation
  • add an integral component to the controller to fix small offsets long term (would be useful for the carpet I was on)

Links

BeagleBone Black Media Center PC November 27, 2013 No Comments

BeagleBone Black Media Center I’m a bit tired of paying $8/month for Hulu Plus to watch the same content on my TV that I can watch on my computer for free. Especially since I only mostly do watch TV on my PC and only the occasional episode at my couch, it just seems silly to pay the month fee. My goal is to build a tiny media center PC that will play Hulu, Netflix, and Amazon Prime video. I also require the machine to act as Apple Airplay speakers. This device will essentially be as capable as a Roku device. But of course with the Roku, as with any other embedded media device, I’d still have to pay the Hulu monthly cost. Besides not paying a monthly cost, and additional benefit of this setup as that there is a much better chance that I’ll be able to upgrade the software over time. Hardware list and software installation process after the break. Read the rest of this entry »

Wireless Control of Multiple GoPro Cameras September 12, 2013 No Comments

I recently created a little Django app that controls can control multiple GoPros simultaneously. It makes use of the GoProController Python class which does the leg work of actually taking to the camera over a wifi adapter on Linux.

Links

Django Quick-Start Templates September 7, 2013 No Comments

In the last two years at SpaceX, I have worked on a number of quick turn around web applications. Every time I start a new app, it takes me at least a day or two just to get the essentials in place, even with a framework like Django. In order to aid myself and others in future projects, I’ve taken advantage of Django’s template option to create the django-quick-start-project template and django-quick-start-app template. Both of these projects are hosted on my github page.

Screenshot with the project template up and running.

The django-quick-start project builds on Django 1.5, jQuery 1.10, and Bootstrap 3.0. Unlike other Django templates like Pinax, django-quick-start is much more lightweight. A key design goal here was to have all of the templates that build the set present within the project (in contrast to Pinax.) This makes it easier to understand how your entire page is built and makes changing things easier. It includes jquery and bootstrap, but does not depend on any other Django apps. This means all of the code that makes your site is contained in your project directory (unlike Pinax where even the core code is hidden across multiple apps.)

The django-quick-start-app template gets everything in order so you can start coding what is unique to your app. A basic template builds on base.html (from django-quick-start-project or elsewhere.) Empty app.js and app.css files are already included in the template. Just install and start coding!

Try them out, and let me know what you think!

Mr. Aqua 730M 3gal Aquarium Log No Comments

I spent this past labor day re-aquascaping my shrimp tank at work. I picked up a new Mr. Aqua 3 gallon long tank along with some Baby Tears and Dwarf Hair Grass from Anthony at Lotus Aquarium. I also grabbed some extra Money Wort from my tank at home for the backdrop. What do you think?

Read the full post for more updates!
Read the rest of this entry »

Arduino and Django Data Logger August 17, 2013 No Comments

In an effort to demonstrate a new django-quick-start package I’m making at work (similar in purpose to pinax, but with some SpaceX-specific packages), I decided to create an Arduino data logger that is viewable through Django.

The data from a couple different sensors is first collected with an Arduino. A Python daemon polls the Arduino periodically and asks for new data. The daemon saves this data to the Django database. At any point in time, users on the intranet can view the Django site and all the data that has been collected thus far. I’m also leaving open the option of adding a relay to control the lights and thermometer in the future.

Unfortunately, I’m running this app on our intranet, so the picture below will have to suffice. That, and all of the code that is available on GitHub (proprietary parts removed!)

Downloads

Mecanumbot Integrated Lights Test April 9, 2013 No Comments

I’ve finally achieved end-to-end control of the Mecanumbot’s LEDs! The latest hurdle which prevented me from writing the LED code was a RAM limitation on the microcontroller side. The solution involved swapping over from an Arduino Duemilanove with 1KB of RAM to a Seeeduino Mega with 8KB of RAM. The increased RAM also opens the door for me to code up the Mecanumbot low-level telemetry including items like bus voltage and bus current. This will be the final low-level Mecanumbot development!

In the video above, I demonstrate control of the internal, forward, and side LEDs via an Xbox360 controller. For the forward lights, I am actually varying the brightness with one of the triggers on the controller. (The Mecanumbot also has 16 LEDs directly below the transparent deck, but I didn’t bother to program a key to control these. They will be autonomously event-driven later on.)  I then turn off the lights in the room and gauge the effectiveness of the forward lights on the scene in front of the robot. Works pretty well if you ask me!

Links

3D-Printed iPhone 5 Car Mount April 8, 2013 No Comments

We got a new MakerBot Replicator 2 at work this month. I had been meaning to print an iPhone 5 mounting adapter for my car, so I thought I’d try to print that using the new printer!

The goal of the mount was to fit onto a car mount that I had bought for my iPhone 3GS back in the day. The suction cup and stand part of the mount conveniently separates from the backplane that holds the phone. That means all I had to do was to match the guide-rail holes on my new iPhone 5 mount for it to snap in perfectly. I chose to make the adapter fit my phone with the case on (using a ZeroChroma VarioProtect 5) and also included a hole for the lightning cable as well.

Mecanumbot Power Board January 6, 2013 No Comments

After a second revision, I have completed the power board for the Mecanumbot. This board has the following features:

  • automatically selects between two batteries and the wall
  • chooses the wall if available, otherwise drains the batteries one at a time
  • provides power voltage and current measuring
  • communicates to the primary vehicle Arduino over I2C
  • provides regulated 5V power for the robot LEDs

Downloads