-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathrotationalPID_velocity.m
29 lines (26 loc) · 1.13 KB
/
rotationalPID_velocity.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
29
function w_omega = rotationalPID_velocity(w_R_b,w_R_b_des,w_omega_des,Kp)
% ROTATIONALPID_VELOCITY implements a controller trajectory tracking inside
% the group SO(3). The angular velocity is assumed
% to be a control input.
%
% FORMAT: w_omega = rotationalPID_velocity(w_R_b,w_R_b_des,w_omega_des,Kp)
%
% INPUT: - w_R_b = [3 * 3] rotation matrix
% - w_R_b_des = [3 * 3] desired rotation matrix
% - w_omega = [3 * 1] angular velocity (expressed in the world frame)
% - w_omega_des = [3 * 1] desired angular velocity (expressed in the world frame)
% - Kp = [3 * 3] orientation gains
%
% OUTPUT: - w_omega = [3 * 1] input angular velocity
%
% Authors: Daniele Pucci, Marie Charbonneau, Gabriele Nava
%
% all authors are with the Italian Istitute of Technology (IIT)
% email: [email protected]
%
% Genoa, Dec 2017
%
%% --- Initialization ---
skv = wbc.skewVee(w_R_b*transpose(w_R_b_des));
w_omega = w_omega_des -Kp*skv;
end