Thursday, October 2, 2014

Have Fun Getting Things Done

We all have things we want to improve on in our life. How often have you said things like, tomorrow, I will start my exercise program or my diet? When will I find time for the things I have to do and the things I enjoy doing? Even if you do start will you be able to convert these behaviors into permanent habits? What if there was a way to make being reminded about these things a little more fun while also providing you with the motivation you need to get them done?

Well, I would not be asking these questions if I did not want to talk about an application I came across that does exactly this, HabitRPG.



I have never been a big player of traditional low pixel resolution RPG games like Pokemon but I have played a lot of Everquest and Wow and one of the things these types of games can do is influence your behavior by introducing compulsive addictions which draw you back to the game again using virtual rewards as a motivator. This can be a hugely effective but can also be a huge waste of your productive time. This does not have to be the case if we could keep the motivational aspects of playing a game but tie the rewards to you getting things done in real life (IRL) instead.

HabitRPG has a simple system. Tell it the habits you want to encourage (like not smoking, if you smoke or drinking more water), The things you want to commit to every day called Dailies (Like getting out of your chair and getting some exercise) and your todo list of tasks you need to get done.


Once all this is entered, the game begins. You start a level one. You are given 50 hit points. If you loose all your hit points, you die. Now no one wants to die but if you don't start checking off tasks they will cause you damage and each day, your incomplete tasks will drain your hit points. How do you gain back your hit points? By leveling up your character. Each task you actually complete grants you (through your character) experience points and gold. Accumulate enough experience points and you will gain a level. Gain a level and you become completely healed.  This cycle keeps you motivated as you build your character and gain levels. If you die, you loose a level after reading a disturbing dialog informing you of your death.

Wait a minute...did you say gold? Yes, in addition to building experience points, you also accumulate gold for completing tasks. Gold can be used as a reward since you can take things you enjoy doing and assign a value in gold to them allowing (or possibly reminding) you to reward yourself for all your hard work. Gold can also be used to buy gear to protect yourself from damage to your hit points or potions that will restore your hit points if you are near death.

One of my sons pointed out to me that you could cheat at this game by simply creating tasks and completing them for profit. This would be the equivalent of grinding in an MMO or an RPG. My response to this is why bother. The only person you are cheating is yourself. If you can't be honest in reporting your own accomplishments, how can this game help motivate you to get things done in the first place?

What about the stress or pressure you might start to feel if not finishing your dailies is rapidly killing you? Nobody needs to have panic attacks over an artificial motivation such as a fear of death in the game.  The solution for this is simple- just check into the Inn. If you check in to the inn then you will not take any damage until you check out again.  I died on my second weekend playing the game because all my daily tasked killed me because they were scheduled for every day of the week. Once I fixed this so that I only performed them during the work week things went much better for me. Going on vacation? Don't forget to check in to the Inn for this as well.

During my day job I usually plan my work week using another web based tool called JIRA and a plugin called JIRA Agile. This tool works great for team assignments, planning and todo list for a project but I have started using it in conjunction with HabitRPG. I find that the concept of dailies and habits and having a personal todo list works great in conjunction with my JIRA task lists (now if I only could arrange to get gold and experience points for closing out JIRA tasks!)

I am only at level five at this point but I think I am going to stick around. The rewards for leveling include access to a character class system where you can specialize take up such occupations as Warrior, Mage or Rogue. These classes give you access to special abilities which allow you to help yourself or others. Something I am just beginning to discover is the possibility of group play. The game has Groups and Guilds which allow you to tackle goals with a team of people.

At this point I have to ask myself, who should use this tool? I think anyone who needs a little help motivating themselves to get more done or to finally start doing some of the things they have been meaning to do forever should consider it. I am trying to introduce my kids to it but so far, no luck. Just imagine getting gold and experience for doing your homework.

It will be interesting to see how this application evolves. I have often wondered if there should be an extension of the site that actually lets you use your character in a real RPG environment. This would allow you to actually play your character in a game while building it during your day job. To my knowledge this does not exist yet but I think the idea has potential.

In case you are wondering, I have set up work on my robot as a reward. It costs me 10 gold but it is worth it.


Sunday, September 14, 2014

Getting A Head

I finally got around to building the head for my K9 prop/robot. I have been dreading this for a long time because of the rounded edges that are on the top, bottoms and sides of this piece. I knew there would be a lot of bending, scoring and clamping to make this happen. In the end, I was not 100% happy with the results. Let's start with a shot of the finished product.


The goal so far with body construction has been sand and prime the outer shell and move on. I intend to do a final patch sand and paint job at the end of the project after all the equipment has been fitted inside. 

At first I thought the head as too big but I have checked it against hero prop shots and the original plans and it's not. The production designers actually made the head bigger in later versions of the prop.  A fact I picked up while researching what I thought was a problem. It's a good thing it's big too because it needs to hold animatronics for its ears and nose and a thermal printer. I have also decided to move the raspberry PI and external speakers into the head as well to shorten the distance between it and the camera. The head will probably be more complex than the entire body. 

Now let's talk about construction. I started by gluing the bottom plate to the sides and then gluing a cross brace at the brow and the back of the head.

After clamping, I countersank wood screws on both sides of the cross braces. I later had to add a cross brace on the bottom because there was to much stress for glue alone to hold it together. 


Here is a shot looking down into the head from the top showing the bottom cross brace. This was after the brow cross brace and neck mount were inserted.

It is defiantly at an angle. His was because I adjusted it to try and change the shape of the head because it was a little mis-shapen without cross braces to hold it in place. Also shown here is a cross brace in the back of the head to allow the curved plate of wood in the back to be bent around it. 

The back plate had an almost circular curve to it. This is not easy to do with wood. I was thinking of using water to soften it but decided to score the back of it every inch and a half to make it more pliable. 
In the end this loosened it just enough to allow it to curve around the back just enough to fit. After this plate was attached I covered over all the screws with wood putty and gave everything a priming and sanding. 

This left only the top of the nose and the head without wood. These will form the removable access doors. I will also have to cut additional compartments for speakers, printer controls and a temperature sensor. They are all going to be mounted on the underside as shown below.


I have fitted the head into place on the body to get a better idea how I am going to permanently mount it. During this process I discovered that once the head was installed, I could not longer use the remote control to move the robot forward. Its front mounted ultrasonic range finders kept reporting that there was an object about 8cm in front of it and it would not allow me to move it forward no matter what I did. I assumed that I had damaged the sensor while installing the head so I removed it.

Once I removed it, I could now move it by remote control. Unfortunately, without this sensor to stop it, once I started testing it, it ran out of control and broke its neck, causing the head to sag but not come completely off.  This is not my first setback during this project but it was the worst since the fire in the dorsal light control board. It was after this accident that I realize that the ultrasonic range sensor was detecting the robots own head as an obstacle. Once I moved the head up and out of the way, the range finder began working again. Pity I had to remove it and bench test it to find this out. I should have realized it when the problem first began.

Well this entry probably ran on too long so I will end it with a shot of K9 with his head (before it got broken) sitting next to Appa, the beagle. Next time I will talk about installing equipment into the newly build head.

Sunday, July 27, 2014

LCD Display and Tail Rig Installed

Its been a while since I updated. This is because progress is slow. I work on new hardware when I can. There have been significant improvements and I will summarize some of them with some progress pictures.

First off, my family has added a new real living dog to the crew. His name is Appa after the sky bison from Avatar: The Last Airbender. Here is a picture...


He is into everything and he is not sure what to make of K9. At least he has not decided to chew on him yet. Now back to what progress I have made.

In my last entry I had started working on the tail servo rig. This is now completed and I have a wagging tail that can be controlled through the web interface. Here is a video of the installed tail rig in operation.


video

The web interface is coming along nicely too. K9 runs a python based web server (Flask) and exposes all of his functions for debugging and testing through it. This has been invaluable as a testing tool, allowing me to debug the tail motor and dorsal lcd display. Here are a few shots of the web interface which is a work in progress, of course.




Moving on, I have finally gotten around to installing the LCD composite monitor on the left side of the shell. This is very handy because I can actually watch the boot-up process and know what is happening when things go wrong.


I still have the trim and an acrylic cover for this display on order which really needs to be installed so it will not look so obviously like a car dvd player. It still comes in really handy. Here is a video which shows off the display and the ability to play sounds from the web interface.

video

So everyone asks me, "That's great but when are you going to build the head?" Well its all about parts and time. I have the wood cut for the head but I don't want to assemble it until I at least get the printer that I am going to install in it delivered. I want to make sure I leave enough room inside the head to mount the printer. The head will have multiple servos inside it to control the ears, telescoping antenna and nose gun and will have to be constructed around these systems. Still, its next on the list and I need to get started on it.

I always like to post other K9 builds I come across. Here is one that I came across at Philadelphia Comicon this year (2014). I don't think it ever moved on its own and it obviously has been around (just look at the scratches and dents) but it is always interesting to see what other people have done.


Its a good reminder of how far I still have to go on this project to complete the hardware. After that, hopefully I will have even more work ahead of me writing software to allow it some autonomy from its own remote control. That's it for now, I will try to post some more design details and pictures as I start construction of the head.



Sunday, June 1, 2014

A Dog's Tail - Pitch and Yaw on the Cheap

I don't have the parts or tools to build rigs out of aluminum or steel but I need to figure out how a set of servos can control K9's tail. Wood and plastic will have to do for now until those parts break or wear out. The tail essentially is a pole that must be able to move horizontally and vertically by motor control. Here is a shot of the actual tail on the prop itself.


Fortunately, there are a few good examples already out there on how to build this motion rig. For example, here is one using only DC motors. Here is another example using Servo motors which is very impressive. This rig is built with multiple aluminum C-brackets and struts which looks very sturdy but I have no idea where to get the parts. So far I have built a test rig consisting of two RC aircraft 180 degree servo motors connected together, one to shaft of the other as seen in this example I found for sale.

Incidentally, if you are looking for the rubber fixture I am going to use, its a CV-Boot from a car. They can be found in almost any auto supply store. Here is a picture of the one I chose.


It is a close enough match to get the job done. I will end up cutting away the lower half when I mount it to the body. Now back to the test rig. Below is a video of the test rig I built just to see if my two server idea would work. The two servos are joined together with rubber bands so you will see a lot of oscillation as the arm moves around and a hanger is standing in for the antenna but other than that, it is performing the required motions.

video

Once I replace the rubber bands with firmer connections, all shaking will go away and I will have the wagging motions I need without having to construct a more complex rig. How long it will last in action will be another matter. Everything is being driven from an Arduino that is not connected to the main robot. This is just for testing purposes.  The next step will be to move everything to a permanent rig that I can attach to the CV-Boot inside the main shell. I will post pictures of that when that is completed.

Wednesday, May 7, 2014

A Dog Without A Head - K9 Assembly Testing

So this is another quick blog entry. Last night I did a test assembly of the main body, the dorsal control panel and the drive base. I just wanted to see how (and if) the parts fit together. This video features the new right side door which I will talk about more below.




For the longest time, I never bothered to manufacture a right, side door. This is where the classic K9 logo will go when the body is finished but up until now it was just a big access hole. The door needed to be custom fitted because even though it is draw out in the BBC plans, the body itself has a unique shape because it is built out of wood and glue as opposed to metal which would be far more rigid. I started with a cardboard test cut out which I roughly cut to fit and made adjustments on that. Then I duplicated this in particle board and spent quite a while sanding the edges until it just fit the hole.

It is interesting to point out that the lower portion of this door is angled down about 6 degrees to conform with the way the body itself is angled. Rather than cut and join two pieces of wood, I routed a horizontal line through the particle board along where the angle change occurs just thick enough to make the wood bendable. I then bent it into shape and filled the routed channel with plastic wood.


This turned out to work really well. The resulting door was a perfect fit and once it was sanded and sealed, looked like a natural bend in a single piece of metal.


This door will be held in place with four magnetic cabinet door catches so it will be secure but come off easily. You are also looking at the primed finish, not the final finish which I am waiting to apply until the entire body is complete. I will probably go with the dark blue metallic finish of the K9 Mk III as shown here when done.



Tuesday, May 6, 2014

Raspberry Hal

I wanted to keep a Raspberry PI running at my desk at work full time here at PTC but I wanted to have it out of the way. It would be available if I needed a system that remained at work while I was away with my laptop. I also wanted it as a test platform for some work I have just started doing on the ThingWorxs  platform and the "Internet of Things". Now you know me, I like to build electronics into science fiction replicas so I thought, why not build a Raspberry PI case into the polyurethane Hal replica I have hanging on my cube wall. Here is a shot of him from the day I put an Apple sticker on him before any modifications.

Unfortunately, he was made almost entirely out of solid, cast polyurethane. I tried to hollow him out with a Dremel tool but it was going to take a long time and be very messy because of the excessive dust it was generating. Because of this, I decided to recreate a hollow version of him in wood. I already had some experience creating control panels out of wood for my K9 project so I knew I could do a pretty convincing job. I had already installed a battery to light his eye and a light sensor on the polyurethane prop to turn the eye light off when the office was dark to conserve on battery power. I could reuse these in the new Hal.

For those of you who don't know much about Hal, he was the shipboard computer on the spacecraft Discovery One that tried to murder his entire crew when he felt they would interfere with his carrying out his mission in the movie 2001, A Space Odyssey. Here is a clip of him in action.


I wanted my new Hal to hold a Raspberry PI, some environmental sensors, an amplifier and his own speakers, all powered off of a single cell phone wall charger. He would be capable of playing appropriate Hal clips from the movie as well as responding to simple spoken commands. He should also serve as a Thingworx test platform for reporting metrics based off of the sensors I planed to install.

Here is a sentimental moment with Hal on my workbench saying his first words.

video

It was kind of creepy to hear him speak for the first time.

Here is the completed project now hanging on my cube wall. The prop has now been entirely rebuilt out of wood. He is fastened to the wall cloth with two pins that come out of the back of the unit at a 45 degree angle like a picture frame nail. This allows him to be easily removed for service.


One thing I did not expect was that when he is mounted flush to the wall, his temperature rises until he goes into thermal shutdown. It turns out that the PI generates so much heat that adequate ventilation is required. If there is no way for this heat to escape, the inside of the case can reach temperatures in excess of 50 degrees Celsius (122 degrees fahrenheit)! I had to bring him home and install four small legs that make him stand 1/4" back from the wall to allow for proper convection cooling. Now he stays at a cool 44 degrees C (111 degrees F).

Here is a shot of the back and side of the case with callouts for the parts inside. The only sensor I have installed so far was the original light sensor I took from the original polyurethane model I started with. I am adding a sound card (for speech recognition), external temperature sensor and an infra-red proximity sensor next. I will also replace the wire wrapping (the thin red wire nest) with a real cable.



I am planning on publishing the details of how to re-produce this project on Instructables soon along with the software running on the PI.


Tuesday, April 22, 2014

K9's Outer Shell - Building with Wood

Just ask my old shop teacher, I was never really gifted in the wood working department. Wood is the only material I am really at all familiar with, however, so that is what I will use to construct cosmetic parts for this robot. As I move forward with this project I am learning about other materials such as Vinyl, Aluminum and Acrylic but I basically have to stick with materials I can work with at home - so wood it is.

I mentioned in a previous blog entry that by first attempt a building the dorsal control panel was too small and I would have to build a new one. That gave me an opportunity to document the very an example of rudimentary techniques I used to construct the outer shell as I build this much smaller piece.

The first step usually is a cardboard model. In this case I was pretty sure what I wanted so I skipped this. Next step is drawing out the pieces onto a piece of wood. In this case, I am using very thin wood at only 1/8 of an inch. Here are the parts drawn into the wood.


You can see off to the right, the paper templates I printed out to transfer the lines onto the wood. Since this wood is only 1/8" thick, I then start to score the lines with an X-acto knife and then move to a box cutter. It helps to coat both side of the surface with clear packing tape before you do this to prevent the wood from splintering. Soon the wood will be cut through and you can remove the packing tape. If I were using 1/4 wood or particle board as I used in the frame I have show in past blogs, I would have to use a scroll saw or a bayonet saw to do the same thing. I then bored out the button holes by again covering the wood in clear packing tape and then using a 3/4" spade drill bit.

Next, thanks to the miracle that is Heavy Duty Liquid Nails I assembled and clamped the parts together. This piece has a curved section that will have to be clamped in place while the liquid nails drys.


Don't put on liquid nails to heavily as this severely increases the time required for it to dry. A light coat between the pieces will hold this thing together if you give it at least 24 hours to dry and set. I originally did not know how I was going to do the wood assembly this project would require but this stuff really holds things together.

After 24 hours has passed, I removed the clamps and Dremeled down the rough edges. Then I filled all the holes and remaining imperfections with Plastic Wood and sanded everything down smooth. Now it looks something like this.


Next, I had to cover up the wood grain. This is done by priming the wood and the standing down the primer coat until it fills the the wood grain.

Here is the near finished product. You can still see some wood grain but I am leaving it at this stage and moving on. I will do a final sanding and priming right before I do the final paint job once the entire body is finished.

I am going to postpone the final coat because until everything is finished, I am not sure what additional modifications I may need to do to the body before it is complete and I don't want to worry about marring the finish while work continues.

Here is the near finished product, sitting in the main body shell (Which, unfortunately, has some plastic wood filler on it at the moment) on the left compared to an actual shot of the detailed (hero) prop on the right. This time I have the correct scale.





Next, hooking the lights and switches back into the Arduino.