How to draw a rectangle in Gcode

So you’ve played with the Makelangelo‘s generated Gcode and now you want to experiment on your own. Cool! Here’s a simple rectangle to get you started.

Now let’s give some values to these parameters:


My method is to lift the pen, drive to a corner, put the pen down, and then trace the rectangle. That means going to five points because we have to come back to the start.

G0 Z90; # pen up
G0 X-10 Y20;  # p1 
G0 Z40; # pen down 
G0 X30 Y20;  # p2
G0 X30 Y-40;  # p3 
G0 X-10 Y-40;  # p4 
G0 X-10 Y20;  # p1 again
G0 Z90; # pen up

And voila! I’ve deliberately done this with the origin away from the center so the numbers are more obvious. I hope you see that in a cartesian system the origin could be anywhere. For example, if it were below and to the left of P4 all the X and Y values would be positive.


Sixi Calibration Tool

The Sixi Calibration Tool helps anyone using a Sixi robot make sure that the robot’s mental and physical states match.

They have to match or else.

If they do not match then the move you expect is not the move you will get. This could very quickly lead to an accident.

Ok, what do we do about it?

There has to be a way to synchronize the mental model and the physical model. The calibration tool is made to fit in one place and attach to the arm in only one way. This forces all the robot joints to move to known angles. Those angles are measured in the mental model in Robot Overlord and then copied to the physical model in the robot’s brain.

Sixi robot joint angles at calibration

JointAngle (degrees)
0 (x)0.0
1 (y)-41.3
2 (z)74.5
3 (u)0.0
4 (v)-33.5
5 (w)0.0
News Robot Arm

Sixi robot ROS package

Sixi robot now has a URDF description and can be found on the ROS wiki.

ROS (Robot Operating System) was first developed by Willow Garage, a Boston robotics company. Though Willow Garage no longer exists, the ROS has been so successful that it has outlived its creator.

Since ROS is such a popular tool, I hired sachinkumar1235 on Fiverr who built the URDF package. It includes decimated STL files created by Andre.

You can now find Sixi robot on the ROS wiki, or grab the package directly from the Sixi robot github project.