Close

Simulation, IK controller and fixing a 270° mistake

A project log for RoboArm: Yet Another 3D-Printed Manipulator

DIY 3D-printed manipulator from off-the-shelf parts and random steppers, ESP32-based control with a simple API over USB, Bluetooth and WiFi.

stanislav-britanishskiiStanislav Britanishskii 01/27/2026 at 20:460 Comments

Since the last couple of logs quite a lot changed on the “brains” side of RoboArm, so here’s a quick recap up to today (27.01.2026).

A bit over two weeks ago I printed and assembled a much more solid base for the arm. I definitely overused plastic, but at least now it doesn’t feel like it will fold in half when the shoulder moves. Around the same time I set up a PyBullet simulation of the arm, so I could test motion control without abusing the real servos on every experiment. Not all joints behaved exactly as expected in simulation at first, but it was good enough to start playing with kinematics.

About a week ago I implemented the first operational inverse kinematics controller. The control flow looks like this:

In simulation this worked more or less fine. There were some constant offsets, but the motion itself looked sane. On the real arm, though, it was a different story:

At first that looked like a classic “servos are weak / gravity wins” situation, but the behavior was wrong even without heavy load, so something else was off.

Today I finally found one major culprit: the bottom joint servo actually has 270° of travel, and I was treating it as a “normal” 180° servo in my angle mapping. That meant the controller and the hardware completely disagreed on what any given angle meant, which showed up as those weird position offsets when moving the hand forwards/backwards.

After fixing the mapping for that servo, the situation improved a lot. The big crazy offset when reaching forward is gone, and the arm now follows the commanded positions in a way that at least looks physically reasonable. It’s still not perfect – there is some distance between desired coordinates and where the gripper actually ends up – but now it’s in a range where tuning, better offsets and maybe some calibration should be enough.

I also changed the elbow joint limits so it can bend up to about 135° in one direction and only 45° in the other. This technically reduces the total reachable volume, but it makes the useful working area on one side of the arm much bigger, which fits the setups I have in mind for real tasks later.

The video below shows the current state as of today: RoboArm moving under IK control, driven from the joystick interface, with the base angle finally behaving as expected instead of fighting the math.

Discussions