I’m building a small SCARA arm simulation to explore how robot commands map to joint motion.
The scene uses Three.js for rendering and inverse kinematics for XY movement. A command interpreter runs moves in sequence while CodeMirror highlights the current line. The simulation uses a fixed timestep, separate from rendering and playback speed.
Blocks now use cannon-es for collisions, friction, rotation and stacking. Pickup remains a simplified attachment. The arm links and gripper fingers have no collision bodies, so this is still a learning simulation rather than a physical robot controller.
The exercises cover picking, placing, stacking and rebuilding a tower. Feedback on the motion model and the progression between exercises would be useful.
Running example | Source and tests
This recording shows the earlier pick-and-place version:
1 Like
Pretty slick. 
Took a bit to get into it, but then had fun doing the first 2 puzzles.
Main feedback would be.. I would like a 2x or 5x speed mode, so I could iterate faster. I’d like clicking on the grid to show the grid coordinate… or, allow clicking on the joints, to manually control the bot to do the positioning…
I’d like a little more fanfare on completion.. just general sounds would be nice.. like a whirr and clank on gripper hit/miss…
And then maybe more intermediate example missions before the final “write the whole thing from scratch” version.. stacking blocks.. etc.
Forgive me if I’ve overlooked anything that might already be there. 
Over all I had fun! Cool stuff! Seems like this would/could be used to generate some kind of training data…
(disclosure: I made my own robot arm sim a while back: R(01)BOT ARM SIM
(left/right click on the joints to change their angles))
Thanks, manthrax. I added 1x, 2x and 5x playback, coordinate picking on the grid and blocks, and an Insert move button. The sound option adds motor, grasp, release and completion cues; it is muted by default.
Your point about the difficulty jump helped. The exercises now introduce gentle placement, a two-block stack and a three-block tower before an unstack-and-rebuild task.
To answer your physics question: blocks now use cannon-es for contact, friction and tumbling. Pickup is still a simplified attachment, and the arm links and gripper fingers have no collision bodies. Block stacking works, but the arm itself cannot collide with obstacles yet.
1 Like
Nice! Ya worked well. Now it needs more challenges 
Is it a real rigidbody simulator so you could do block stacking?
or avoiding other blocks during the move etc.
Maybe final challenge could be some kind of jenga thing 
Thanks again, manthrax! Your suggestions helped shape the new stacking missions. Blocks can now tumble and topple, though the arm itself doesn’t have collision detection yet. If you try them, I’d love to hear how the difficulty feels—and whether a Jenga-style challenge would be a useful next step.