Robotics 'physics'


https://www.youtube.com/watch?v=xmo_5e4CSOo

Hi,

I am currently working on a project where i want to import and control a robotic model. In the project i am strugling with the physics part and doubt if it is possible what i intend to achieve.

This robot (youtube link and attached picture) is controlled bij 3 separate rotating motors. the combined movement of these motors are controlling the end-effector in the bottom of the robot. Because the whole system is connected by balljoints, this is what is happening in ‘real life’ :slight_smile: .

Controlling the 3 rotating axis by itselve is not the issue. But then, i got stuck when implementing the physings part, so that the model is actually ‘connected’. I tried playing around with physics engines like CANNON and AMMO, but at this point i don’t think this is the right way to go.

Any ideas or pointers in the right direction would be appreciated!!

thanks!

Maybe these examples will help you :thinking:

From the Collection of examples from discourse.threejs.org :

RobotSimulation
UpdateObjectPositioning
DynamicTubeGeometryCaps
Pino
CustomCylinderAndKnee
CustomCylinderAndSphereKnee

2021 eXtended eXamples see ModelAnimation - @author LA21 + Mugen87

Just thought about it once more (as I deleted my previous answer) for one sec, and it came to me - still a geometric solution:

There is a circle, with center the upper black-white joint and its axis, and radius equal to the distance from that joint to the white lever’s axis.

And there is a sphere, with center the plate’s joint and radius the length of a black arm.
It has to be a sphere instead of a circle, because the black arm also has lateral movement allowed by its balled-shaped joints when the bottom plate is pushed or pulled by the other two black pairs.

So there are 6 circles and 6 spheres. You need their intersections that will define the intermediate joint coordinates.

First move the bottom plate wherever you want inside a 3d area limited by the levers and joints, then calculate the intersection between each circle-sphere pair and choose the lower intersection points (where you’ll put the other end of the white and black arms), convert to coordinates and you’re done.

Hi,

Your help is much appreciated!

Because of your first post i actually started by solving this without physics engines.
I started playing around it with three js vector calculations. I got this far but got stuck at the following state:


My plan was to find the point where all the lines in the triangle intersect. then draw a vector down under a 90 degree angle to the triangle plane. I haven’t figure out yet how to calculate where the lines in the triangle intersect though.

Then i found this article:

I guess he does something similar to what you are explaning with the spheres. Unfortunatly i am not familiar with this type of math problems. If you know any articles where i can ready up on this, it would certainly help.

thanks again

You could try the gkjohnson library for using généric IK solver with plain JS (github).

If you want to work with thousands of targets, I would recommand to use an exact solver (fast), using closed-form équations (ex opw kin lib, for spherical wrist robots) or DH equations.