computeGradient
if you would like to have it compute the analytical gradient (is not accurate nor fast, but the foundation is there)%Was not able to optimize using this code eq_violations(1) = (tree2.j(17).position - [-0.0484 -0.0890 0.0811])*(tree2.j(17).position - [-0.0484 -0.0890 0.0811])'; %But it worked just fine with this code eq_violations(1:3) = (tree2.j(17).position - [-0.0484 -0.0890 0.0811]);
score = (tree1.j(29).position - target)*(tree1.j(29).position - target)';
angles(i)
instead of a numerical angle. See below inside of drc_forward_kinematics_symbolic.m:angles = sym('angles',[29,1]); for i = 2:29 parent = tree.l(i).parent; tree.j(i).rotation = generate_axis_angle_rotation_matrix_symbolic( tree.j(i).axis, angles(i) ); . . .