This will introduce some major classes which hold data used by IKBT solver nodes/leaves. These are collected and posted onto the BT blackboard for visibility to the leaves.
The classes will be described in a bottom up manner from lowest level to highest level. Only the most important or most widely used members of each class will be described here.
File: ikbtbasics/kin_cl.py
This class represents each unknown which must be solved for.
Highlights:
symbol # sympy variable
name # string name
eqnlist # list of kequations containing this unknown
eqntosolve # kequation to solve for this unknown
readytosolve # True/False
solved # True/False
solutions # list of solutions for this unk.
solutionNames # list of names e.g. th_5s1
dependencies # set() of solved unks upon which this unk's solution depends.
versionNames # list of versions e.g. th_5v3
LHSversionNames # sympy var's for the version names
# methods
details() # print summary of this unk.
set_solved(R,unknowns) # once a solver has cracked this unknown call this
# creates solutionNames, dependencies, VersionNames etc.
File: 'ikbtbasics/kin_cl.py`
This represents a single kinematic equation having a left hand and right hand side.
Highlights:
LHS # a sympy expression for left hand side
RHS # " " right hand side
#methods
LaTexOutput() # return latex string for a kequation (option: align)
File: ikbtbasics/kin_cl.py
An equation in which each side is a 4x4 matrix.
Highlights:
Td # the left hand side: desired end effector configuration (known)
Ts # the right hand side: symbolic FK equations containing unknowns
File: ikbtbasics/kin_cl.py
Kinematic parameters and methods for a serial-chain mechanism.
Highlights:
DH # the (modified/Craig style) Denavit Hartenburg Parameter Table (must have 6 rows)
vv # variables vector (1 = rotary joint, 0 = prismatic joint)
params # constant parameters (e.g. l_2, d_1)
jlims # joint limits
# methods
forward_kinematics() # compute the fk equations
get_mequation_set() # derives mequations transformed into each link frame
scan_for_equations() # get unsolved kequations from lists of matrix_equations and auxiliary
scan_Mequation() # get list of kequations from a matrix_equation
sum_of_angle_transform() # identify and convert SOA terms in the mechanism
Notes:
DH, vv, params, jlimsshould be set inikbtfunctions/ik_robots.py
File: ikbtbasics/ik_classes.py
Highest level class to represent a target robot for IK solution.
Highlights:
solutionSet # each solution version is a tuple of unknown versions (its a set!)
solListMatrix # rows: valid solution combinations, cols: unknown versions
FinalEqnMatrix # generate a kequation for each entry in solListMatrix
mequation_list[] # all 4x4 matrix FK equations (generated by get_mequation_set()?)
kequation_aux_list[] # SOA definitions eg: th_23 = th_2 + th_3
SOA_eqns # a single matrix_equation containing up to 16 SOA equations
Mech # the mechanism of the Robot
# methods
scan_for_equations() # get unsolved equations having 1 or 2 unks.
sum_of_angles_transform() # identify sum of angles terms and create new variable and eqn
create_solution_set() # create solutionSet and solListMatrix after completion
make_LHS_versions() # create FinalEqnMatrix