-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Tharp is an inverse kinematics solver and robot controller for Johnny-Five. Tharp makes hard things easy.
To get enjoyment out of Tharp you should be comfortable with Javascript, node.js, npm, and johnny-five. You do not need to know much about robotics, robot gaits, linear algebra or trigonometry unless you will be adding your own chain types or robots.
- Assemble your robot
- Set your servo ranges
- Align and limit your actuators
- Define your chains
- Define your robot
You are now at the point where you can pass in an array of positions to Robot["@@render"] and Tharp will position them. Don't feel like writing your own code to determine positions? Johnny-Five can help with that.
- Working with Johnny-Five's Animation() class.
- Building a simple sequence
- Building a walk sequence
- Building a turn sequence
You should now be able to create your animation sequences and control your robot. Don't feel like creating your own animation sequences? Check the list of predefined robot control programs below. If your robot is not listed, I'm happy to add it but I need hardware so that would have to be worked out.
Lynxmotion Phoenix |
A Tharp chain will Wrap the actuators so that we have all the info and methods we need to define and solve for a single kinematic chain. More info
A Tharp Robot() will group chains, giving you a single object for managing the robot's orientation and making sure that all required chains can be solved before rendering the movement. More info
Converts radians to degrees
Converts degrees to radians
Given three sides this will solve a triangle using law of cosines
- @param {Number} a: An adjacent side's length
- @param {Number} b: The other adjacent side's length
- @param {Number} c: The opposite side's length
Returns the angle in radians
Given an angle in radians and a range in degrees this will find the correct quadrant for the servo given the range/angle.
Returns the angle in degrees unless no solution can be found. In which case an error is returned.