Skip to content

Commit aa5dbf7

Browse files
author
Ross Hatton
committed
Improved handling of symbolic variables in kinematics and N_link_chain code
1 parent f80c574 commit aa5dbf7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ProgramFiles/Geometry/NLinkChain/N_link_chain.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@
209209
joints_m(:,:,idx-1) * ... % Rotate by the angle of the previous joint
210210
links_m(:,:,idx)^2; % Move along the link twice (because our transforms are half-links)
211211

212+
% Simplify trigonometric expressions if this is being calculated
213+
% symbolically
214+
if isa(chain_m,'sym')
215+
jointchain_m(:,:,idx) = simplify(jointchain_m(:,:,idx),'steps',10);
216+
end
217+
212218
end
213219

214220

0 commit comments

Comments
 (0)