forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdXtrans.m
28 lines (22 loc) · 773 Bytes
/
dXtrans.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function dX = dXtrans( r )
% derivative of featherstone's Xtrans function
dXr1 = [0 0 0 0 0 0 ;
0 0 0 0 0 0 ;
0 0 0 0 0 0 ;
0 0 0 0 0 0 ;
0 0 1 0 0 0 ;
0 -1 0 0 0 0 ];
dXr2 = [0 0 0 0 0 0 ;
0 0 0 0 0 0 ;
0 0 0 0 0 0 ;
0 0 -1 0 0 0 ;
0 0 0 0 0 0 ;
1 0 0 0 0 0 ];
dXr3 = [0 0 0 0 0 0 ;
0 0 0 0 0 0 ;
0 0 0 0 0 0 ;
0 1 0 0 0 0 ;
-1 0 0 0 0 0 ;
0 0 0 0 0 0 ];
dX = reshape([dXr1 dXr2 dXr3],36,3);
end