{"id":16241361,"url":"https://github.com/dtex/tharp","last_synced_at":"2025-03-19T16:31:48.036Z","repository":{"id":32944263,"uuid":"36540413","full_name":"dtex/tharp","owner":"dtex","description":"An inverse kinematics solver for robots, optimized for Johnny-Five.","archived":false,"fork":false,"pushed_at":"2015-12-07T04:27:41.000Z","size":1898,"stargazers_count":27,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-29T16:08:41.829Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dtex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-30T02:55:16.000Z","updated_at":"2023-10-19T20:59:12.000Z","dependencies_parsed_at":"2022-08-07T18:30:23.264Z","dependency_job_id":null,"html_url":"https://github.com/dtex/tharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtex%2Ftharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtex%2Ftharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtex%2Ftharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtex%2Ftharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtex","download_url":"https://codeload.github.com/dtex/tharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006277,"owners_count":20382444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T14:07:20.935Z","updated_at":"2025-03-19T16:31:47.597Z","avatar_url":"https://github.com/dtex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tharp\n\n![Dancing Robots](https://raw.githubusercontent.com/dtex/tharp/master/assets/tharp-banner-color.png)\n\n[![Join the chat at https://gitter.im/dtex/tharp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dtex/tharp?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Build Status](https://travis-ci.org/dtex/tharp.svg)](https://travis-ci.org/dtex/tharp)\n\nTharp is an inverse kinematics solver and robot manager designed to work with Johnny-Five. It makes the hard things easy. Check out this [video](http://www.youtube.com/watch?v=gabm8QdO29Q) highlighting Tharp's  performance.\n\n\n### Installation\n````bash\nnpm install tharp\n````\n\n### Documentation\nTharp documentation can be found in the [wiki](https://github.com/dtex/tharp/wiki).\n\n### Example\n````js\n// This is a simple excerpt, illustrating the configuration\n// of robot with two legs\nvar five = require(\"johnny-five\"),\n  tharp = require(\"tharp\");\n\nvar board = new five.Board().on(\"ready\", function() {\n\n  /* === Begin robot configuration === */\n\n  // Tharp.Chain() wraps our actuators and adds properties\n  // that define the kinematic system. The \"chainType\" property defines\n  // the joint/link configuration.\n  var leftLeg = new tharp.Chain({\n    constructor: five.Servos,\n    chainType: \"ZYY\",\n    origin: [4.25, 0.15, 2.875],\n    links: [ 2.6, 7.6125, 10.4],\n    actuators: [\n      {pin:40, offset: 24, startAt: 0, range: [0, 90] },\n      {pin:39, offset: 87, startAt: 78, range: [-80, 78] },\n      {pin:38, offset: 165, invert: true, startAt: -140, range: [-160, -10] }\n    ]\n  });\n\n  var rightLeg = new tharp.Chain({\n    constructor: five.Servos,\n    chainType: \"ZYY\",\n    origin: [-4.25, 0.15, 2.875],\n    links: [ 2.6, 7.6125, 10.4],\n    actuators: [\n      {pin:27, offset: -31, startAt: 180, range: [90, 180] },\n      {pin:26, offset: -77, startAt: 102, range: [110, 260] },\n      {pin:25, offset: -176, invert: true, startAt: 320, range: [180, 340]}\n    ]\n  });\n\n  // Robot() wraps our chains, gives us a place to orient the\n  // robot chassis and ensures that all chains can be rendered\n  // before rendering the entire robot movement\n  var robot = new tharp.Robot({\n    chains: [rightLeg, leftLeg]\n  });\n\n  /* === End robot configuration === */\n\n  // Now we can orient the chassis\n  robot.orientation({ pitch: 0.1, roll: -0.08, yaw: -0.13 });\n  robot.offset([ 1, -1, -0.2 ]);\n\n  // And position our end effectors\n  rightLegChain.solve({position: [8.25, 2.5, -5.0]});\n  leftLegChain.solve({position: [-8.25, -2.25, -5.0]});\n\n  // Move everything\n  robot.render();\n\n});\n\n````\n### Breaking Changes\n* 1.0.0 Swapped Y and Z axes to better match best practices. Renamed \"CoxaY-FemurZ-TibiaZ\" chain type to \"ZYY\".\n* 2.0.0 Changes ```segments``` to an array since part names are arbitrary. One person's \"coxa\" is another person's \"hip\" and then another person's \"shoulder\".\n* 3.0.0 Changes ```segments``` to ```links``` to reflect the proper name.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtex%2Ftharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtex%2Ftharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtex%2Ftharp/lists"}