-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.py
50 lines (49 loc) · 1.15 KB
/
main.py
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
48
49
50
"""
Authors: Giovanni Franzese & Anna Mészáros, May 2022
Email: g.franzese@tudelft.nl
Cognitive Robotics, TU Delft
This code is part of TERI (TEaching Robots Interactively) project
"""
#%%
from ILoSA import ILoSA
import time
import rospy
#%%
if __name__ == '__main__':
rospy.init_node('ILoSA', anonymous=True)
ILoSA=ILoSA()
ILoSA.connect_ROS()
time.sleep(5)
# ILoSA.home_gripper()
#%%
print("Recording of Nullspace contraints")
ILoSA.Record_NullSpace()
#%%
time.sleep(1)
print("Reset to the starting cartesian position")
ILoSA.go_to_pose(ILoSA.nullspace_traj[:, 0])
#%%
time.sleep(1)
print("Record of the cartesian trajectory")
ILoSA.Record_Demonstration()
#%%
time.sleep(1)
print("Save the data")
ILoSA.save()
#%%
time.sleep(1)
print("Load the data")
ILoSA.load()
#%%
time.sleep(1)
print("Train the Gaussian Process Models")
ILoSA.Train_GPs()
ILoSA.save_models()
ILoSA.find_alpha()
#%%
time.sleep(1)
ILoSA.go_to_start()
#%%
time.sleep(1)
print("Interactive Control Starting")
ILoSA.Interactive_Control()