Author Archives: ronaldx

Go Johnny Go

Johnny-Five the original JavaScript Robotics programming framework has a new website http://johnny-five.io! The site looks great and does a god job showcasing the project’s maturity.

One of the many gems in this project is the Animation library. It allows you to control one or more servos by defining small timed sequences called segments. A segment is basically a timeline.
To control the timing of your keyframes you define cue-points. Your keyframes define the position of a target (servo) at a given time.
When you recall your sequence the library automagically controls your servos and perform the described animation taking care of timing, interpolation and even easing for you.

I want to add some animation sequences to Felix. Teach him a few tricks.
But describing the coordinated movements of a set of 8 servos as cue points and rotations is tedious.

Instead i start working on a simple animation editor. The idea is that you edit segments while your board is connected so you can drag and position your servos in real time. In that way you can test/play your segments until you get your moves right.

The tool will let you combine multiple segments into animations and export an animation as a js file that you can add to your own project.

The video below shows my first attempt at an UI using  PaperJS to implement the graphing and interaction.

CAD, templates and a couple of glamour shots

I’ve been working today on the design for Felix,  trying to tidy up the space for the electronics. The new body template is designed to fit an Arduino Uno board and an Adafruit 16×12 servo shield.
I’m trying to get up to speed with Autodesk Fusion 360. It’s great software, but to do this sort of stuff I keep coming back to OpenSCAD.

In order to get some “Fusion time”, I exported the template from OpenSCAD to STL format and uploaded it to Fusion 360. I also downloaded 3D models of an Arduino and a HiTech Servo from GrabCAD.com. Then I spend some time playing with the render:

FelixGlamourShotWhiteFelixGlamourShotTransp

You can grab the OpenSCAD files from the repo:
https://github.com/Traverso/JSFelix/tree/master/Hardware/CAD

and the DXF and SVG templates as well:
https://github.com/Traverso/JSFelix/tree/master/Hardware

I still need to add a license file to the repo, but it’s a regular MIT license.

And speaking of CAD, I recently wrote a post for Makezine: http://makezine.com/2015/04/20/understand-1700-mechanical-linkages-helpful-animations/. It’s a short highlight of Mr. Đức thắng Nguyễn’s YouTube Channel. The channel is an amazing collection of complex animated mechanism he has documented with Autodesk Inventor over the last 10 years.

Dashboard and GitHub Repo

Felix is a NodeBot (http://nodebots.io). A NodeBot is a JavaScript powered robot. One of the benefits of using JavaScript and Node, is that it makes it trivial to create a  web based dashboard for your project. My dashboard has a simple joystick that controls Felix using Socket.io.

You can see a clip of Felix and the dashboard here:

The code is now on GitHub: https://github.com/Traverso/JSFelix
I will add the template files for the design to the repository as well.

Working on the body design

Yesterday I spend sometime at my local #fablab  #fablabnordvest learning to know their Chinese Laser cutter. I used 4mm. white acrylic.

The design was made with #iDraw and exported to SVG (You can download the SVG here Body.svg). But my Chinese friend only speaks DXF or AI. After importing the converted AI file, I realised that I needed to do some cleanup of the path. Some of the patterns appeared twice(?).

Anyhow, it’s always mesmerising to watch a machine do it’s work.

After playing with the assembly, I want to redesign the way the lid is attached and I will like to make a   smaller version for 9g servos. Probably the easiest way to do this is to use OpenSCAD to create a parametric model with the size of the servos as a dynamic variable, and then create a projection which I can export to DXF.

TemplateB

Improved walk

Today i worked on a couple of things to improve Felix’s walk cycle.
I tweaked the servos offsets to get a more precise placement of the feet. I fixed Felix to the new stand and used a square ruler to get the alignment as god as possible.

Then base on the suggestion by one of the god people at http://letsmakerobots.com, Felix is now leaning to the opposite side of the leg being lifted for every step he takes.

Last but not least he got some socks to get better traction.

A stand for Felix

IMG_0688 IMG_0689

Today I made a stand for Felix. Like the rest of the parts this is designed as a “2 1/2 D” structure. It should be easy for everybody to cut the parts with at laser cutter, a desktop CNC or easily convert the design to something you can print on your 3D printer.
Or, you can just print it, glue it to plywood and cut it with a bandsaw or jigsaw.
I have used plywood and powertools until now, and done some small corrections with a knife and sanding.
Next week I plan to visit our local fablab (http://fablabnordvest.dk) and laser cut my templates on 4mm. acrylic. I’ll be able to test if everything fits “right out of the oven” or if the design needs some adjustments.  I’ll post the final templates as SVG.

First Steps

Working with nodebots/johnny-five has being a remarkably positive experience. Because you can expose your objects to the REPL, it’s a breeze to test/exersize your code without having to upload it to the Arduino every time. The iteration cycle between changes is much, much quicker than regular Arduino sketches and the cognitive dissonance between what I do during the day and in my freetime is non existing.

After implementing the simple trig IK function to control the position of the feet, I implemented two move sequences: “lift & place” and “drag”.

“Lift and place”, lifts the foot from the current position and place it at the requested x value (when the position of the hip is 0). “Drag”, well drags the foot along the ground from the current position to the required x position.

To implement a creeping gait I divide a step into 4 available positions. From position one to five we have a drag and from position four to one when have a lift and place.

Step

In this gait there is always only one foot in the air. The recipe look like this (the green dot represent the foot):

CreepingGait

As you can see from the video, Felix has a heavy limp. I’ll be working on the servo offsets so the small differences between the initial leg positions dont add up.

Next I’ll start playing with some sort of dashboard with AngularJS and sockets.io.

Build and test of the new design

Today I finished the new design for the body. I began to use iDraw for this project, and until now it has been a very positive aquaintance. I used to be a competent Illustrator user, but jumped of the Adobe wagon some years ago. iDraw fells very familiar and stay out off my way.

You can download the pattern here: FelixBodyPattern.svg

To test the dimensions and the range of movements, I cut the pieces from 4mm plywood using the pattern as a template, then put it all together using bolts and washers.The servos are fastened with 3mm. bolts and the knee with 2mm. Below you can se af video of the assembly process.