-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPose.m
29 lines (23 loc) · 864 Bytes
/
Pose.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
classdef Pose < handle
% Pose
properties
Rotation;
Translation;
Transformation;
end
methods
function obj = Pose(R,p) % might be euler angle or screw in the future
obj.Rotation = R;
obj.Translation = reshape(p,3,1);
obj.Transformation = [R p ; 0 0 0 1];
end
function numeric_pose = eval(obj,q_value)
% evaluate jacobian at given configuration
% q_value must have same dimension with obj.q
[m,n] = size(obj.q);
numeric_pose.Rotation = subs(obj.Rotation,q,reshape(q_value,m,n));
numeric_pose.Translation = subs(obj.Translation,q,reshape(q_value,m,n));
numeric_pose.Total = [numeric_pose.Rotation numeric_pose.Translation ; 0 0 0 1];
end
end
end