Phylliade / ikpy

An Inverse Kinematics library aiming performance and modularity
http://phylliade.github.io/ikpy
Apache License 2.0
694 stars 151 forks source link

Supporting ik interpolation between two positions #129

Open DoWhileGeek opened 1 year ago

DoWhileGeek commented 1 year ago

First off, this project is fantastic, it seriously helps with DIY arm development! I'm mostly asking if this is something within the purview of this library, but how do y'all feel about supporting interpolated values between two points, your current, and target position? I'm working on a pick and place (of a sort) robot, and a large part of the job is picking up items from one or several places, and placing it into a narrow, deep container. I know fora fact when I first got my homemade ik model off the ground, the arm would like, "swing" into position, and the only way around it was instead of one movement, many shorter segments of movements that shortened the amount the arm could "swing" (I'm sure theres a technical term I'm butchering, sorry).

I'm imagining an option in inverse_kinematics() that takes some sort of a parameter for tokenizing the movement into a list of movements. Maybe the value is a numSegments integer, or the default length unit, like millimeters per segment. Taking the concept to the nth degree so it doesnt feel like for loop syntactic sugar, I'm envisioning that target could be a list of values, so the model could be animated at a higher level, maybe even supporting velocity suggestions calculations given a max velocity value, maybe even per axis?

If thats outside of this libraries mission, I totally get it, just wanted to know if you guys were open to those sort of features as pull requests.

Phylliade commented 1 year ago

Hello @DoWhileGeek !

Actually that's a very interesting feature, and certainly to be added in IKPy!

A few quick thoughts:

What are your thoughts on this?

Especially, how would you define your trajectory in your use case?

DoWhileGeek commented 1 year ago

Sorry, accidental click on the close button. Let me think on this a bit before I respond, but those are super valid points.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.