Wednesday, August 22, 2018

3D Printing a Roblox Character in Full Color with Shapeways

If your kids loves Roblox, they will be very excited for you to 3D color print their Roblox character!

First, download and run Roblox Studio.  You can work with a basic "Baseplate" template:



Next, hit "Play":



And your character will appear.  Select your character on the explorer (I've grayed out the name):



And open up the "Properties" list:



Make sure your character is "Archivable":



Now under the Workspace tab (not the Players tab!), right click on your character and "Copy":



Stop the game:



Now right click select the Workspace and "Paste Into":



Now you have a copy of the character in the Workspace.  Select the character, and right click to "Export Selection":



Congratulations, you've just exported the 3D OBJ file mesh with textures!



Load the OBJ file into Meshlab.  It automatically will load up the texture files as well.  Your character needs to be scaled for proper print size.  For Shapeways full-color sandstone, I find the character needs to be scaled up by 10-20 x for 3-5 inches tall to be "the right size".   In Meshlab that is Filter/Normals, Curvature and Orientation/Transform, Scale, Normalize:



To work with Shapeways in full-color, export from Meshlab as "Collada File Format", i.e. ".dae".   ZIP the DAE file and all the PNG texture files together.  Then upload the zip file to Shapeways.  Select Sandstone / Full-Color to print in color:



Watch out, Shapeways gets really expensive with the size of the character because you are being charged on volume (scales by a cubic function!).  A 3 inch character is around $50, a 5 inch character is around $100.

It is possible that your character may be rejected for printing due to thin walls or other Shapeways printing restrictions.  Fixing that is going to be a topic of another post!

If you have a 3D printer at home, you can of course export an STL file from Meshlab, import into your slicer, and then just print a cheap monochrome version.

Good luck!

Thursday, July 19, 2018

3D Printer CAD Workflow for Mermaid

My daughter wanted me to make a mermaid:



This required some "organic" curved shapes.  I've found that SolidWorks Apps for Kids is a great way to make those kinds of shapes:



But since you can't import anything into SWAFK, I exported the STL, and loaded it into TinkerCad to add a head I found on Thingiverse:



Export to STL again, sliced in Cura to gcode, then printed on my Monoprice MP Select Mini V2:




Tuesday, November 14, 2017

FABRIK Inverse Kinematics in 3D with AL5D Arm

FABRIK with Caliko works great for inverse kinematics in 3D as well!  It took me a long time to determine the proper constraint on the first bone (a pan table) to rotate only.  Not sure if I did it the "correct way", but it works anyhow.

I cannot recommend trying the Caliko visualization with GLFW unless you are a GLFW expert.  I spent a long time trying to get it to compile on Eclipse and run without any success.  Lots of combinations of OpenGL and GFLW and Java that can go wrong.   Thus I gave up and used Caliko to output the arm positions in text for input into good old Python with matplotlib.

I'll note that I am modeling my AL5D arm without the wrist & gripper connection.  This is because for my use case of playing chess, I want the wrist to always point down, and I've added some tongs to the gripper to reach between the chess pieces to grab them from above without knocking down other chess pieces.  So I am only modeling the pan base and the first two hinged "bones" and looking at a target that is 140mm above the chess board.

Here are some results of the IK calculations with FABRIK via Caliko.  Note that even in the last case where the arm cannot reach the target, it at least "reaches out towards it", which is better than the algorithm crashing or returning NaN...






Here is the Caliko code:


And here is the Python plotting code:

Wednesday, November 08, 2017

Trying Caliko FABRIK Inverse Kinematics in 2D

I downloaded Caliko, the FABRIK inverse kinematic solver in Java.  It has great documentation, along with guidance about how to properly use its jars as libraries in Eclipse (I don't do much Java, glad they mentioned that).  The Javadocs for Caliko is excellent, so I took one of their examples, removed the visualization and added information about the location of bones in the chain and the angles between them:


Here is an example solution output:

Because I don't have a good OpenGL working right now, I just took the data from the chain and plotted it in Excel.  Here are some examples - the red dot is the target:



ikpy - Inverse Inematics, yes. Limits, no!

The Python inverse kinematics library, ikpy, works fine, and it has a cool mechanism to plot chain visualization from Python using matplotlib.pyplot.  EXCEPT ikpy seems to have no concept of collision areas or joint limits.

I found this out by putting in my Lynxmotion AL5D robot arm model as URDF, and loading into ikpy.   Works fine for a target at [17,3,3] (cm):


However if I have a target at [20,3,3], it drives the arm through the table (i.e. Z=0):

If you'd like to see the URDF and IK calculation code, it is here.

So I recommend ikpy for unconstrained 3D modeling, but lacks practicality for me!

So next step, I am going to try Caliko with its FABRIK IK solver in Java.

Sunday, November 05, 2017

Inverse Kinematics Take 2

The current inverse kinematics code I have for my Lynxmotion AL5D arm fails to converge towards the edges of the chess board.

One efficient way to solve IK is the FABRIK algorithm.

There is a Python inverse kinematics library, ikpy.  It needs a Unified Robot Description Format (URDF) file to describe the arm though.

Also there is a Java FABRIK:


Friday, November 03, 2017

New Affordable Bus Robotic Servos from LewanSoul

No idea as to the actual quality of these, but LewanSoul now has the LX-16A 17 kg·cm (236 oz·in) @7.4V robotic servo controlled over a bus (perhaps with the same command structure as a Dynamixel) with position/voltage/temperature feedback for only $15.99.




LewanSould also has what appears to be a fairly well-built, if not particularly long reach, 6DOF arm for $119.99 with servos (not the digital bus servos above, though).  This will definitely give the Lynxmotion Arms some serious competition.