forked from zhiqiao0256/Soft-Arm-SMART-Controller-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc_compareCamWithBase.m
More file actions
34 lines (34 loc) · 1.07 KB
/
func_compareCamWithBase.m
File metadata and controls
34 lines (34 loc) · 1.07 KB
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
30
31
32
33
34
function []=func_compareCamWithBase(trainSet)
test_tip_pos=[];
test_tip_pos=trainSet.tip_exp;
figure('Name','3D position Cam vs. Base')
subplot(1,2,1)
plot3(test_tip_pos(:,2),test_tip_pos(:,3),test_tip_pos(:,4),'LineWidth',1,'LineStyle','-.','Color','k')
hold on
scatter3(test_tip_pos(1,2),test_tip_pos(1,3),test_tip_pos(1,4),'LineWidth',4,'Marker','hexagram','MarkerFaceColor','r')
hold on
xlim([-0.2,0.2])
ylim([-0.2,0.2])
zlim([-0.2,0.2])
hold on
grid on
legend('data','start')
title('Camera Frame')
xlabel('X(m)')
ylabel('Y(m)')
subplot(1,2,2)
test_tip_pos=[];
test_tip_pos=trainSet.tip_exp_baseFrame;
plot3(test_tip_pos(:,2),test_tip_pos(:,3),test_tip_pos(:,4),'LineWidth',1,'LineStyle','-.','Color','b')
hold on
scatter3(test_tip_pos(1,2),test_tip_pos(1,3),test_tip_pos(1,4),'LineWidth',4,'Marker','hexagram','MarkerFaceColor','g')
hold on
xlim([-0.2,0.2])
ylim([-0.2,0.2])
zlim([-0.2,0.2])
hold on
grid on
title('Base Frame')
xlabel('X(m)')
ylabel('Y(m)')
end