Tuesday, December 30, 2014

How to Fight a Robot: What have you gotten yourself into?


Earlier this year, I began building a full-sized humanoid robot, following the InMoov design, because I wanted to build a robotic sparring partner.  I wanted him to swing an eskrima stick at me, throw a punch at me, and even do some blocking drills.  I wanted to fight a robot.

Unfortunately, he sucks at fighting.  There is a very long list of necessary modifications before he could even throw a single punch that lands with impact, and not fall apart immediately.  Changing this robot is just not worth the effort at this point.  Instead, I have begun designing my own fighting robot from scratch.

The point is, robots are not very good at fighting in general.  With the help of a few key insights, a human could easily dominate a robot opponent in a fight.  You will probably never find yourself in a situation where you need to defend yourself against a robot in hand-to-hand combat, but just for fun, I will walk you (a human) through what it takes to fight a robot and win.

Monday, November 24, 2014

Build Project: Headlight for a Tricycle


Headlight for a Tricycle

This is a headlight I built for my son's tricycle.  It is designed to fit a fisher-price plastic tricycle, but you can tweak the designs (in openSCAD) to mount it on any kind of tricycle you like.  It is perfect for riding in the dark, and my son absolutely loves it.

If you want a cost-effective way to put a light on your own kid's tricycle, you should probably just duct tape a flashlight to the steering wheel and be done with it.  On the other hand, if you are looking for an over-the-top solution that lights up a whole damn room, costs you more than thirty bucks in parts, and is incredibly difficult to assemble, please keep reading.

Saturday, October 18, 2014

Early Analysis of Insult-O-Bot 2000



Insult-O-Bot is a twitter bot I designed primarily to help teach myself Python and the twitter API, but also because I find something inherently funny about using advanced technology for potty humor.

You can check up on him via his twitter page or you can tweet him directly: @InsultOBot.

He has been live for 10 days now, and here is an analysis of his performance so far:


  • 158 followers
    • 81% male
    • Interests: 86% Comedy (movies and television)
    • Interests: 61% Comedy (hobbies and interests)
    • 61% from the USA
    • 6% from Canada
    • 19% from the UK
    • 28% also follow Conan O'Brien
  • 343 tweets
    • 63 retweets (18%)
    • 178 favorites (52%)
    • 2048 tweet engagements (6 clicks per tweet)
    • 29,249 total impressions
    • 7.0% click/view ratio

Most of these stats are fairly obvious.  A potty-humor-robot appeals primarily to men who enjoy comedy.  One interesting point, however, is that his engagement rate is incredibly high for a robot, which I believe comes from the underlying rule-set he is governed by.  Since people "nominate" their friends to be insulted, on top of the entertainment and the content Insult-O-Bot provides, there is also a perception that Insult-O-Bot's tweets actually "came from" a good friend: the person who nominated them.  This has a lot of interesting implications for twitter bots designed for marketing purposes, where engagement with a brand is the primary goal.

Here is a breakdown of the engagement rate by subject, and by the type of insult:

The primary lesson to be learned here is that if you want to insult someone, make it about how much of a loser they are, and not about how stupid their mother is.

I will go through and tweak the variables to improve the engagement rates, but there is another metric I would prefer to optimize on:  (retweets+favorites)/Impressions.  That metric is a more genuine representation of enjoyment, but unfortunately, the counts are too small to run a proper analysis on yet. I will have to wait until Insult-O-Bot has a few thousand tweets first.

As for bugs and issues, I had a few bugs I needed to iron out in the first couple days since he went live (including trouble recognizing nominations), but all of that has been taken care of now, and I can be relatively hands-off, with the exception of some moderation for the insults submitted by followers.

Here are a few other interesting observations:
  • People seem to genuinely enjoy insulting insult-o-bot, even via direct messages, where nobody else can see the conversation.
  • Nominations get a lot of favorites and replies
  • Even though insults about "your mom" had lower engagement rates than insults about you, a preliminary calculation of retweets+favorites per impression for "your mom" insults was 25% higher.  More data is needed to properly evaluate the impact of "your mom" on insult enjoyment, but it should also be noted that she is so fat, even her shadow has a significant impact.

Tuesday, October 7, 2014

An Insulting Twitter Bot: Insult-O-Bot 2000

I have created a great evil and unleashed it upon the world.  His name is Insult-O-Bot 2000, and he is a twitter bot that insults people over twitter.

If you want to start tweeting with him now, visit his twitter page or tweet him: @InsultOBot.

If you want to learn more about how he works, you can visit InsultOBot.com.

Here is the quick intro to Insult-O-Bot:  Tweet the word "nominate" and some friends' handles, and he will insult them for you.  Tweet the word "immunity" and he will put you on his "immunity list" where you will be safe from his insults.  Insult him, and he will insult you back.  Insults are customized to fit the user.  He slowly learns more insults the more you insult him, so if you would like to contribute, please visit his twitter page call him horrible things.

Here are a few of his latest tweets:

Saturday, August 16, 2014

New Project: Prototype Helmet that Actually Prevents Concussions

Football helmets are practically useless when it comes to the only thing we really want them to do:  protect our brains.  This may sound like a bold claim, but it is backed by a number of studies, including this one where old-timey leather-head helmets actually outperformed modern football helmets.  Riddell, the official helmet manufacturer for the NFL, recently lost a lawsuit for making the unfounded claim that their "Revolution" helmet (allegedly) reduced concussions by 31%, and Schutt Sports, the other major brand, forces you to click on a disclaimer that states no helmet can reduce the likelihood of concussions before you can even look at any of the content on their website.

There is a lot of speculation about whether this issue will lead to the slow demise of the sport as more and more former NFL players are diagnosed with Chronic Traumatic Encephalopathy (CTE) and concussion litigation does more and more damage to the bottom line and youth participation in the sport.

Wednesday, August 6, 2014

How to fight someone wearing a powered exoskeleton

 vs.
Powered human exoskeletons have been in the dreams of science fiction enthusiasts for decades, but in the last few years, they have started to become a reality.  The united states military is currently working on a prototype of the TALOS Suit,  dockworkers are already using them in South Korea, and a powered exoskeleton even helped a paraplegic kick off the 2014 world cup.

With all of these amazing steps forward in technology, pushing the limits of human capabilities, the question arises "what would you do if you ended up in a fistfight against someone wearing a powered exoskeleton?"

Of course, I've never fought an opponent in an exoskeleton before (I'm pretty sure nobody has), but drawing from what I know about robotics, physics, and martial arts, here are a few of my my best guesses at how to win that fight.

Thursday, July 31, 2014

New Science Tattoo: The Periodic Table of the Elements on My Back

It is really difficult to get a good picture of your back.
It's the periodic table of the elements, and the simplicity of its structure is one of my favorite examples of scientific beauty.  Everything in our macroscopic world is made up of stuff in these boxes, and when you line them up by the number of protons like this, their columns (and general location) tell you quite a lot about their physical properties.

Other tattoos:
Just in case you were curious, here is a quick inventory of my other tattoos.  All of them represent the inherent beauty that comes from our ability to look at the universe, and build an understanding of it with only a few simple symbols.  To me, this is the prettiest art there is.

Right Calf:  The Schrödinger equation, and an electron trapped in a quantum well
This is the key to understanding how things behave at the subatomic level.
Right Foot:  The uncertainty principal
This captures the inherent randomness of our universe and our inability to observe it perfectly.  The irony is that this one is starting to rub off, making it difficult to observe.

Left Calf and Foot:  Pi, out to 51 digits
This ratio is fundamentally tied to the curious fact that our universe has more than one spatial dimension.
Left Bicep:  Maxwell's equations
These four equations govern all of electricity and magnetism.  Unfortunately for me, some assholes went and created a magnetic monopole in a laboratory, which violates the third equation, so now I have to go get an asterisk or something tattooed on there.



Left Tricep:  Electric field lines from static charges
A companion piece to maxwell's equations.  All the field lines start on the positive charge and end on the negative charge.
Left Shoulder:  Magnetic field lines from a bar magnet
Another companion piece to maxwell's equations.  Every line is a fully closed loop with no beginning and no end.
Right Ribcage:  List of martial arts I have studied
Taekwondo, kenpo, judo, wushu, muay thai, eskrima, and hapkido.  I have studied a lot more than just these, but these were the ones I felt most shaped my journey as a martial artist.  This is my only non-science tattoo, but this is still art to me because it reminds me that I live in a place where all these cultures come together, and I can learn a little bit from each of them.


Monday, July 28, 2014

Progress on James the Robot

"James the Robot" is coming along nicely, although I still have a few hurdles to overcome.  Who knew building a full scale robot training partner would be difficult?

James, gasping is disbelief.

Here are a few issues I am still trying to work out:

  • Right fingers are unresponsive - I'm pretty sure either the power or the ground is not making it all the way to the hand.  I'm going to have to take it apart and test it out.
  • Left fingers are jumpy - I'm not sure why, but it seems like the signal for one finger is getting picked up by the others as well.  This could be due to the fact that they all share a common ground and power housed in the arm.  I'm not sure how I am going to fix this yet.
  • Right shoulder moves the wrong way - the potentiometer connected to the servo in the right shoulder is backwards, so I need to detach it and put it on the right way.
  • Left arm spins forever on its own - The left arm just twists clockwise no matter what the potentiometer says.  It could mean the potentiometer is disconnected somewhere... I have to admit my soldering is not exactly professional quality.
  • Eyeball Y-Axis servo died - I'm pretty sure I burnt out this servo by setting it to a certain angle which was not physically possible.  I've burnt out like 5 of them so far by telling them to do something impossible.
Hands are difficult.  This is why most robots just have pinchers.


And just to make myself feel a little better, here is a list of what is working well:
  • InMoov Control Center software looks nice - The customizable software I wrote to control the robot with is about a third of the way done, and it looks great so far.  You can use buttons or sliders to position each servo, and it is pretty fun to control a robot that way.  Snapshots and actions are next.

  • The head works great - James can nod his head yes and shake his head no, and look left and right with his eyes, and open and shut his jaw. 
He's so melodramatic.
  • He has a voice - I connected a small speaker to a raspberry pi board for his voice.  You can type text into the command line, and it sends a query to the google translate server which then reads it out loud.  I didn't like the woman's voice, so I pulled the pitch down by 50%, and now he sounds like a nice guy.
James' vocal chords
Raspberry Pi... his brains

My goals right now are to finish the software, and (one by one) fix the problems with the servos.  I'd like James to be able to punch me in the face in a month or two, and I'd like to see how well he can swing an eskrima stick a few months after that.  

Thursday, May 29, 2014

I'm Building a Robot

So far, I have been using a body opponent bag as my test subject for most of my experiments, but most opponents you will face in the ring or on the streets have arms.  In order to better account for this, I started to build mechanical arms to attach to the punching bag, but then decided to just build an entire robot instead.

Meet my new training partner:


I printed him on a 3D printer using ABS plastic using the inmoov designs for the parts.  I made a few modifications to ensure he can take a punch or two, but for the most part I stuck to the original designs for now.  If you want to get started building your own, Gael Langeven posted a great little starter kit with a single finger here.

For now, he only has a head, torso, and arms, and I mounted him to the body opponent bag for the sake of stability.  I don't plan to even think about legs for a while.  All of his motions are controlled by servos  of various sizes attached to an arduino mega board, but I still haven't finished calibrating any of them.

I will probably need to do a lot of calibration, wiring, and fine tuning before I can start teaching him to throw a punch, so it might take a while before I can actually train with him, but this is a good first step.  Until then, here are some more pictures:





Tuesday, March 18, 2014

3D Printing an Eskrima Stick

It feels natural, but it is not quite strong enough to take a beating.


For this entry, I attempted to build an Eskrima stick using a 3D printer.  Personally, I love rattan sticks, but it is not very easy to put sensors and other instruments in a traditional eskrima stick, so I decided to give this a shot.

The designs and instructions are all uploaded to the thingverse for anyone who wants to print their own or improve on the design.

It turns out ABS plastic is not strong enough to match rattan.  In order to get the right weight, I had to use a 30% infill, which means the inside of the stick is filled with a honeycomb pattern.  This is strong, but still no match for a traditional eskrima stick, and mine broke after only a few full-force strikes to a punching bag.

Maybe I'll just put some duct tape on it.

The stick felt great, and it is perfect for practicing forms or playing around with, but it is not suitable for sparring yet.  In the future I may try different designs, different materials, or perhaps some cyborg of rattan and plastic that can house some electronics.

Thingverse page:  http://www.thingiverse.com/thing:275391

Wednesday, February 12, 2014

Surface Area Measurements for 26 Different Hand Strikes



Sometimes, scientists use mathematics to investigate and uncover beautiful truths about the nature of the universe.  Sometimes they just take craploads of data over and over again.  This is one of those times.



Method:

Instructions:  Paint, Punch, Repeat.
First, the punching hand was covered in a thin coat of red acrylic paint.  The paint was applied with a sponge to ensure consistency of paint application.  Then, ten punches per category (at full force) were thrown at a paper towel attached to a body opponent bag (BOB).  The resulting imprint was then photographed, and analyzed using GIMP photo editing software.  The surface area was calculated by counting the number of red pixels in the imprint area.

Test Subject:

My right hand, front and back, shown with a six inch ruler.
Each strike was thrown with my own right hand.  To the best of my knowledge, my hand is a relatively typical hand for a martial artist.  For the purposeless of this investigation, my skill level should be considered intermediate, which means I am experienced enough to throw consistent strikes with "proper" technique (as I learned them, but everyone's "proper" is a little bit different), but my execution can still be be easily matched by other martial artists with a desire to replicate these results.

Results:

For now, I am not going to provide much analysis.  Instead, I will provide the data with some commentary, and leave the analysis for a later date when I can provide more color with other metrics concurrently.



If you would like to examine the raw data (in the form of photos of the imprints), please contact me and I will be happy to share, although, if you have interest in this topic, I recommend you also replicate the results on your own and share your findings.

Conclusions:

A lot of the strikes were within a standard deviation of each other, so not all differences we see may be meaningful, but for many strikes, the shape of the surface was more enlightening than the total area.  Despite the small sample size, these results do allow for us to make some order-of-magnitude generalizations we could not make before:

  • Boxing Gloves cover about twice the surface area MMA gloves do
  • Boxing Gloves cover about three times the surface area bare knuckles do
  • Punching a compressible target (like a person) results in four times the surface area compared to a rigid target (like wood or concrete).
The process itself was very low-tech, so I highly recommend trying a few of these at home with your own hands and your own version of the technique.  Please feel free to share your results if you do.