Projects
All projects

Robotic arm.

Twinkle twinkle *whirring gears* little star

  • MATLAB
  • Python
  • Unity

The Arm

Loading Model... 0%

The openManipulator-X is a robotic arm created by Robotis with five servo motors for four degrees of freedom — which is just enough freedom to get into trouble.

I had the pleasure (and mild financial anxiety) of working with this surprisingly expensive piece of kit as part of my Robotic Manipulation coursework. Many long nights were spent carefully programming it to perform delicate tasks such as opening a beer bottle.

This turned out to be much harder than it sounds, mostly because robots have absolutely no concept of “gentle.”

Modelling the arm

We started by implementing forward and inverse kinematics in MATLAB to simulate the arm’s movements and calculate where the end effector should end up, in theory.

Because some of the team had game development experience (and trust issues with theory alone), we also modelled the arm in Unity. This allowed us to simulate the arm, the cubes, and the environment before letting the real hardware loose—saving both time and servo motors.

Cube manipulation

The arm was programmed to move smoothly to a cube, grab it, rotate it, and stack it elsewhere.

The challenge wasn’t just can the arm reach the cube, but how it should do so. There are many ways to pick up a cube, and most of them look like the robot is having a minor panic attack especially when the arm had to be fully extended to reach a cube.

This stage pushed our kinematic model hard and forced us to think about efficiency, stability, and how not to knock everything over in one dramatic motion

Drawing smoothly

The arm is then programmed to draw on an acrylic board using a whiteboard marker. This introduced an entirely new problem: smooth motion.

Robotic arms do not care about smoothness when moving from point A to B. They think in terms of joint angles. When you ask the arm to move the pen tip in a straight line, what you’re really asking is for five different servo motors—each rotating at a different speed—to stay perfectly coordinated over time. If even one joint speeds up or slows down slightly, the pen no longer follows a straight line. Instead, you get jitter, wobble, or sharp corners where smooth curves were supposed to be.

We also designed and 3D-printed custom pen grippers using AutoCAD, because it turns out that “holding a pen” is a surprisingly advanced motor skill.

Playing music

Finally, we combined everything into a short musical performance: a robotic rendition of Twinkle Twinkle Little Star.

This stage introduced timing, which robots famously do not understand. Musical notes require precise coordination and constantly changing servo speeds.

Although the performance was short, an unreasonable amount of time was spent tuning things so the arm didn’t rush, lag, or violently attack the instrument. And, of course, to perform the bow at the end to the rapturous applause of the humans

Robots, like musicians, improve significantly with practice—and patience from nearby humans.

My thoughts

This project was really fun and challenging, and it gave me a genuine appreciation for how difficult robotic manipulation really is. As a side effect, I now have immense respect for robotic bartenders — because calmly handing someone a glass without shattering it or launching it at their face is nothing short of an engineering miracle.

Oh and now I also really want a robotic arm to hold my coffee cup.