-
Notifications
You must be signed in to change notification settings - Fork 2
/
testIcubVizSynchro.m
47 lines (42 loc) · 2.13 KB
/
testIcubVizSynchro.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% minimal test for iCubVizAndForcesSynchronized
addpath utils
addpath external/quadfit
%experimentName='2017_10_30';
%experimentName='/green-iCub-Insitu-Datasets/2017_12_7_testYogaWithSensorLeft';% first sample with cable corrected ;
%experimentName='dataSamples/First_Time_Sensor';%
experimentName='dataSamples/TestYogaExtendedRight';%
%% options when loading experiment dataset
scriptOptions = {};
scriptOptions.forceCalculation=false;%false;
scriptOptions.printPlots=true;%true
scriptOptions.raw=true;
scriptOptions.saveData=false;
scriptOptions.testDir=false;% to calculate the raw data, for recalibration always true
scriptOptions.filterData=true;
scriptOptions.estimateWrenches=true;
scriptOptions.useInertial=false;
% Script of the mat file used for save the intermediate results
%scriptOptions.matFileName='dataEllipsoidAnalysis'; %newName
scriptOptions.matFileName='ftDataset';
%scriptOptions.matFileName='iCubDataset';
%[dataset]=read_estimate_experimentData(experimentName,scriptOptions);
[dataset,estimator,input]=readExperiment (experimentName,scriptOptions);
%withEstim=estimateDynamicsUsingIntervals(dataset,estimator,input,true);
% mask=dataset.time>dataset.time(1)+input.intervals.rightLeg.initTime & dataset.time<dataset.time(1)+input.intervals.rightLeg.endTime;
% dataset=applyMask(dataset,mask);
% figure,plot(dataset.rawData.right_leg); hold on;
% plot(dataset.time-dataset.time(1));
% legend 4 5 6 1 2 3 time % the channels are inverted since true channels are like this
%the saturation message considers the F T notation when calibration is
%true
% % % load the script of parameters relative
% load(strcat('data/',experimentName,'/',scriptOptions.matFileName,'.mat'),'dataset')
%getRawData(dataset.ftData,pathFile,serialNumbers)
%sensorsToAnalize = {'right_leg'};
sensorsToAnalize = {'left_leg'};
robotName='iCubGenova04';
input.robotName='model';
onTestDir=false;
visualizeExperiment(dataset,input,sensorsToAnalize,'contactFrame','r_sole')
% iCubVizWithSlider(dataset,robotName,sensorsToAnalize,'l_sole',onTestDir);
% iCubVizAndForcesSynchronized(dataset,robotName,sensorsToAnalize,'root_link',100);