Phylliade / ikpy

IKPy, an Universal Inverse Kinematics library
http://phylliade.github.io/ikpy
Apache License 2.0
734 stars 153 forks source link

Question - Generating Links from World Points #67

Closed chitalian closed 4 years ago

chitalian commented 4 years ago

Hi, I am pretty new to this all. But I was wondering if someone could help me. I have a set of world coords for different joints and I have been trying to build chains for these points however I am having trouble figuring it out.

Here is an example:

{
'left_leg': ([-23.4254, -23.5361, -23.9642], # X-points
              [-4.2424, -4.2233, -4.3618], # Y-Points
              [1.0065, 0.5614, 0.6598]), # Z-Points
}

Where we would have three joints all connect like this

joint_0 = (-23.0585, -4.3753, 0.208) joint_1 = (-23.0799, -4.3955, 0.6677) joint_2 = (-23.3939, -4.4256, 1.0013)

The end goal is to simulate a human's leg and solve for toe position.

Thanks for your help in advance!

Phylliade commented 4 years ago

Hello @chitalian,

If you want to create a chain by yourself, you need to create the chain from a list of Link.

This Link must return a transformation matrix (see : https://github.com/Phylliade/ikpy/blob/master/src/ikpy/link.py#L13).

Your transformation matrix is a homogeneous coordinate matrix representing your joint transformation. In the case of a leg, you can use the axis_tranformation_matrix from https://github.com/Phylliade/ikpy/blob/master/src/ikpy/geometry_utils.py#L61.

In order to get started you can also have a look at already-existing human models, in URDF. For example: https://github.com/baxter-flowers/human_moveit_config/blob/master/urdf/xacro/human_leg.urdf.xacro

stale[bot] commented 4 years 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.