Skip to content

Instantly share code, notes, and snippets.

@traversaro
Last active December 24, 2015 23:29
Show Gist options
  • Save traversaro/6880561 to your computer and use it in GitHub Desktop.
Save traversaro/6880561 to your computer and use it in GitHub Desktop.
Generate glue code between KDL::CoDyCo/dirl and SYMORO
par_string = {0:'M', 1 : 'MX', 2 : 'MY', 3 : 'MZ', 4 : 'XX', 5: 'XY', 6: 'XZ', 7: 'YY', 8: 'YZ', 9: 'ZZ'};
for row in range(0,6):
for col in range(10,70):
link = col%10;
if( link < row+1 ):
print "double DG"+str(row+1)+par_string[col%10]+str(col/10) + " = 0;" ;
for row in range(0,6):
for col in range(10,70):
link = col%10;
jnt = row+1;
print "dynamics_regressor("+str(row) + "," + str(col) + ") = DG"+str(row+1)+par_string[col%10]+str(col/10)+";" ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment