Skip to content

Commit

Permalink
eular lagrange matrix form
Browse files Browse the repository at this point in the history
  • Loading branch information
prabinrath committed Mar 19, 2022
1 parent 25279e7 commit e5c33b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Binary file modified Legged Robotics/2D-Projectile/projectile_dynamics_symbolic.mlx
Binary file not shown.
8 changes: 8 additions & 0 deletions Legged Robotics/eular_lagrange2.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function qdd = eular_lagrange2(L,q,qd,F)
syms acc [1 length(q)];
dL_dqd = gradient(L,qd);
dL_dqd_dt = jacobian(dL_dqd,[q qd])*transpose([qd acc]);
dL_dq = gradient(L,q);
eom = dL_dqd_dt - dL_dq - transpose(F);
qdd = cell2sym(struct2cell(solve(eom,acc)));
end

0 comments on commit e5c33b3

Please sign in to comment.