Skip to content
Projets

gkjohnson/closed-chain-ik-js

Voir sur GitHub

À propos

A generalized inverse kinematics solver that supports closed chains for parallel kinematics systems, dynamic reconfiguration, and arbitrary joint configuration based on damped least squares error minimization techniques

Design et médias

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
+2
in 1 month
+5

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Closed Chain Inverse Kinematics

build docs github twitter sponsors

A generalized inverse kinematics solver that supports closed chains for parallel kinematics systems, dynamic reconfiguration, and arbitrary joint configuration based on damped least squares error minimization techniques. Supports all variety of joints including combinations of rotation and translation degrees of freedom and is agnostic to visualization framework. Inspired by Marty Vona's MSim research work and using techniques outlined in this 2009 paper by Samuel Buss. Developed with some aid and advice from Marty Vona.

Solver being used on JPL's ATHLETE robot for full body IK

Examples

Hexapod demo

ATHLETE and Robonaut demo

Rover mobility settling demo

VR demo

Partial degrees of freedom Goal demo

Model License Information

Robitics models used in the project are for demonstration purposes only and subject to the licenses of their respective projects.

ATHLETE

Robonaut

Curiosity

Perseverance

Staubli

PI Hexapod

Digit

Spot

Installation

npm install github:@gkjohnson/closed-chain-ik-js

Use

Entry Points

See the docs site for full API documentation. The same documentation is also available as markdown, linked below.

Entry point Contents Reference
closed-chain-ik The core and three.js entry points together. Requires three and urdf-loader. core · three
closed-chain-ik/core The solver, frames, and IKUtils. Has no three.js dependency. API Reference
closed-chain-ik/three IKRootsHelper and URDFUtils for use with three.js and urdf-loader. API Reference
closed-chain-ik/worker WorkerSolver. Not included in the root entry point. API Reference

Simple 2 DoF System

import { Solver, Joint, Link, Goal, DOF } from 'closed-chain-ik';

// Create links and joints
const link1 = new Link();

const joint1 = new Joint();
joint.setDoF( DOF.EZ );
joint.setPosition( 0, 1, 0 );
joint.setDoFValues( Math.PI / 4 );

const link2 = new Link();

const joint2 = new Joint();
joint.setDoF( DOF.EX );
joint.setPosition( 0, 1, 0 );
joint.setDoFValues( Math.PI / 4 );

const link3 = new Link();
link3.setPosition( 0, 1, 0 );

// Create the goal
const goal = new Goal();
link3.getWorldPosition( goal.position );
link3.getWorldQuaternion( goal.quaternion );

// Create structure
link1.addChild( joint1 );
joint1.addChild( link2 );
link2.addChild( joint2 );
joint2.addChild( link3 );

goal.makeClosure( link3 );

// create solver
const solver = new Solver( link1 );

// ...

// move the goal around and solve
goal.setPosition( 1, 2, 3 );
solver.solve();

Using a WebWorker Solver

import { Joint, Link, Goal, DOF } from 'closed-chain-ik';
import { WorkerSolver } from 'closed-chain-ik/worker';

// ... instantiate kinematic system...

const solver = new WorkerSolver( link1 );

// ...

// move the goal around and solve asynchronously
solver.solve();

Caveats

  • The web worker implementation uses ShareArrayBuffers which are not available on some platforms (Safari, Chrome for Android). See issue #44.

  • Enabling SVD on the Solver adds damping in near singular directions but is several times slower than the default solve.

Explorer des projets similaires

Chargement…