# kinematics **Repository Path**: splendid1020/kinematics ## Basic Information - **Project Name**: kinematics - **Description**: JavaScript 6DOF robot kinematics library - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2019-06-07 - **Last Updated**: 2022-08-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # kinematics.js [](https://raw.githubusercontent.com/glumb/kinematics/master/LICENSE.md) [](https://travis-ci.org/glumb/kinematics) [](https://www.npmjs.com/package/kinematics) [](https://codecov.io/github/glumb/kinematics) 6DOF robot kinematics in JavaScript. ## Install ```console npm install kinematics --save ``` ## Use ```js const Kinematics = require('kinematics').default const geometry = [ [1, 1, 0], // V0: 1x 1y [0, 10, 0], // V1: 10y [5, 0, 0], // V2: 5x [3, 0, 0], // V3: 3x [0, -3, 0], // V4: -3y ] const RobotKin = new Kinematics(geometry) let angles = [1.57, 1.2, 0, 0.3, 2.2, 1.1] const pose = RobotKin.forward(...angles)[5] angles = RobotKin.inverse(...pose) ``` ## Geometry The geometry array consists of 5 entries describing the links *V0-V5*. Each *Vn* is a tuple of 3 coordinates from *Jn* to *Jn+1*. One constraint: The y,z of *V3* and x,z of *V4* must be 0 for the kinematics to work.