├── Per.py ├── Qnet.py ├── README.md ├── SumTree.py ├── __pycache__ ├── EpisodicReplayMemory.cpython-35.pyc ├── Per.cpython-35.pyc ├── Qnet.cpython-35.pyc ├── Qnet.cpython-36.pyc ├── ReplayBuffer.cpython-35.pyc ├── ReplayBuffer.cpython-36.pyc ├── SaveBuffer.cpython-36.pyc ├── SumTree.cpython-35.pyc ├── acer_agent.cpython-35.pyc ├── acer_net.cpython-35.pyc ├── con_env.cpython-35.pyc ├── con_env10.cpython-35.pyc ├── con_env11.cpython-35.pyc ├── con_env12.cpython-35.pyc ├── con_env2.cpython-35.pyc ├── con_env3.cpython-35.pyc ├── con_env5.cpython-35.pyc ├── con_env6.cpython-35.pyc ├── con_env7.cpython-35.pyc ├── con_env8.cpython-35.pyc ├── con_env9.cpython-35.pyc ├── con_env9.cpython-38.pyc ├── con_her_env.cpython-35.pyc ├── con_her_env2.cpython-35.pyc ├── con_her_env3.cpython-35.pyc ├── conv_env4.cpython-35.pyc ├── dis_env2.cpython-35.pyc ├── dis_env3.cpython-35.pyc ├── dis_env4.cpython-35.pyc ├── dis_env5.cpython-35.pyc ├── dis_env6.cpython-35.pyc ├── discrete_env.cpython-35.pyc ├── epi_memory.cpython-35.pyc ├── her.cpython-35.pyc ├── her2.cpython-35.pyc ├── model.cpython-35.pyc ├── model.cpython-36.pyc ├── model.cpython-37.pyc ├── net10.cpython-35.pyc ├── net11.cpython-35.pyc ├── net12.cpython-35.pyc ├── net13.cpython-35.pyc ├── net2.cpython-35.pyc ├── net3.cpython-35.pyc ├── net4.cpython-35.pyc ├── net5.cpython-35.pyc ├── net6.cpython-35.pyc ├── net7.cpython-35.pyc ├── net8.cpython-35.pyc ├── per_d3qn_net.cpython-35.pyc ├── prioritized_memory.cpython-35.pyc ├── replay_memory.cpython-35.pyc ├── replay_memory.cpython-36.pyc ├── replay_memory.cpython-37.pyc ├── sac.cpython-35.pyc ├── sac.cpython-36.pyc ├── sac.cpython-37.pyc ├── sac_her_je_net.cpython-35.pyc ├── sac_her_net2.cpython-35.pyc ├── sac_her_net3.cpython-35.pyc ├── sac_je_net.cpython-35.pyc ├── sac_je_net2.cpython-35.pyc ├── sac_replay_buffer.cpython-35.pyc ├── sqnnet.cpython-35.pyc ├── test_agent.cpython-35.pyc ├── test_env.cpython-35.pyc ├── ur5_robotiq85_env.cpython-35.pyc ├── ur5_robotiq85_env.cpython-36.pyc ├── ur5_robotiq85_env.cpython-37.pyc ├── utils.cpython-35.pyc ├── utils.cpython-36.pyc ├── utils.cpython-37.pyc ├── utils_ur5_robotiq140.cpython-35.pyc ├── utils_ur5_robotiq140.cpython-36.pyc └── utils_ur5_robotiq140.cpython-37.pyc ├── cartpole_per.py ├── con_env10.py ├── con_env11.py ├── con_env12.py ├── con_env2.py ├── con_env3.py ├── con_env5.py ├── con_env6.py ├── con_env7.py ├── con_env8.py ├── con_env9.py ├── con_her_env3.py ├── conv_env4.py ├── dis_env2.py ├── dis_env3.py ├── dis_env4.py ├── dis_env5.py ├── dis_env6.py ├── discrete_env.py ├── epi_memory.py ├── figure ├── ddpg+3ac.png ├── ddpg+4ac.png ├── main12_1.png ├── main12_2.png ├── main12_temp1.png ├── main12_temp2.png └── rdpg_smaller_net.png ├── her.py ├── load.py ├── main.py ├── main10.py ├── main11.py ├── main12.py ├── main12_temp.py ├── main12_temp2.py ├── main13.py ├── main14.py ├── main2.py ├── main3.py ├── main4.py ├── main4_gpu.py ├── main5.py ├── main6.py ├── main7.py ├── main8.py ├── main9.py ├── meshes ├── collision │ ├── robotiq_85_base_link.stl │ ├── robotiq_85_finger_link.stl │ ├── robotiq_85_finger_tip_link.stl │ ├── robotiq_85_inner_knuckle_link.stl │ └── robotiq_85_knuckle_link.stl ├── objects │ ├── 826a4530bc6832c437d43e094da89ace.mtl │ ├── 826a4530bc6832c437d43e094da89ace.obj │ ├── 828d1b43814fc98c93b89bfd41acaad0.mtl │ ├── 828d1b43814fc98c93b89bfd41acaad0.obj │ ├── AntipodalSampler.py │ └── trimesh_test.py ├── ur5 │ ├── collision │ │ ├── base.stl │ │ ├── forearm.stl │ │ ├── shoulder.stl │ │ ├── upperarm.stl │ │ ├── wrist1.stl │ │ ├── wrist2.stl │ │ └── wrist3.stl │ └── visual │ │ ├── base.obj │ │ ├── forearm.obj │ │ ├── pan_tefal-collision01.obj │ │ ├── pan_tefal-collision02.obj │ │ ├── pan_tefal-collision03.obj │ │ ├── pan_tefal-collision04.obj │ │ ├── pan_tefal-collision05.obj │ │ ├── pan_tefal-collision06.obj │ │ ├── pan_tefal.obj │ │ ├── plate-collision01.obj │ │ ├── plate-collision02.obj │ │ ├── plate-collision03.obj │ │ ├── plate-collision04.obj │ │ ├── plate-collision05.obj │ │ ├── plate-collision06.obj │ │ ├── plate.obj │ │ ├── shoulder.obj │ │ ├── upperarm.obj │ │ ├── wrist1.obj │ │ ├── wrist2.obj │ │ └── wrist3.obj └── visual │ ├── robotiq_85_base_link.dae │ ├── robotiq_85_finger_link.dae │ ├── robotiq_85_finger_tip_link.dae │ ├── robotiq_85_inner_knuckle_link.dae │ └── robotiq_85_knuckle_link.dae ├── meshes2 ├── collision │ ├── robotiq_85_base_link.stl │ ├── robotiq_85_finger_link.stl │ ├── robotiq_85_finger_tip_link.stl │ ├── robotiq_85_inner_knuckle_link.stl │ └── robotiq_85_knuckle_link.stl ├── objects │ ├── 826a4530bc6832c437d43e094da89ace.mtl │ ├── 826a4530bc6832c437d43e094da89ace.obj │ ├── 828d1b43814fc98c93b89bfd41acaad0.mtl │ ├── 828d1b43814fc98c93b89bfd41acaad0.obj │ ├── AntipodalSampler.py │ └── trimesh_test.py └── visual │ ├── robotiq_85_base_link.dae │ ├── robotiq_85_finger_link.dae │ ├── robotiq_85_finger_tip_link.dae │ ├── robotiq_85_inner_knuckle_link.dae │ └── robotiq_85_knuckle_link.dae ├── models ├── DQN_UR5_zori_00 ├── DQN_UR5_zori_01 └── DQN_UR5_zori_02 ├── net10.py ├── net11.py ├── net12.py ├── net13.py ├── net2.py ├── net3.py ├── net4.py ├── net5.py ├── net6.py ├── net7.py ├── net8.py ├── net9.py ├── per_d3qn.py ├── per_d3qn_net.py ├── plot.py ├── pre_main_gpu.py ├── pretrain.py ├── prioritized_memory.py ├── runs ├── 2020-05-20_19-28-37_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589970517.gookrice ├── 2020-05-20_19-29-43_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589970583.gookrice ├── 2020-05-20_19-32-42_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589970762.gookrice ├── 2020-05-20_20-11-33_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589973093.gookrice ├── 2020-05-20_20-38-53_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589974733.gookrice ├── 2020-05-20_20-39-56_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589974796.gookrice ├── 2020-05-20_20-42-34_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589974954.gookrice ├── 2020-05-20_20-46-19_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589975179.gookrice ├── 2020-05-20_20-51-17_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589975477.gookrice ├── 2020-05-20_20-54-25_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589975665.gookrice ├── 2020-05-20_20-57-38_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589975858.gookrice ├── 2020-05-20_21-00-38_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589976038.gookrice ├── 2020-05-20_21-02-20_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589976140.gookrice ├── 2020-05-20_21-15-16_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589976916.gookrice ├── 2020-05-20_21-20-37_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977237.gookrice ├── 2020-05-20_21-23-39_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977419.gookrice ├── 2020-05-20_21-24-01_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977441.gookrice ├── 2020-05-20_21-26-38_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977598.gookrice ├── 2020-05-20_21-27-08_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977628.gookrice ├── 2020-05-20_21-27-36_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977656.gookrice ├── 2020-05-20_21-28-08_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977688.gookrice ├── 2020-05-20_21-28-37_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977717.gookrice ├── 2020-05-20_21-29-25_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977765.gookrice ├── 2020-05-20_21-29-50_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977790.gookrice ├── 2020-05-20_21-30-23_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977823.gookrice ├── 2020-05-20_21-33-13_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589977993.gookrice ├── 2020-05-20_21-41-03_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1589978463.gookrice ├── 2020-05-21_10-00-10_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1590022810.gookrice ├── 2020-05-21_10-09-02_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1590023342.gookrice ├── 2020-05-21_11-06-24_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1590026784.gookrice ├── 2020-05-21_11-07-51_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1590026871.gookrice ├── 2020-05-21_11-08-11_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1590026891.gookrice ├── 2020-05-21_11-08-48_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1590026928.gookrice └── 2020-05-21_11-09-32_SAC_Allegro_Gaussian__00 │ └── events.out.tfevents.1590026972.gookrice ├── saved_model └── fig.txt ├── saved_model2 └── fig.txt ├── saved_model3 ├── fig.txt ├── model1200.3.pth └── model1200.pth ├── saved_model44 ├── Figure_1.png ├── model1020.pth ├── model1040.pth ├── model1060.pth ├── model1080.pth ├── model1100.pth ├── model1120.pth ├── model1140.pth ├── model1160.pth ├── model1180.pth ├── model1200.pth ├── model1220.pth ├── model1240.pth ├── model1260.pth ├── model1280.pth ├── model1300.pth ├── model1320.pth ├── model1340.pth ├── model1360.pth ├── model1380.pth ├── model1400.pth ├── model1420.pth ├── model1440.pth ├── model1460.pth ├── model1480.pth ├── model1500.pth ├── model1520.pth ├── model1540.pth ├── model1560.pth ├── model1580.pth ├── model1600.pth ├── model1620.pth ├── model1640.pth ├── model1660.pth ├── model1680.pth ├── model1700.pth ├── model1720.pth ├── model1740.pth ├── model1760.pth ├── model1780.pth ├── model1800.pth ├── model1820.pth ├── model1840.pth ├── model1860.pth ├── model1880.pth ├── model1900.pth ├── model1920.pth ├── model1940.pth ├── model1960.pth ├── model1980.pth ├── model2000.pth ├── model2020.pth ├── model2040.pth ├── model2060.pth ├── model2080.pth ├── model2100.pth ├── model2120.pth ├── model2140.pth ├── model2160.pth ├── model2180.pth ├── model2200.pth ├── model2220.pth ├── model2240.pth ├── model2260.pth ├── model2280.pth ├── model2300.pth ├── model2320.pth ├── model2340.pth ├── model2360.pth ├── model2380.pth ├── model2400.pth ├── model2420.pth ├── model2440.pth ├── model2460.pth ├── model2480.pth ├── model2500.pth ├── model2520.pth ├── model2540.pth ├── model2560.pth ├── model2580.pth ├── model2600.pth ├── model2620.pth ├── model2640.pth ├── model2660.pth ├── model2680.pth ├── model2700.pth ├── model2720.pth ├── model2740.pth ├── model2760.pth ├── model2780.pth ├── model2800.pth ├── model2820.pth ├── model2840.pth ├── model2860.pth ├── model2880.pth ├── model2900.pth ├── model2920.pth ├── model2940.pth ├── model2960.pth └── model2980.pth ├── sqnnet.py ├── temp.py ├── test.py ├── ur5_robotiq85_env.py ├── ur5_robotiq85_env.pyc ├── urdf ├── objects │ ├── block.urdf │ ├── mesh │ │ └── UR_BANCHETTO1.dae │ ├── pan_tefal.jpg │ ├── pan_tefal.urdf │ ├── plate.urdf │ ├── table.urdf │ ├── target.urdf │ └── ur5_stand.urdf ├── peg_hole_gazebo │ ├── hole.SLDPRT │ ├── hole │ │ ├── hole_stl │ │ │ ├── Hole_1.STL │ │ │ ├── Hole_12.STL │ │ │ ├── Hole_2.STL │ │ │ ├── Hole_22.STL │ │ │ ├── Hole_3.STL │ │ │ ├── Hole_32.STL │ │ │ ├── Hole_4.STL │ │ │ ├── Hole_42.STL │ │ │ ├── hole_n_1.STL │ │ │ ├── hole_n_2.STL │ │ │ ├── hole_n_3.STL │ │ │ └── hole_n_4.STL │ │ ├── manifest.xml │ │ ├── meshes │ │ │ ├── hole.STL │ │ │ └── new_hole.STL │ │ └── urdf │ │ │ ├── hole.SLDPRT.urdf │ │ │ ├── new_hole1.urdf │ │ │ ├── new_hole2.urdf │ │ │ ├── new_hole3.urdf │ │ │ ├── new_hole4.urdf │ │ │ ├── new_hole_1.urdf │ │ │ └── new_hole_2.urdf │ ├── peg.SLDPRT │ └── peg │ │ ├── manifest.xml │ │ ├── meshes │ │ └── peg.STL │ │ └── urdf │ │ ├── new_peg.urdf │ │ └── peg.SLDPRT.urdf ├── robotiq_140.urdf ├── robotiq_140_gripper_description │ ├── meshes │ │ ├── GRIPPER_base_axis.dae │ │ ├── robotiq_140_left_inner_finger.dae │ │ ├── robotiq_140_left_inner_knuckle.dae │ │ ├── robotiq_140_left_outer_finger.dae │ │ ├── robotiq_140_left_outer_knuckle.dae │ │ ├── robotiq_140_right_inner_finger.dae │ │ ├── robotiq_140_right_inner_knuckle.dae │ │ ├── robotiq_140_right_outer_finger.dae │ │ └── robotiq_140_right_outer_knuckle.dae │ └── urdf │ │ └── robotiq_140.urdf ├── ur5.urdf ├── ur5_frypan.urdf ├── ur5_peg.urdf ├── ur5_peg_2.urdf ├── ur5_robotiq85.urdf ├── ur5_robotiq_140_backup.urdf └── ur5_robotiq_140_ori.urdf ├── utils.py ├── utils.pyc ├── utils_ur5_robotiq140.py └── utils_ur5_robotiq140.pyc /Per.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | class SumTree(object): 4 | data_pointer = 0 5 | 6 | # Here we initialize the tree with all nodes = 0, and initialize the data with all values = 0 7 | def __init__(self, capacity): 8 | # Number of leaf nodes (final nodes) that contains experiences 9 | self.capacity = capacity 10 | 11 | # Generate the tree with all nodes values = 0 12 | # To understand this calculation (2 * capacity - 1) look at the schema below 13 | # Remember we are in a binary node (each node has max 2 children) so 2x size of leaf (capacity) - 1 (root node) 14 | # Parent nodes = capacity - 1 15 | # Leaf nodes = capacity 16 | self.tree = np.zeros(2 * capacity - 1) 17 | 18 | # Contains the experiences (so the size of data is capacity) 19 | self.data = np.zeros(capacity, dtype=object) 20 | 21 | 22 | # Here we define function that will add our priority score in the sumtree leaf and add the experience in data: 23 | def add(self, priority, data): 24 | # Look at what index we want to put the experience 25 | tree_index = self.data_pointer + self.capacity - 1 26 | # Update data frame 27 | self.data[self.data_pointer] = data 28 | 29 | # Update the leaf 30 | self.update (tree_index, priority) 31 | 32 | # Add 1 to data_pointer 33 | self.data_pointer += 1 34 | 35 | if self.data_pointer >= self.capacity: # If we're above the capacity, we go back to first index (we overwrite) 36 | self.data_pointer = 0 37 | 38 | # Update the leaf priority score and propagate the change through tree 39 | def update(self, tree_index, priority): 40 | # Change = new priority score - former priority score 41 | change = priority - self.tree[tree_index] 42 | self.tree[tree_index] = priority 43 | 44 | # then propagate the change through tree 45 | # this method is faster than the recursive loop in the reference code 46 | while tree_index != 0: 47 | tree_index = (tree_index - 1) // 2 48 | self.tree[tree_index] += change 49 | 50 | # Here build a function to get a leaf from our tree. So we'll build a function to get the leaf_index, priority value of that leaf and experience associated with that leaf index: 51 | def get_leaf(self, v): 52 | parent_index = 0 53 | 54 | # the while loop is faster than the method in the reference code 55 | while True: 56 | left_child_index = 2 * parent_index + 1 57 | right_child_index = left_child_index + 1 58 | 59 | # If we reach bottom, end the search 60 | if left_child_index >= len(self.tree): 61 | leaf_index = parent_index 62 | break 63 | else: # downward search, always search for a higher priority node 64 | if v <= self.tree[left_child_index]: 65 | parent_index = left_child_index 66 | else: 67 | v -= self.tree[left_child_index] 68 | parent_index = right_child_index 69 | 70 | data_index = leaf_index - self.capacity + 1 71 | 72 | return leaf_index, self.tree[leaf_index], self.data[data_index] 73 | 74 | @property 75 | def total_priority(self): 76 | return self.tree[0] # Returns the root node 77 | 78 | # Now we finished constructing our SumTree object, next we'll build a memory object. 79 | class Memory(object): # stored as ( state, action, reward, next_state ) in SumTree 80 | PER_e = 0.01 # Hyperparameter that we use to avoid some experiences to have 0 probability of being taken 81 | PER_a = 0.6 # Hyperparameter that we use to make a tradeoff between taking only exp with high priority and sampling randomly 82 | PER_b = 0.4 # importance-sampling, from initial value increasing to 1 83 | 84 | PER_b_increment_per_sampling = 0.001 85 | 86 | absolute_error_upper = 1. # clipped abs error 87 | 88 | def __init__(self, capacity): 89 | # Making the tree 90 | self.tree = SumTree(capacity) 91 | 92 | # Next, we define a function to store a new experience in our tree. 93 | # Each new experience will have a score of max_prority (it will be then improved when we use this exp to train our DDQN). 94 | def store(self, experience): 95 | # Find the max priority 96 | max_priority = np.max(self.tree.tree[-self.tree.capacity:]) 97 | 98 | # If the max priority = 0 we can't put priority = 0 since this experience will never have a chance to be selected 99 | # So we use a minimum priority 100 | if max_priority == 0: 101 | max_priority = self.absolute_error_upper 102 | 103 | self.tree.add(max_priority, experience) # set the max priority for new priority 104 | 105 | # Now we create sample function, which will be used to pick batch from our tree memory, which will be used to train our model. 106 | # - First, we sample a minibatch of n size, the range [0, priority_total] into priority ranges. 107 | # - Then a value is uniformly sampled from each range. 108 | # - Then we search in the sumtree, for the experience where priority score correspond to sample values are retrieved from. 109 | def sample(self, n): 110 | # Create a minibatch array that will contains the minibatch 111 | minibatch = [] 112 | 113 | b_idx = np.empty((n,), dtype=np.int32) 114 | 115 | # Calculate the priority segment 116 | # Here, as explained in the paper, we divide the Range[0, ptotal] into n ranges 117 | priority_segment = self.tree.total_priority / n # priority segment 118 | 119 | for i in range(n): 120 | # A value is uniformly sample from each range 121 | a, b = priority_segment * i, priority_segment * (i + 1) 122 | value = np.random.uniform(a, b) 123 | 124 | # Experience that correspond to each value is retrieved 125 | index, priority, data = self.tree.get_leaf(value) 126 | 127 | b_idx[i]= index 128 | minibatch.append([data[0],data[1],data[2],data[3],data[4]]) 129 | 130 | return b_idx, minibatch 131 | 132 | # Update the priorities on the tree 133 | def batch_update(self, tree_idx, abs_errors): 134 | abs_errors += self.PER_e 135 | clipped_errors = np.minimum(abs_errors, self.absolute_error_upper) 136 | ps = np.power(clipped_errors, self.PER_a) 137 | 138 | for ti, p in zip(tree_idx, ps): 139 | self.tree.update(ti, p) -------------------------------------------------------------------------------- /Qnet.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import random 5 | 6 | class Qnet(nn.Module): 7 | def __init__(self): 8 | super(Qnet, self).__init__() 9 | self.fc1 = nn.Linear(8, 128) 10 | self.fc2 = nn.Linear(128, 128) 11 | self.fc3 = nn.Linear(128, 6) 12 | 13 | def forward(self, x): 14 | x = F.relu(self.fc1(x)) 15 | x = F.relu(self.fc2(x)) 16 | x = self.fc3(x) 17 | return x 18 | 19 | def sample_action(self, obs, epsilon): 20 | self.out = self.forward(obs).detach().cpu().numpy() 21 | 22 | coin = random.random() 23 | 24 | if coin < epsilon: 25 | return random.randint(0,7) #0 -> -1 random.randint(-1,1)-> x 26 | else : #-0.1or0.1 randompick 이후 pose에 random하게 합 27 | return np.argmax(self.out) #out.argmax().item() -> x 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Peg-In-Hole 2 | #### main1 - DQN 3 | #### main2 - PER-D3QN 4 | #### main3 - PER-D3QN with smaller action size 5 | #### main4 - PER-D3QN without z action 6 | #### main5 - DDPG-with PER with 4 action dim 7 | #### main6 - PPO 8 | #### main7 - DDPG-with PER with 3 action dim 9 | #### main8 - DDPG with sparse reward + HER 10 | #### main10 - RDPG 11 | * 4 action dim env10 12 | * ddpg with recurrent cell 13 | * amittance control 14 | #### main11 - joint control with ddpg 15 | #### main12 - RDPG 16 | * 4 action dim env10 17 | * ddpg with recurrent cell 18 | * default control 19 | 20 | ![캡처](https://user-images.githubusercontent.com/57895587/96407507-7ec29e00-121c-11eb-964a-c1f063f81385.PNG) 21 | 22 | #### main13 - DDPG with RND, sparse reward 23 | * 6 action space with new move tool 24 | * env 9 25 | -------------------------------------------------------------------------------- /SumTree.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | 3 | 4 | # SumTree 5 | # a binary tree data structure where the parent’s value is the sum of its children 6 | class SumTree: 7 | write = 0 8 | 9 | def __init__(self, capacity): 10 | self.capacity = capacity 11 | self.tree = numpy.zeros(2 * capacity - 1) 12 | self.data = numpy.zeros(capacity, dtype=object) 13 | self.n_entries = 0 14 | 15 | # update to the root node 16 | def _propagate(self, idx, change): 17 | parent = (idx - 1) // 2 18 | 19 | self.tree[parent] += change 20 | 21 | if parent != 0: 22 | self._propagate(parent, change) 23 | 24 | # find sample on leaf node 25 | def _retrieve(self, idx, s): 26 | left = 2 * idx + 1 27 | right = left + 1 28 | 29 | if left >= len(self.tree): 30 | return idx 31 | 32 | if s <= self.tree[left]: 33 | return self._retrieve(left, s) 34 | else: 35 | return self._retrieve(right, s - self.tree[left]) 36 | 37 | def total(self): 38 | return self.tree[0] 39 | 40 | # store priority and sample 41 | def add(self, p, data): 42 | idx = self.write + self.capacity - 1 43 | 44 | self.data[self.write] = data 45 | self.update(idx, p) 46 | 47 | self.write += 1 48 | if self.write >= self.capacity: 49 | self.write = 0 50 | 51 | if self.n_entries < self.capacity: 52 | self.n_entries += 1 53 | 54 | # update priority 55 | def update(self, idx, p): 56 | change = p - self.tree[idx] 57 | 58 | self.tree[idx] = p 59 | self._propagate(idx, change) 60 | 61 | # get priority and sample 62 | def get(self, s): 63 | idx = self._retrieve(0, s) 64 | dataIdx = idx - self.capacity + 1 65 | 66 | return (idx, self.tree[idx], self.data[dataIdx]) 67 | -------------------------------------------------------------------------------- /__pycache__/EpisodicReplayMemory.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/EpisodicReplayMemory.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/Per.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/Per.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/Qnet.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/Qnet.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/Qnet.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/Qnet.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/ReplayBuffer.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/ReplayBuffer.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/ReplayBuffer.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/ReplayBuffer.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/SaveBuffer.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/SaveBuffer.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/SumTree.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/SumTree.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/acer_agent.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/acer_agent.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/acer_net.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/acer_net.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env10.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env10.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env11.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env11.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env12.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env12.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env2.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env2.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env3.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env3.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env5.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env5.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env6.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env6.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env7.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env7.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env8.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env8.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env9.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env9.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_env9.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_env9.cpython-38.pyc -------------------------------------------------------------------------------- /__pycache__/con_her_env.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_her_env.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_her_env2.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_her_env2.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/con_her_env3.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/con_her_env3.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/conv_env4.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/conv_env4.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/dis_env2.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/dis_env2.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/dis_env3.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/dis_env3.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/dis_env4.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/dis_env4.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/dis_env5.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/dis_env5.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/dis_env6.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/dis_env6.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/discrete_env.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/discrete_env.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/epi_memory.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/epi_memory.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/her.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/her.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/her2.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/her2.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/model.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/model.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/model.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/model.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/model.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/model.cpython-37.pyc -------------------------------------------------------------------------------- /__pycache__/net10.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net10.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net11.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net11.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net12.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net12.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net13.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net13.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net2.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net2.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net3.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net3.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net4.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net4.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net5.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net5.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net6.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net6.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net7.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net7.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/net8.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/net8.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/per_d3qn_net.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/per_d3qn_net.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/prioritized_memory.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/prioritized_memory.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/replay_memory.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/replay_memory.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/replay_memory.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/replay_memory.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/replay_memory.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/replay_memory.cpython-37.pyc -------------------------------------------------------------------------------- /__pycache__/sac.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/sac.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/sac.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac.cpython-37.pyc -------------------------------------------------------------------------------- /__pycache__/sac_her_je_net.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac_her_je_net.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/sac_her_net2.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac_her_net2.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/sac_her_net3.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac_her_net3.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/sac_je_net.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac_je_net.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/sac_je_net2.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac_je_net2.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/sac_replay_buffer.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sac_replay_buffer.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/sqnnet.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/sqnnet.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/test_agent.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/test_agent.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/test_env.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/test_env.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/ur5_robotiq85_env.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/ur5_robotiq85_env.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/ur5_robotiq85_env.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/ur5_robotiq85_env.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/ur5_robotiq85_env.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/ur5_robotiq85_env.cpython-37.pyc -------------------------------------------------------------------------------- /__pycache__/utils.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/utils.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/utils.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/utils.cpython-37.pyc -------------------------------------------------------------------------------- /__pycache__/utils_ur5_robotiq140.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/utils_ur5_robotiq140.cpython-35.pyc -------------------------------------------------------------------------------- /__pycache__/utils_ur5_robotiq140.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/utils_ur5_robotiq140.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/utils_ur5_robotiq140.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/__pycache__/utils_ur5_robotiq140.cpython-37.pyc -------------------------------------------------------------------------------- /figure/ddpg+3ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/figure/ddpg+3ac.png -------------------------------------------------------------------------------- /figure/ddpg+4ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/figure/ddpg+4ac.png -------------------------------------------------------------------------------- /figure/main12_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/figure/main12_1.png -------------------------------------------------------------------------------- /figure/main12_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/figure/main12_2.png -------------------------------------------------------------------------------- /figure/main12_temp1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/figure/main12_temp1.png -------------------------------------------------------------------------------- /figure/main12_temp2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/figure/main12_temp2.png -------------------------------------------------------------------------------- /figure/rdpg_smaller_net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/figure/rdpg_smaller_net.png -------------------------------------------------------------------------------- /her.py: -------------------------------------------------------------------------------- 1 | from collections import deque 2 | import torch 3 | import numpy as np 4 | import copy 5 | import time 6 | class HER: 7 | def __init__(self): 8 | self.buffer=deque() 9 | def reset(self): 10 | self.buffer=deque() 11 | def keep(self,item): 12 | self.buffer.append(item) 13 | 14 | def backward(self): 15 | idx=0 16 | num=len(self.buffer) 17 | goal=self.buffer[-1][-2][:7] 18 | for i in range(num): 19 | temp=copy.deepcopy(self.buffer[-1-i][-2][:7]) 20 | if (list(temp)==list(goal)): 21 | self.buffer[-1-i][2]=1.0 #reward 22 | self.buffer[-1-i][4]=0 #mask 23 | idx+=1 24 | self.buffer[-1-i][-2][13:]=copy.deepcopy(goal) 25 | self.buffer[-1-i][0][13:]=copy.deepcopy(goal) 26 | 27 | return self.buffer -------------------------------------------------------------------------------- /load.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import datetime 3 | import gym 4 | import pybullet as p 5 | import numpy as np 6 | import itertools 7 | import torch 8 | import time 9 | 10 | from con_env8 import UR5_robotiq 11 | 12 | from collections import deque 13 | from matplotlib import pyplot as plt 14 | 15 | import collections 16 | import random 17 | import torch.nn as nn 18 | import torch.nn.functional as F 19 | import torch.optim as optim 20 | from torch.autograd import Variable 21 | import os 22 | os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" 23 | os.environ["CUDA_VISIBLE_DEVICES"]="0" 24 | 25 | parser = argparse.ArgumentParser(description='PyTorch Soft Actor-Critic Args') 26 | parser.add_argument('--env-name', default="Allegro", 27 | help='Mujoco Gym environment (default: HalfCheetah-v2)') 28 | parser.add_argument('--policy', default="Gaussian", 29 | help='Policy Type: Gaussian | Deterministic (default: Gaussian)') 30 | parser.add_argument('--eval', type=bool, default=True, 31 | help='Evaluates a policy a policy every 10 episode (default: True)') 32 | parser.add_argument('--gamma', type=float, default=0.99, metavar='G', 33 | help='discount factor for reward (default: 0.99)') 34 | parser.add_argument('--tau', type=float, default=0.005, metavar='G', 35 | help='target smoothing coefficient(τ) (default: 0.005)') 36 | parser.add_argument('--lr', type=float, default=0.0003, metavar='G', 37 | help='learning rate (default: 0.0003)') 38 | parser.add_argument('--alpha', type=float, default=0.2, metavar='G', 39 | help='Temperature parameter α determines the relative importance of the entropy\ 40 | term against the reward (default: 0.2)') 41 | parser.add_argument('--automatic_entropy_tuning', type=bool, default=False, metavar='G', 42 | help='Automaically adjust α (default: False)') 43 | parser.add_argument('--seed', type=int, default=123456, metavar='N', 44 | help='random seed (default: 123456)') 45 | parser.add_argument('--batch_size', type=int, default=256, metavar='N', 46 | help='batch size (default: 256)') 47 | parser.add_argument('--num_steps', type=int, default=1000001, metavar='N', 48 | help='maximum number of steps (default: 1000000)') 49 | parser.add_argument('--hidden_size', type=int, default=256, metavar='N', 50 | help='hidden size (default: 256)') 51 | parser.add_argument('--updates_per_step', type=int, default=1, metavar='N', 52 | help='model updates per simulator step (default: 1)') 53 | parser.add_argument('--start_steps', type=int, default=10000, metavar='N', 54 | help='Steps sampling random actions (default: 10000)') 55 | parser.add_argument('--target_update_interval', type=int, default=1, metavar='N', 56 | help='Value target update per no. of updates per step (default: 1)') 57 | parser.add_argument('--replay_size', type=int, default=1000000, metavar='N', 58 | help='size of replay buffer (default: 10000000)') 59 | parser.add_argument('--cuda', action="store_true", 60 | help='run on CUDA (default: False)') 61 | parser.add_argument('--GUI', default="GUI", 62 | help='Pybullet physics server mode GUI | DIRECT (default: GUI)') 63 | # parser.add_argument('--GUI', default="DIRECT", 64 | # help='Pybullet physics server mode GUI | DIRECT (default: GUI)') 65 | parser.add_argument('--suffix', default="00", 66 | help='Disticguish models (default: 00)') 67 | parser.add_argument('--dist_threshold', type=float, default=0.01, 68 | help='Goal and State distance threshold (default: 0.03)') 69 | parser.add_argument('--future_k', type=int, default=4, 70 | help='future_k (default: 4)') 71 | parser.add_argument('--epi_step', type=int, default=50, 72 | help='Max_episode_steps (default: 50)') 73 | parser.add_argument('--evaluate', type=bool, default=False, 74 | help='evaluate (default: False)') 75 | 76 | args = parser.parse_args() 77 | device = torch.device("cuda") 78 | print(device) 79 | 80 | state_size=13 81 | action_size=4 82 | 83 | PATH="./saved_model44/model1600.pth" 84 | actor= torch.load(PATH).to(device) 85 | actor.eval() 86 | 87 | # Environment 88 | env = UR5_robotiq(args) 89 | # env.getCameraImage() 90 | 91 | pose = env.getRobotPose() 92 | print("Robot initial pose") 93 | print(pose) 94 | 95 | pose = env.holePos 96 | pose.extend(env.Orn) 97 | #pose[2] += 0.15 98 | print("Robot target pose") 99 | print(env.holePos) 100 | # p.addUserDebugText('O',np.array(env.holePos)[:3]) 101 | # env.moveL(env.holePos) 102 | # get = env.getRobotPose() 103 | # print(get) 104 | 105 | # torch.cuda.device(0) 106 | # cuda = torch.device('cuda') 107 | ''' 108 | pose = env.getRobotPose() 109 | print("Robot final pose") 110 | print(pose) 111 | ''' 112 | 113 | def main(): 114 | score = 0.0 115 | global_step=0 116 | for epi_n in range(100): 117 | state = env.reset() 118 | #pre_noise=np.zeros(action_size) 119 | done = False 120 | step = 0 121 | score = 0 122 | while not done: 123 | step += 1 124 | global_step+=1 125 | time.sleep(0.1) 126 | action,_ = actor(torch.FloatTensor(state).to(device)) 127 | action=action[0].cpu() 128 | next_state, reward, done, info= env.step(list(action)) 129 | print('error',info) 130 | score += reward 131 | state = next_state 132 | print(score) 133 | time.sleep(3) 134 | 135 | 136 | if __name__ == '__main__': 137 | main() 138 | 139 | end = True 140 | while end: 141 | end = True -------------------------------------------------------------------------------- /meshes/collision/robotiq_85_base_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/collision/robotiq_85_base_link.stl -------------------------------------------------------------------------------- /meshes/collision/robotiq_85_finger_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/collision/robotiq_85_finger_link.stl -------------------------------------------------------------------------------- /meshes/collision/robotiq_85_finger_tip_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/collision/robotiq_85_finger_tip_link.stl -------------------------------------------------------------------------------- /meshes/collision/robotiq_85_inner_knuckle_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/collision/robotiq_85_inner_knuckle_link.stl -------------------------------------------------------------------------------- /meshes/collision/robotiq_85_knuckle_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/collision/robotiq_85_knuckle_link.stl -------------------------------------------------------------------------------- /meshes/objects/826a4530bc6832c437d43e094da89ace.mtl: -------------------------------------------------------------------------------- 1 | newmtl m0 2 | Ka 0.0 0.0 0.0 3 | Kd 0.0 0.0 0.0 4 | Ks 0.0 0.0 0.0 5 | Ns 1.0 6 | d 0 7 | map_Ka 7d37cd08fb9cb1f5.jpg 8 | map_Kd 7d37cd08fb9cb1f5.jpg 9 | newmtl m1 10 | Ka 1 1 1 11 | Kd 1 1 1 12 | Ks 0.0 0.0 0.0 13 | Ns 1.0 14 | d 0 15 | -------------------------------------------------------------------------------- /meshes/objects/828d1b43814fc98c93b89bfd41acaad0.mtl: -------------------------------------------------------------------------------- 1 | newmtl m1 2 | Ka 0.0 0.0 0.0 3 | Kd 0.0 0.0 0.0 4 | Ks 0.0 0.0 0.0 5 | Ns 1.0 6 | d 0 7 | map_Ka 4430b364534ddba3.jpg 8 | map_Kd 4430b364534ddba3.jpg 9 | newmtl m0 10 | Ka 0.0 0.0 0.0 11 | Kd 0.0 0.0 0.0 12 | Ks 0.0 0.0 0.0 13 | Ns 1.0 14 | d 0 15 | map_Ka a6047088b917915c.jpg 16 | map_Kd a6047088b917915c.jpg 17 | newmtl m2 18 | Ka 0.0 0.0 0.0 19 | Kd 0.0 0.0 0.0 20 | Ks 0.0 0.0 0.0 21 | Ns 1.0 22 | d 0 23 | map_Ka d90e0591d290f5c5.jpg 24 | map_Kd d90e0591d290f5c5.jpg 25 | newmtl m8 26 | Ka 0.0 0.0 0.0 27 | Kd 0.0 0.0 0.0 28 | Ks 0.0 0.0 0.0 29 | Ns 1.0 30 | d 0 31 | map_Ka 06027d044bb9ec63.jpg 32 | map_Kd 06027d044bb9ec63.jpg 33 | newmtl m4 34 | Ka 0.0 0.0 0.0 35 | Kd 0.0 0.0 0.0 36 | Ks 0.0 0.0 0.0 37 | Ns 1.0 38 | d 0 39 | map_Ka bd838166c37a1197.jpg 40 | map_Kd bd838166c37a1197.jpg 41 | newmtl m3 42 | Ka 0.0 0.0 0.0 43 | Kd 0.0 0.0 0.0 44 | Ks 0.0 0.0 0.0 45 | Ns 1.0 46 | d 0 47 | map_Ka 40d1a15b62ff8666.jpg 48 | map_Kd 40d1a15b62ff8666.jpg 49 | newmtl m5 50 | Ka 1 1 1 51 | Kd 1 1 1 52 | Ks 0.0 0.0 0.0 53 | Ns 1.0 54 | d 0 55 | newmtl m6 56 | Ka 0.0 0.0 0.0 57 | Kd 0.0 0.0 0.0 58 | Ks 0.0 0.0 0.0 59 | Ns 1.0 60 | d 0 61 | map_Ka 4a62fd3190ef1990.jpg 62 | map_Kd 4a62fd3190ef1990.jpg 63 | newmtl m7 64 | Ka 0.0 0.0 0.0 65 | Kd 0.0 0.0 0.0 66 | Ks 0.0 0.0 0.0 67 | Ns 1.0 68 | d 0 69 | map_Ka 1413b208a736f666.jpg 70 | map_Kd 1413b208a736f666.jpg 71 | newmtl m9 72 | Ka 0.0 0.0 0.0 73 | Kd 0.0 0.0 0.0 74 | Ks 0.0 0.0 0.0 75 | Ns 1.0 76 | d 0 77 | map_Ka 4d3b45326c4eb889.jpg 78 | map_Kd 4d3b45326c4eb889.jpg 79 | -------------------------------------------------------------------------------- /meshes/objects/AntipodalSampler.py: -------------------------------------------------------------------------------- 1 | import trimesh 2 | import numpy as np 3 | 4 | # SCALE = 0.004 5 | # MAX_OPENING_WIDTH = 0.085 6 | # MARGIN = 0.005 7 | # SAMPLE_POINT_NUM = 3000 8 | # 9 | # mesh = trimesh.load_mesh('828d1b43814fc98c93b89bfd41acaad0.obj') 10 | # mesh.apply_scale(SCALE) 11 | # 12 | # points, faceIndices = trimesh.sample.sample_surface_even(mesh, SAMPLE_POINT_NUM) 13 | # faceNormals = mesh.face_normals 14 | # 15 | # pointNum = np.size(points, 0) 16 | # 17 | # ray_origins = np.empty([pointNum, 3], dtype=float) 18 | # ray_directions = np.empty([pointNum, 3], dtype=float) 19 | # 20 | # for index in range(pointNum): 21 | # point = points[index] 22 | # normal_inward = faceNormals[faceIndices[index]] * -1 23 | # ray_origins[index] = point - normal_inward * MARGIN 24 | # ray_directions[index] = normal_inward 25 | # 26 | # locations, index_ray, index_tri = mesh.ray.intersects_location(ray_origins=ray_origins, ray_directions=ray_directions) 27 | # 28 | # ray_visualize = trimesh.load_path(np.hstack((ray_origins, 29 | # ray_origins + ray_directions * MAX_OPENING_WIDTH)).reshape(-1, 2, 3)) 30 | # 31 | # mesh.visual.face_colors = [155,155,155,255] 32 | # mesh.visual.face_colors[index_tri] = [255, 0, 0, 255] 33 | # print(np.size(locations, 0)) 34 | # scene = trimesh.Scene([mesh, 35 | # ray_visualize]) 36 | # # show the visualization 37 | # scene.show() 38 | 39 | 40 | """ 41 | sample points from a mesh file 42 | """ 43 | class AntipodalSampler: 44 | 45 | """ 46 | input: 47 | mesh: mesh of object 48 | scale: ratio to rescale the mesh 49 | maxOpeningWidth: maximum gripper opening width 50 | margin: the min distance of planned gripper tips to the surface of object 51 | samplePointNum: num of points sampled from the object surface 52 | """ 53 | def __init__(self, meshFile, scale=1, maxOpeningWidth=0.085, minOpeningWidth=0.003, samplePointNum=1000, mu=0.1): 54 | self.mesh = trimesh.load_mesh(meshFile) 55 | self.faceNormals = self.mesh.face_normals 56 | # rescale 57 | self.mesh.apply_scale(scale) 58 | self.maxOpeningWidth = maxOpeningWidth 59 | self.minOpeningWidth = minOpeningWidth 60 | self.samplePointNum = samplePointNum 61 | self.surfacePoints, self.faceIndices = trimesh.sample.sample_surface_even(self.mesh, self.samplePointNum) 62 | self.mu = mu 63 | 64 | """ 65 | return: 66 | list of antipodal point pairs : ndarray num * 2 * 3 67 | """ 68 | def sample_antipodal_points(self): 69 | pointNum = np.size(self.surfacePoints, 0) 70 | 71 | # generate the ray 72 | rayOrigins = np.empty([pointNum, 3], dtype=float) 73 | rayDirections = np.empty([pointNum, 3], dtype=float) 74 | 75 | for index in range(pointNum): 76 | point = self.surfacePoints[index] 77 | inwardNormal = self.faceNormals[self.faceIndices[index]] * -1 78 | rayOrigins[index] = point + inwardNormal * self.minOpeningWidth # avoid intersect_points that are too close 79 | rayDirections[index] = inwardNormal 80 | 81 | intersectPoints, indicesOfRay, indicesOfFace = self.mesh.ray.intersects_location(ray_origins=rayOrigins, 82 | ray_directions=rayDirections) 83 | 84 | processedPairIndices = self.__removeRedundantPairs(intersectPoints, indicesOfRay, indicesOfFace) 85 | processedPairNum = len(processedPairIndices) 86 | processedPair = np.empty([processedPairNum, 2, 3]) 87 | count = 0 88 | for index in processedPairIndices: 89 | processedPair[count][0] = rayOrigins[ indicesOfRay[index] ] 90 | processedPair[count][1] = intersectPoints[index] 91 | 92 | return processedPair 93 | 94 | def __removeRedundantPairs(self, intersectPoints, indicesOfRay, indicesOfFace): 95 | pairNum = np.size(intersectPoints, 0) 96 | processedIndices = [] 97 | for index in range(pairNum): 98 | if 1: 99 | # TODO dis too large / direction not match 100 | processedIndices.append(index) 101 | 102 | return processedIndices 103 | 104 | def visualization(self, processedPair): 105 | processedRayOrigin = processedPair[:, 0, :] 106 | # TODO visualization for test 107 | # processedRayDirectionUnNormalized = (processedRayOrigin - processedPair[:, 1, :]) 108 | 109 | def _direction_normalize(self, directionUnNormalized): 110 | # TODO normalize the list of vector 111 | for vec in directionUnNormalized: 112 | pass 113 | 114 | 115 | -------------------------------------------------------------------------------- /meshes/objects/trimesh_test.py: -------------------------------------------------------------------------------- 1 | import trimesh 2 | import numpy as np 3 | mesh = trimesh.load_mesh('828d1b43814fc98c93b89bfd41acaad0.obj') 4 | # mesh.is_watertight) 5 | # mesh.fill_holes() 6 | # mesh.convex_hull 7 | # if not mesh.is_watertight: 8 | # if not mesh.fill_holes(): 9 | # mesh = mesh.convex_hull 10 | # mesh.show() 11 | mesh.apply_scale(0.003) 12 | 13 | points, faceIndices = trimesh.sample.sample_surface_even(mesh, 3000) 14 | faceNormals = mesh.face_normals 15 | print(np.size(points, 0)) 16 | # for index in range(np.size(points, 0)): 17 | # point = points[index] 18 | # faceIndex = faceIndices[index] 19 | # normalVector = faceNormals[faceIndex] 20 | # print(point) 21 | # print(faceIndex) 22 | # print(normalVector) 23 | # print('-----------------') 24 | 25 | # ray test 26 | ray_origins = np.array([ points[0] + faceNormals[ faceIndices[0]] * 0.005 ]) 27 | ray_directions = np.array([ faceNormals[ faceIndices[0]] * -1 ]) 28 | locations, index_ray, index_tri = mesh.ray.intersects_location(ray_origins=ray_origins, 29 | ray_directions=ray_directions) 30 | print(ray_origins) 31 | print('The rays hit the mesh at coordinates:\n', locations) 32 | ray_length = 0.080 33 | ray_visualize = trimesh.load_path(np.hstack((ray_origins, 34 | ray_origins + ray_directions * ray_length)).reshape(-1, 2, 3)) 35 | 36 | # unmerge so viewer doesn't smooth 37 | mesh.unmerge_vertices() 38 | # make mesh white- ish 39 | mesh.visual.face_colors = [155,155,155,255] 40 | mesh.visual.face_colors[index_tri] = [255, 0, 0, 255] 41 | # create a visualization scene with rays, hits, and mesh 42 | scene = trimesh.Scene([mesh, 43 | ray_visualize]) 44 | # show the visualization 45 | scene.show() 46 | 47 | 48 | # sudo apt install python3-rtree 49 | # pip install rtree 50 | 51 | -------------------------------------------------------------------------------- /meshes/ur5/collision/base.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/ur5/collision/base.stl -------------------------------------------------------------------------------- /meshes/ur5/collision/forearm.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/ur5/collision/forearm.stl -------------------------------------------------------------------------------- /meshes/ur5/collision/shoulder.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/ur5/collision/shoulder.stl -------------------------------------------------------------------------------- /meshes/ur5/collision/upperarm.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/ur5/collision/upperarm.stl -------------------------------------------------------------------------------- /meshes/ur5/collision/wrist1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/ur5/collision/wrist1.stl -------------------------------------------------------------------------------- /meshes/ur5/collision/wrist2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/ur5/collision/wrist2.stl -------------------------------------------------------------------------------- /meshes/ur5/collision/wrist3.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes/ur5/collision/wrist3.stl -------------------------------------------------------------------------------- /meshes/ur5/visual/pan_tefal-collision01.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v 0.066236 0.112453 0.075000 4 | v 0.070225 0.121633 0.075000 5 | v 0.063600 0.110158 0.000000 6 | v 0.060950 0.105568 0.000000 7 | v 0.131811 0.001125 0.075750 8 | v 0.141855 0.000000 0.075750 9 | v 0.128472 0.000000 0.000000 10 | v 0.123119 0.000000 0.000000 11 | vn 0.166577 -0.705775 0.688573 12 | vn -0.727212 0.200240 0.656556 13 | vn 0.637357 -0.756451 -0.146827 14 | vn -0.340753 -0.711716 0.614286 15 | vn 0.122979 0.860640 0.494141 16 | vn 0.770289 -0.238643 0.591358 17 | vn -0.635571 -0.120420 0.762594 18 | vn -0.070367 0.649517 -0.757084 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 4//4 8//8 24 | f 1//1 5//5 6//6 25 | f 1//1 8//8 5//5 26 | f 2//2 3//3 4//4 27 | f 2//2 7//7 3//3 28 | f 2//2 5//5 6//6 29 | f 2//2 6//6 7//7 30 | f 3//3 7//7 4//4 31 | f 3//3 8//8 4//4 32 | f 3//3 7//7 8//8 33 | f 4//4 8//8 5//5 34 | f 4//4 7//7 8//8 35 | f 5//5 8//8 6//6 36 | f 6//6 8//8 7//7 37 | -------------------------------------------------------------------------------- /meshes/ur5/visual/pan_tefal-collision02.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v -0.064269 0.113589 0.075000 4 | v -0.070225 0.121633 0.075000 5 | v -0.063600 0.110158 0.000000 6 | v -0.060950 0.105568 0.000000 7 | v 0.064932 0.114714 0.075750 8 | v 0.070927 0.122850 0.075750 9 | v 0.064236 0.111260 0.000000 10 | v 0.061560 0.106624 0.000000 11 | vn -0.693799 -0.019731 0.719898 12 | vn -0.782132 -0.410509 0.468776 13 | vn 0.057085 0.837906 0.542821 14 | vn 0.549444 0.695908 -0.462410 15 | vn -0.488898 0.761278 -0.425951 16 | vn 0.527121 -0.833525 0.165465 17 | vn 0.764499 0.413217 0.494766 18 | vn -0.190845 -0.280421 -0.940714 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 4//4 8//8 24 | f 1//1 5//5 6//6 25 | f 1//1 8//8 5//5 26 | f 2//2 3//3 4//4 27 | f 2//2 7//7 3//3 28 | f 2//2 5//5 6//6 29 | f 2//2 6//6 7//7 30 | f 3//3 7//7 4//4 31 | f 3//3 8//8 4//4 32 | f 3//3 7//7 8//8 33 | f 4//4 8//8 5//5 34 | f 4//4 7//7 8//8 35 | f 5//5 8//8 6//6 36 | f 6//6 8//8 7//7 37 | -------------------------------------------------------------------------------- /meshes/ur5/visual/pan_tefal-collision03.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v -0.130506 0.001136 0.075000 4 | v -0.140450 0.000000 0.075000 5 | v -0.127200 0.000000 0.000000 6 | v -0.121900 0.000000 0.000000 7 | v -0.066879 0.113589 0.075750 8 | v -0.070927 0.122850 0.075750 9 | v -0.064236 0.111260 0.000000 10 | v -0.061559 0.106624 0.000000 11 | vn -0.005755 -0.840864 -0.541216 12 | vn -0.393829 -0.423425 0.815849 13 | vn 0.855454 0.357218 -0.374959 14 | vn -0.535483 -0.042852 -0.843458 15 | vn 0.593436 -0.341238 0.728966 16 | vn -0.684303 -0.643863 0.342301 17 | vn -0.543719 -0.112982 0.831628 18 | vn -0.432322 -0.733068 0.525080 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 4//4 8//8 24 | f 1//1 5//5 6//6 25 | f 1//1 8//8 5//5 26 | f 2//2 3//3 4//4 27 | f 2//2 7//7 3//3 28 | f 2//2 5//5 6//6 29 | f 2//2 6//6 7//7 30 | f 3//3 7//7 4//4 31 | f 3//3 8//8 4//4 32 | f 3//3 7//7 8//8 33 | f 4//4 8//8 5//5 34 | f 4//4 7//7 8//8 35 | f 5//5 8//8 6//6 36 | f 6//6 8//8 7//7 37 | -------------------------------------------------------------------------------- /meshes/ur5/visual/pan_tefal-collision04.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v -0.066236 -0.112453 0.075000 4 | v -0.070225 -0.121633 0.075000 5 | v -0.063600 -0.110158 0.000000 6 | v -0.060950 -0.105568 0.000000 7 | v -0.131811 -0.001125 0.075750 8 | v -0.141855 0.000000 0.075750 9 | v -0.128472 0.000000 0.000000 10 | v -0.123119 0.000000 0.000000 11 | vn -0.706733 -0.191066 0.681192 12 | vn 0.444900 -0.691793 0.568758 13 | vn 0.088502 0.609907 0.787515 14 | vn -0.441942 -0.815296 0.374139 15 | vn -0.595750 0.064829 0.800549 16 | vn -0.683770 -0.459760 -0.566639 17 | vn -0.132581 -0.607583 0.783112 18 | vn -0.220415 -0.970551 0.097201 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 4//4 8//8 24 | f 1//1 5//5 6//6 25 | f 1//1 8//8 5//5 26 | f 2//2 3//3 4//4 27 | f 2//2 7//7 3//3 28 | f 2//2 5//5 6//6 29 | f 2//2 6//6 7//7 30 | f 3//3 7//7 4//4 31 | f 3//3 8//8 4//4 32 | f 3//3 7//7 8//8 33 | f 4//4 8//8 5//5 34 | f 4//4 7//7 8//8 35 | f 5//5 8//8 6//6 36 | f 6//6 8//8 7//7 37 | -------------------------------------------------------------------------------- /meshes/ur5/visual/pan_tefal-collision05.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v 0.064269 -0.113589 0.075000 4 | v 0.070225 -0.121633 0.075000 5 | v 0.063600 -0.110158 0.000000 6 | v 0.060950 -0.105568 0.000000 7 | v -0.064932 -0.114714 0.075750 8 | v -0.070927 -0.122850 0.075750 9 | v -0.064236 -0.111260 0.000000 10 | v -0.061560 -0.106624 0.000000 11 | vn 0.337731 -0.812635 0.474934 12 | vn -0.151863 -0.910103 0.385551 13 | vn -0.786673 0.591186 -0.177887 14 | vn 0.661692 0.712532 0.233371 15 | vn -0.904799 0.159708 -0.394757 16 | vn 0.641963 -0.023667 -0.766370 17 | vn -0.472889 -0.878846 0.063294 18 | vn 0.722857 0.565784 -0.396694 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 4//4 8//8 24 | f 1//1 5//5 6//6 25 | f 1//1 8//8 5//5 26 | f 2//2 3//3 4//4 27 | f 2//2 7//7 3//3 28 | f 2//2 5//5 6//6 29 | f 2//2 6//6 7//7 30 | f 3//3 7//7 4//4 31 | f 3//3 8//8 4//4 32 | f 3//3 7//7 8//8 33 | f 4//4 8//8 5//5 34 | f 4//4 7//7 8//8 35 | f 5//5 8//8 6//6 36 | f 6//6 8//8 7//7 37 | -------------------------------------------------------------------------------- /meshes/ur5/visual/pan_tefal-collision06.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v 0.130506 -0.001136 0.075000 4 | v 0.140450 -0.000000 0.075000 5 | v 0.127200 -0.000000 0.000000 6 | v 0.121900 -0.000000 0.000000 7 | v 0.066879 -0.113589 0.075750 8 | v 0.070927 -0.122850 0.075750 9 | v 0.064236 -0.111260 0.000000 10 | v 0.061560 -0.106624 0.000000 11 | vn -0.793944 -0.586742 -0.159329 12 | vn 0.466324 0.641735 -0.608867 13 | vn -0.911102 -0.220305 -0.348365 14 | vn -0.616532 -0.769008 0.168863 15 | vn -0.642390 0.561142 0.521973 16 | vn -0.527497 0.482140 0.699491 17 | vn -0.264570 0.491705 0.829596 18 | vn -0.595670 0.662065 0.454804 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 4//4 8//8 24 | f 1//1 5//5 6//6 25 | f 1//1 8//8 5//5 26 | f 2//2 3//3 4//4 27 | f 2//2 7//7 3//3 28 | f 2//2 5//5 6//6 29 | f 2//2 6//6 7//7 30 | f 3//3 7//7 4//4 31 | f 3//3 8//8 4//4 32 | f 3//3 7//7 8//8 33 | f 4//4 8//8 5//5 34 | f 4//4 7//7 8//8 35 | f 5//5 8//8 6//6 36 | f 6//6 8//8 7//7 37 | -------------------------------------------------------------------------------- /meshes/ur5/visual/plate-collision01.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v 0.049745 0.084455 0.060000 4 | v 0.051940 0.089963 0.060000 5 | v 0.029150 0.050489 0.000000 6 | v 0.027560 0.047735 0.000000 7 | v 0.098993 0.000845 0.060600 8 | v 0.104919 0.000000 0.060600 9 | v 0.058883 0.000000 0.000000 10 | v 0.055671 0.000000 0.000000 11 | vn -0.962255 -0.069189 0.263208 12 | vn 0.888900 -0.266051 0.372926 13 | vn -0.704117 -0.151605 -0.693711 14 | vn -0.096471 -0.952673 -0.288284 15 | vn 0.353510 0.535276 0.767144 16 | vn 0.049583 0.551162 -0.832924 17 | vn -0.080990 0.081838 -0.993349 18 | vn 0.250326 0.614585 -0.748080 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 5//5 6//6 24 | f 2//2 3//3 4//4 25 | f 2//2 7//7 3//3 26 | f 2//2 5//5 6//6 27 | f 2//2 6//6 7//7 28 | f 3//3 7//7 4//4 29 | f 3//3 8//8 4//4 30 | f 3//3 7//7 8//8 31 | f 4//4 8//8 5//5 32 | f 4//4 7//7 8//8 33 | f 5//5 8//8 6//6 34 | f 6//6 8//8 7//7 35 | -------------------------------------------------------------------------------- /meshes/ur5/visual/plate-collision02.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v -0.048268 0.085308 0.060000 4 | v -0.051940 0.089963 0.060000 5 | v -0.029150 0.050489 0.000000 6 | v -0.027560 0.047735 0.000000 7 | v 0.048765 0.086152 0.060600 8 | v 0.052459 0.090862 0.060600 9 | v 0.029442 0.050994 0.000000 10 | v 0.027836 0.048213 0.000000 11 | vn -0.471567 -0.127056 -0.872629 12 | vn 0.616670 0.313448 -0.722127 13 | vn 0.434277 -0.589449 -0.681141 14 | vn -0.696898 0.673938 -0.245235 15 | vn -0.964280 0.142499 -0.223288 16 | vn -0.118273 0.245678 -0.962109 17 | vn 0.333505 0.310546 -0.890133 18 | vn 0.592935 -0.751851 -0.288355 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 5//5 6//6 24 | f 2//2 3//3 4//4 25 | f 2//2 7//7 3//3 26 | f 2//2 5//5 6//6 27 | f 2//2 6//6 7//7 28 | f 3//3 7//7 4//4 29 | f 3//3 8//8 4//4 30 | f 3//3 7//7 8//8 31 | f 4//4 8//8 5//5 32 | f 4//4 7//7 8//8 33 | f 5//5 8//8 6//6 34 | f 6//6 8//8 7//7 35 | -------------------------------------------------------------------------------- /meshes/ur5/visual/plate-collision03.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v -0.098012 0.000853 0.060000 4 | v -0.103880 0.000000 0.060000 5 | v -0.058300 0.000000 0.000000 6 | v -0.055120 0.000000 0.000000 7 | v -0.050228 0.085308 0.060600 8 | v -0.052459 0.090862 0.060600 9 | v -0.029441 0.050994 0.000000 10 | v -0.027836 0.048213 0.000000 11 | vn -0.570326 0.565919 -0.595368 12 | vn -0.987481 0.122113 -0.099846 13 | vn 0.256877 0.509622 0.821157 14 | vn -0.149510 -0.272737 0.950401 15 | vn 0.250981 -0.885212 0.391675 16 | vn 0.623883 0.757497 -0.192269 17 | vn 0.116527 -0.876135 -0.467769 18 | vn -0.474452 0.562082 -0.677466 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 5//5 6//6 24 | f 2//2 3//3 4//4 25 | f 2//2 7//7 3//3 26 | f 2//2 5//5 6//6 27 | f 2//2 6//6 7//7 28 | f 3//3 7//7 4//4 29 | f 3//3 8//8 4//4 30 | f 3//3 7//7 8//8 31 | f 4//4 8//8 5//5 32 | f 4//4 7//7 8//8 33 | f 5//5 8//8 6//6 34 | f 6//6 8//8 7//7 35 | -------------------------------------------------------------------------------- /meshes/ur5/visual/plate-collision04.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v -0.049745 -0.084455 0.060000 4 | v -0.051940 -0.089963 0.060000 5 | v -0.029150 -0.050489 0.000000 6 | v -0.027560 -0.047735 0.000000 7 | v -0.098993 -0.000845 0.060600 8 | v -0.104919 0.000000 0.060600 9 | v -0.058883 0.000000 0.000000 10 | v -0.055671 0.000000 0.000000 11 | vn -0.454516 0.625342 -0.634321 12 | vn -0.518286 -0.578386 0.629959 13 | vn -0.173259 0.226757 -0.958417 14 | vn -0.247982 -0.510538 -0.823320 15 | vn -0.417030 0.446958 0.791400 16 | vn -0.004783 -0.717725 -0.696310 17 | vn 0.273713 0.103751 0.956199 18 | vn 0.429490 0.309534 -0.848367 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 5//5 6//6 24 | f 2//2 3//3 4//4 25 | f 2//2 7//7 3//3 26 | f 2//2 5//5 6//6 27 | f 2//2 6//6 7//7 28 | f 3//3 7//7 4//4 29 | f 3//3 8//8 4//4 30 | f 3//3 7//7 8//8 31 | f 4//4 8//8 5//5 32 | f 4//4 7//7 8//8 33 | f 5//5 8//8 6//6 34 | f 6//6 8//8 7//7 35 | -------------------------------------------------------------------------------- /meshes/ur5/visual/plate-collision05.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v 0.048268 -0.085308 0.060000 4 | v 0.051940 -0.089963 0.060000 5 | v 0.029150 -0.050489 0.000000 6 | v 0.027560 -0.047735 0.000000 7 | v -0.048765 -0.086152 0.060600 8 | v -0.052459 -0.090862 0.060600 9 | v -0.029442 -0.050994 0.000000 10 | v -0.027836 -0.048213 0.000000 11 | vn 0.404852 0.441710 0.800617 12 | vn -0.882548 -0.029017 0.469326 13 | vn 0.182767 0.981935 0.048984 14 | vn -0.768458 0.392626 -0.505290 15 | vn 0.592713 0.805382 -0.007215 16 | vn 0.400028 0.869068 0.291031 17 | vn -0.642772 0.691166 0.330355 18 | vn 0.104670 0.652086 -0.750885 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 5//5 6//6 24 | f 2//2 3//3 4//4 25 | f 2//2 7//7 3//3 26 | f 2//2 5//5 6//6 27 | f 2//2 6//6 7//7 28 | f 3//3 7//7 4//4 29 | f 3//3 8//8 4//4 30 | f 3//3 7//7 8//8 31 | f 4//4 8//8 5//5 32 | f 4//4 7//7 8//8 33 | f 5//5 8//8 6//6 34 | f 6//6 8//8 7//7 35 | -------------------------------------------------------------------------------- /meshes/ur5/visual/plate-collision06.obj: -------------------------------------------------------------------------------- 1 | mtllib dinnerware.mtl 2 | usemtl pan_tefal 3 | v 0.098012 -0.000853 0.060000 4 | v 0.103880 -0.000000 0.060000 5 | v 0.058300 -0.000000 0.000000 6 | v 0.055120 -0.000000 0.000000 7 | v 0.050228 -0.085308 0.060600 8 | v 0.052459 -0.090862 0.060600 9 | v 0.029442 -0.050994 0.000000 10 | v 0.027836 -0.048213 0.000000 11 | vn 0.692885 0.707963 -0.136739 12 | vn 0.408978 0.907585 0.095006 13 | vn -0.212286 -0.468709 0.857465 14 | vn 0.297056 -0.618852 0.727172 15 | vn 0.708170 0.492350 -0.506050 16 | vn 0.745762 -0.289343 -0.600100 17 | vn 0.808951 0.000863 -0.587876 18 | vn 0.926527 0.350079 -0.137811 19 | f 1//1 2//2 4//4 20 | f 1//1 5//5 2//2 21 | f 1//1 6//6 2//2 22 | f 1//1 4//4 5//5 23 | f 1//1 5//5 6//6 24 | f 2//2 3//3 4//4 25 | f 2//2 7//7 3//3 26 | f 2//2 5//5 6//6 27 | f 2//2 6//6 7//7 28 | f 3//3 7//7 4//4 29 | f 3//3 8//8 4//4 30 | f 3//3 7//7 8//8 31 | f 4//4 8//8 5//5 32 | f 4//4 7//7 8//8 33 | f 5//5 8//8 6//6 34 | f 6//6 8//8 7//7 35 | -------------------------------------------------------------------------------- /meshes2/collision/robotiq_85_base_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes2/collision/robotiq_85_base_link.stl -------------------------------------------------------------------------------- /meshes2/collision/robotiq_85_finger_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes2/collision/robotiq_85_finger_link.stl -------------------------------------------------------------------------------- /meshes2/collision/robotiq_85_finger_tip_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes2/collision/robotiq_85_finger_tip_link.stl -------------------------------------------------------------------------------- /meshes2/collision/robotiq_85_inner_knuckle_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes2/collision/robotiq_85_inner_knuckle_link.stl -------------------------------------------------------------------------------- /meshes2/collision/robotiq_85_knuckle_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/meshes2/collision/robotiq_85_knuckle_link.stl -------------------------------------------------------------------------------- /meshes2/objects/826a4530bc6832c437d43e094da89ace.mtl: -------------------------------------------------------------------------------- 1 | newmtl m0 2 | Ka 0.0 0.0 0.0 3 | Kd 0.0 0.0 0.0 4 | Ks 0.0 0.0 0.0 5 | Ns 1.0 6 | d 0 7 | map_Ka 7d37cd08fb9cb1f5.jpg 8 | map_Kd 7d37cd08fb9cb1f5.jpg 9 | newmtl m1 10 | Ka 1 1 1 11 | Kd 1 1 1 12 | Ks 0.0 0.0 0.0 13 | Ns 1.0 14 | d 0 15 | -------------------------------------------------------------------------------- /meshes2/objects/828d1b43814fc98c93b89bfd41acaad0.mtl: -------------------------------------------------------------------------------- 1 | newmtl m1 2 | Ka 0.0 0.0 0.0 3 | Kd 0.0 0.0 0.0 4 | Ks 0.0 0.0 0.0 5 | Ns 1.0 6 | d 0 7 | map_Ka 4430b364534ddba3.jpg 8 | map_Kd 4430b364534ddba3.jpg 9 | newmtl m0 10 | Ka 0.0 0.0 0.0 11 | Kd 0.0 0.0 0.0 12 | Ks 0.0 0.0 0.0 13 | Ns 1.0 14 | d 0 15 | map_Ka a6047088b917915c.jpg 16 | map_Kd a6047088b917915c.jpg 17 | newmtl m2 18 | Ka 0.0 0.0 0.0 19 | Kd 0.0 0.0 0.0 20 | Ks 0.0 0.0 0.0 21 | Ns 1.0 22 | d 0 23 | map_Ka d90e0591d290f5c5.jpg 24 | map_Kd d90e0591d290f5c5.jpg 25 | newmtl m8 26 | Ka 0.0 0.0 0.0 27 | Kd 0.0 0.0 0.0 28 | Ks 0.0 0.0 0.0 29 | Ns 1.0 30 | d 0 31 | map_Ka 06027d044bb9ec63.jpg 32 | map_Kd 06027d044bb9ec63.jpg 33 | newmtl m4 34 | Ka 0.0 0.0 0.0 35 | Kd 0.0 0.0 0.0 36 | Ks 0.0 0.0 0.0 37 | Ns 1.0 38 | d 0 39 | map_Ka bd838166c37a1197.jpg 40 | map_Kd bd838166c37a1197.jpg 41 | newmtl m3 42 | Ka 0.0 0.0 0.0 43 | Kd 0.0 0.0 0.0 44 | Ks 0.0 0.0 0.0 45 | Ns 1.0 46 | d 0 47 | map_Ka 40d1a15b62ff8666.jpg 48 | map_Kd 40d1a15b62ff8666.jpg 49 | newmtl m5 50 | Ka 1 1 1 51 | Kd 1 1 1 52 | Ks 0.0 0.0 0.0 53 | Ns 1.0 54 | d 0 55 | newmtl m6 56 | Ka 0.0 0.0 0.0 57 | Kd 0.0 0.0 0.0 58 | Ks 0.0 0.0 0.0 59 | Ns 1.0 60 | d 0 61 | map_Ka 4a62fd3190ef1990.jpg 62 | map_Kd 4a62fd3190ef1990.jpg 63 | newmtl m7 64 | Ka 0.0 0.0 0.0 65 | Kd 0.0 0.0 0.0 66 | Ks 0.0 0.0 0.0 67 | Ns 1.0 68 | d 0 69 | map_Ka 1413b208a736f666.jpg 70 | map_Kd 1413b208a736f666.jpg 71 | newmtl m9 72 | Ka 0.0 0.0 0.0 73 | Kd 0.0 0.0 0.0 74 | Ks 0.0 0.0 0.0 75 | Ns 1.0 76 | d 0 77 | map_Ka 4d3b45326c4eb889.jpg 78 | map_Kd 4d3b45326c4eb889.jpg 79 | -------------------------------------------------------------------------------- /meshes2/objects/AntipodalSampler.py: -------------------------------------------------------------------------------- 1 | import trimesh 2 | import numpy as np 3 | 4 | # SCALE = 0.004 5 | # MAX_OPENING_WIDTH = 0.085 6 | # MARGIN = 0.005 7 | # SAMPLE_POINT_NUM = 3000 8 | # 9 | # mesh = trimesh.load_mesh('828d1b43814fc98c93b89bfd41acaad0.obj') 10 | # mesh.apply_scale(SCALE) 11 | # 12 | # points, faceIndices = trimesh.sample.sample_surface_even(mesh, SAMPLE_POINT_NUM) 13 | # faceNormals = mesh.face_normals 14 | # 15 | # pointNum = np.size(points, 0) 16 | # 17 | # ray_origins = np.empty([pointNum, 3], dtype=float) 18 | # ray_directions = np.empty([pointNum, 3], dtype=float) 19 | # 20 | # for index in range(pointNum): 21 | # point = points[index] 22 | # normal_inward = faceNormals[faceIndices[index]] * -1 23 | # ray_origins[index] = point - normal_inward * MARGIN 24 | # ray_directions[index] = normal_inward 25 | # 26 | # locations, index_ray, index_tri = mesh.ray.intersects_location(ray_origins=ray_origins, ray_directions=ray_directions) 27 | # 28 | # ray_visualize = trimesh.load_path(np.hstack((ray_origins, 29 | # ray_origins + ray_directions * MAX_OPENING_WIDTH)).reshape(-1, 2, 3)) 30 | # 31 | # mesh.visual.face_colors = [155,155,155,255] 32 | # mesh.visual.face_colors[index_tri] = [255, 0, 0, 255] 33 | # print(np.size(locations, 0)) 34 | # scene = trimesh.Scene([mesh, 35 | # ray_visualize]) 36 | # # show the visualization 37 | # scene.show() 38 | 39 | 40 | """ 41 | sample points from a mesh file 42 | """ 43 | class AntipodalSampler: 44 | 45 | """ 46 | input: 47 | mesh: mesh of object 48 | scale: ratio to rescale the mesh 49 | maxOpeningWidth: maximum gripper opening width 50 | margin: the min distance of planned gripper tips to the surface of object 51 | samplePointNum: num of points sampled from the object surface 52 | """ 53 | def __init__(self, meshFile, scale=1, maxOpeningWidth=0.085, minOpeningWidth=0.003, samplePointNum=1000, mu=0.1): 54 | self.mesh = trimesh.load_mesh(meshFile) 55 | self.faceNormals = self.mesh.face_normals 56 | # rescale 57 | self.mesh.apply_scale(scale) 58 | self.maxOpeningWidth = maxOpeningWidth 59 | self.minOpeningWidth = minOpeningWidth 60 | self.samplePointNum = samplePointNum 61 | self.surfacePoints, self.faceIndices = trimesh.sample.sample_surface_even(self.mesh, self.samplePointNum) 62 | self.mu = mu 63 | 64 | """ 65 | return: 66 | list of antipodal point pairs : ndarray num * 2 * 3 67 | """ 68 | def sample_antipodal_points(self): 69 | pointNum = np.size(self.surfacePoints, 0) 70 | 71 | # generate the ray 72 | rayOrigins = np.empty([pointNum, 3], dtype=float) 73 | rayDirections = np.empty([pointNum, 3], dtype=float) 74 | 75 | for index in range(pointNum): 76 | point = self.surfacePoints[index] 77 | inwardNormal = self.faceNormals[self.faceIndices[index]] * -1 78 | rayOrigins[index] = point + inwardNormal * self.minOpeningWidth # avoid intersect_points that are too close 79 | rayDirections[index] = inwardNormal 80 | 81 | intersectPoints, indicesOfRay, indicesOfFace = self.mesh.ray.intersects_location(ray_origins=rayOrigins, 82 | ray_directions=rayDirections) 83 | 84 | processedPairIndices = self.__removeRedundantPairs(intersectPoints, indicesOfRay, indicesOfFace) 85 | processedPairNum = len(processedPairIndices) 86 | processedPair = np.empty([processedPairNum, 2, 3]) 87 | count = 0 88 | for index in processedPairIndices: 89 | processedPair[count][0] = rayOrigins[ indicesOfRay[index] ] 90 | processedPair[count][1] = intersectPoints[index] 91 | 92 | return processedPair 93 | 94 | def __removeRedundantPairs(self, intersectPoints, indicesOfRay, indicesOfFace): 95 | pairNum = np.size(intersectPoints, 0) 96 | processedIndices = [] 97 | for index in range(pairNum): 98 | if 1: 99 | # TODO dis too large / direction not match 100 | processedIndices.append(index) 101 | 102 | return processedIndices 103 | 104 | def visualization(self, processedPair): 105 | processedRayOrigin = processedPair[:, 0, :] 106 | # TODO visualization for test 107 | # processedRayDirectionUnNormalized = (processedRayOrigin - processedPair[:, 1, :]) 108 | 109 | def _direction_normalize(self, directionUnNormalized): 110 | # TODO normalize the list of vector 111 | for vec in directionUnNormalized: 112 | pass 113 | 114 | 115 | -------------------------------------------------------------------------------- /meshes2/objects/trimesh_test.py: -------------------------------------------------------------------------------- 1 | import trimesh 2 | import numpy as np 3 | mesh = trimesh.load_mesh('828d1b43814fc98c93b89bfd41acaad0.obj') 4 | # mesh.is_watertight) 5 | # mesh.fill_holes() 6 | # mesh.convex_hull 7 | # if not mesh.is_watertight: 8 | # if not mesh.fill_holes(): 9 | # mesh = mesh.convex_hull 10 | # mesh.show() 11 | mesh.apply_scale(0.003) 12 | 13 | points, faceIndices = trimesh.sample.sample_surface_even(mesh, 3000) 14 | faceNormals = mesh.face_normals 15 | print(np.size(points, 0)) 16 | # for index in range(np.size(points, 0)): 17 | # point = points[index] 18 | # faceIndex = faceIndices[index] 19 | # normalVector = faceNormals[faceIndex] 20 | # print(point) 21 | # print(faceIndex) 22 | # print(normalVector) 23 | # print('-----------------') 24 | 25 | # ray test 26 | ray_origins = np.array([ points[0] + faceNormals[ faceIndices[0]] * 0.005 ]) 27 | ray_directions = np.array([ faceNormals[ faceIndices[0]] * -1 ]) 28 | locations, index_ray, index_tri = mesh.ray.intersects_location(ray_origins=ray_origins, 29 | ray_directions=ray_directions) 30 | print(ray_origins) 31 | print('The rays hit the mesh at coordinates:\n', locations) 32 | ray_length = 0.080 33 | ray_visualize = trimesh.load_path(np.hstack((ray_origins, 34 | ray_origins + ray_directions * ray_length)).reshape(-1, 2, 3)) 35 | 36 | # unmerge so viewer doesn't smooth 37 | mesh.unmerge_vertices() 38 | # make mesh white- ish 39 | mesh.visual.face_colors = [155,155,155,255] 40 | mesh.visual.face_colors[index_tri] = [255, 0, 0, 255] 41 | # create a visualization scene with rays, hits, and mesh 42 | scene = trimesh.Scene([mesh, 43 | ray_visualize]) 44 | # show the visualization 45 | scene.show() 46 | 47 | 48 | # sudo apt install python3-rtree 49 | # pip install rtree 50 | 51 | -------------------------------------------------------------------------------- /models/DQN_UR5_zori_00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/models/DQN_UR5_zori_00 -------------------------------------------------------------------------------- /models/DQN_UR5_zori_01: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/models/DQN_UR5_zori_01 -------------------------------------------------------------------------------- /models/DQN_UR5_zori_02: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/models/DQN_UR5_zori_02 -------------------------------------------------------------------------------- /net10.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | from torch.autograd import Variable 9 | FLOAT = torch.FloatTensor 10 | 11 | class Actor(nn.Module): 12 | def __init__(self): 13 | super(Actor, self).__init__() 14 | self.fc1 = nn.Linear(13, 128) 15 | self.fc2 = nn.Linear(128, 128) 16 | #self.fc3 = nn.Linear(256, 256) 17 | self.fc4 = nn.LSTMCell(128, 128) 18 | self.fc5 = nn.Linear(128, 4) 19 | 20 | self.L1=nn.LayerNorm(128) 21 | self.L2=nn.LayerNorm(128) 22 | #self.L3=nn.LayerNorm(256) 23 | self.L4=nn.LayerNorm(128) 24 | self.L5=nn.LayerNorm(4) 25 | 26 | self.cx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 27 | self.hx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 28 | 29 | nn.init.kaiming_normal_(self.fc1.weight.data) 30 | nn.init.kaiming_normal_(self.fc2.weight.data) 31 | #nn.init.kaiming_normal_(self.fc3.weight.data) 32 | nn.init.kaiming_normal_(self.fc5.weight.data) 33 | 34 | def forward(self, x,hidden_state=None): 35 | x = self.fc1(x) 36 | x = F.gelu(self.L1(x)) 37 | x = self.fc2(x) 38 | x = F.gelu(self.L2(x)) 39 | #x = self.fc3(x) 40 | # x = F.gelu(self.L3(x)) 41 | 42 | if hidden_state==None: 43 | x=x.unsqueeze(0) 44 | hx, cx =self.fc4(x,(self.hx,self.cx)) 45 | self.hx=hx 46 | self.cx=cx 47 | else: 48 | hx,cx=self.fc4(x,hidden_state) 49 | 50 | x=hx 51 | x = self.fc5(x) 52 | x=F.tanh(self.L5(x)) # -1 ~ 1 53 | 54 | return x,(hx,cx) 55 | 56 | def reset(self,done=True): 57 | if done==True: 58 | self.cx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 59 | self.hx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 60 | else: 61 | self.cx=Variable(self.cx.data).type(FLOAT).to('cuda') 62 | self.hx=Variable(self.hx.data).type(FLOAT).to('cuda') 63 | 64 | 65 | class Critic(nn.Module): 66 | def __init__(self): 67 | super(Critic, self).__init__() 68 | self.fc1 = nn.Linear(13, 128) 69 | self.fc2_1 = nn.Linear(128, 128) 70 | self.L1=nn.LayerNorm(128) 71 | 72 | nn.init.kaiming_normal_(self.fc1.weight.data) 73 | nn.init.kaiming_normal_(self.fc2_1.weight.data) 74 | 75 | #self.fc1_1=nn.LSTM(3,128,1) 76 | self.fc1_1 = nn.Linear(4, 256) 77 | self.L2=nn.LayerNorm(256) 78 | self.fc2_2 = nn.Linear(256,128) 79 | #self.fc3 = nn.Linear(256, 256) 80 | self.fc4 = nn.Linear(256, 128) 81 | self.fc5 = nn.Linear(128, 1) 82 | 83 | nn.init.kaiming_normal_(self.fc1_1.weight.data) 84 | nn.init.kaiming_normal_(self.fc2_2.weight.data) 85 | #nn.init.kaiming_normal_(self.fc3.weight.data) 86 | nn.init.kaiming_normal_(self.fc4.weight.data) 87 | nn.init.kaiming_normal_(self.fc5.weight.data) 88 | 89 | def forward(self, x1, a1): 90 | x1 = self.fc1(x1) 91 | x1=F.gelu(self.L1(x1)) 92 | x1 = F.gelu(self.fc2_1(x1)) 93 | a1 = self.fc1_1(a1) 94 | a1=F.gelu(self.L2(a1)) 95 | a1 = F.gelu(self.fc2_2(a1)) 96 | x1a1 = torch.cat([x1,a1], dim = 1) # [32 + 32] 97 | #x = F.gelu(self.fc3(x1a1)) 98 | x = F.gelu(self.fc4(x1a1)) 99 | x = self.fc5(x) 100 | 101 | return x -------------------------------------------------------------------------------- /net11.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | from torch.autograd import Variable 9 | FLOAT = torch.FloatTensor 10 | 11 | class Actor(nn.Module): 12 | def __init__(self): 13 | super(Actor, self).__init__() 14 | self.fc1 = nn.Linear(13, 256) 15 | #self.fc2 = nn.Linear(256, 256) 16 | self.fc3 = nn.LSTMCell(256, 128) 17 | self.fc4 = nn.Linear(128, 4) 18 | 19 | self.L1=nn.LayerNorm(256) 20 | #self.L2=nn.LayerNorm(256) 21 | self.L3=nn.LayerNorm(128) 22 | self.L4=nn.LayerNorm(4) 23 | 24 | self.cx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 25 | self.hx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 26 | 27 | nn.init.kaiming_normal_(self.fc1.weight.data) 28 | #nn.init.kaiming_normal_(self.fc2.weight.data) 29 | #nn.init.kaiming_normal_(self.fc3.weight.data) 30 | nn.init.kaiming_normal_(self.fc4.weight.data) 31 | 32 | def forward(self, x,hidden_state=None): 33 | x = self.fc1(x) 34 | x = F.gelu(self.L1(x)) 35 | #x = self.fc2(x) 36 | #x = F.gelu(self.L2(x)) 37 | 38 | if hidden_state==None: 39 | x=x.unsqueeze(0) 40 | hx, cx =self.fc3(x,(self.hx,self.cx)) 41 | self.hx=hx 42 | self.cx=cx 43 | else: 44 | hx,cx=self.fc3(x,hidden_state) 45 | 46 | x=hx 47 | x = self.fc4(x) 48 | x=F.tanh(self.L4(x)) # -1 ~ 1 49 | 50 | return x,(hx,cx) 51 | 52 | def reset(self,done=True): 53 | if done==True: 54 | self.cx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 55 | self.hx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 56 | else: 57 | self.cx=Variable(self.cx.data).type(FLOAT).to('cuda') 58 | self.hx=Variable(self.hx.data).type(FLOAT).to('cuda') 59 | 60 | 61 | class Critic(nn.Module): 62 | def __init__(self): 63 | super(Critic, self).__init__() 64 | self.fc1 = nn.Linear(13, 256) 65 | #self.fc2_1 = nn.Linear(256, 128) 66 | self.L1=nn.LayerNorm(256) 67 | 68 | nn.init.kaiming_normal_(self.fc1.weight.data) 69 | # nn.init.kaiming_normal_(self.fc2_1.weight.data) 70 | 71 | #self.fc1_1=nn.LSTM(3,128,1) 72 | self.fc1_1 = nn.Linear(4, 256) 73 | self.L2=nn.LayerNorm(256) 74 | # self.fc2_2 = nn.Linear(256,128) 75 | self.fc3 = nn.Linear(512, 128) 76 | self.fc4 = nn.Linear(128, 1) 77 | 78 | nn.init.kaiming_normal_(self.fc1_1.weight.data) 79 | # nn.init.kaiming_normal_(self.fc2_2.weight.data) 80 | nn.init.kaiming_normal_(self.fc3.weight.data) 81 | nn.init.kaiming_normal_(self.fc4.weight.data) 82 | 83 | def forward(self, x1, a1): 84 | x1 = self.fc1(x1) 85 | x1=F.gelu(self.L1(x1)) 86 | #x1 = F.gelu(self.fc2_1(x1)) 87 | a1 = self.fc1_1(a1) 88 | a1=F.gelu(self.L2(a1)) 89 | #a1 = F.gelu(self.fc2_2(a1)) 90 | x1a1 = torch.cat([x1,a1], dim = 1) # [32 + 32] 91 | x = F.gelu(self.fc3(x1a1)) 92 | x = self.fc4(x) 93 | 94 | return x -------------------------------------------------------------------------------- /net12.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | from torch.autograd import Variable 9 | FLOAT = torch.FloatTensor 10 | 11 | class Actor(nn.Module): 12 | def __init__(self): 13 | super(Actor, self).__init__() 14 | self.fc1 = nn.Linear(13, 256) 15 | self.fc2 = nn.Linear(256, 256) 16 | self.fc3 = nn.LSTMCell(256, 128) 17 | self.fc4 = nn.Linear(128, 4) 18 | 19 | self.L1=nn.LayerNorm(256) 20 | self.L2=nn.LayerNorm(256) 21 | self.L3=nn.LayerNorm(128) 22 | self.L4=nn.LayerNorm(4) 23 | 24 | self.cx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 25 | self.hx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 26 | 27 | nn.init.kaiming_normal_(self.fc1.weight.data) 28 | nn.init.kaiming_normal_(self.fc2.weight.data) 29 | #nn.init.kaiming_normal_(self.fc3.weight.data) 30 | nn.init.kaiming_normal_(self.fc4.weight.data) 31 | 32 | def forward(self, x,hidden_state=None): 33 | x = self.fc1(x) 34 | x = F.gelu(self.L1(x)) 35 | x = self.fc2(x) 36 | x = F.gelu(self.L2(x)) 37 | 38 | if hidden_state==None: 39 | x=x.unsqueeze(0) 40 | hx, cx =self.fc3(x,(self.hx,self.cx)) 41 | self.hx=hx 42 | self.cx=cx 43 | else: 44 | hx,cx=self.fc3(x,hidden_state) 45 | 46 | x=hx 47 | x = self.fc4(x) 48 | x=F.tanh(self.L4(x)) # -1 ~ 1 49 | 50 | return x,(hx,cx) 51 | 52 | def reset(self,done=True): 53 | if done==True: 54 | self.cx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 55 | self.hx=Variable(torch.zeros(1,128)).type(FLOAT).to('cuda') 56 | else: 57 | self.cx=Variable(self.cx.data).type(FLOAT).to('cuda') 58 | self.hx=Variable(self.hx.data).type(FLOAT).to('cuda') 59 | 60 | 61 | class Critic(nn.Module): 62 | def __init__(self): 63 | super(Critic, self).__init__() 64 | self.fc1 = nn.Linear(13, 256) 65 | self.fc2_1 = nn.Linear(256, 128) 66 | self.L1=nn.LayerNorm(256) 67 | 68 | nn.init.kaiming_normal_(self.fc1.weight.data) 69 | nn.init.kaiming_normal_(self.fc2_1.weight.data) 70 | 71 | #self.fc1_1=nn.LSTM(3,128,1) 72 | self.fc1_1 = nn.Linear(4, 256) 73 | self.L2=nn.LayerNorm(256) 74 | self.fc2_2 = nn.Linear(256,128) 75 | self.fc3 = nn.Linear(256, 128) 76 | self.fc4 = nn.Linear(128, 1) 77 | 78 | nn.init.kaiming_normal_(self.fc1_1.weight.data) 79 | nn.init.kaiming_normal_(self.fc2_2.weight.data) 80 | nn.init.kaiming_normal_(self.fc3.weight.data) 81 | nn.init.kaiming_normal_(self.fc4.weight.data) 82 | 83 | def forward(self, x1, a1): 84 | x1 = self.fc1(x1) 85 | x1=F.gelu(self.L1(x1)) 86 | x1 = F.gelu(self.fc2_1(x1)) 87 | a1 = self.fc1_1(a1) 88 | a1=F.gelu(self.L2(a1)) 89 | a1 = F.gelu(self.fc2_2(a1)) 90 | x1a1 = torch.cat([x1,a1], dim = 1) # [32 + 32] 91 | x = F.gelu(self.fc3(x1a1)) 92 | x = self.fc4(x) 93 | 94 | return x 95 | 96 | class RND(nn.Module): 97 | def __init__(self): 98 | super(RND,self).__init__() 99 | 100 | self.p1=nn.Linear(13,128) 101 | self.p2=nn.Linear(128,128) 102 | 103 | self.t1=nn.Linear(13,128) 104 | self.t2=nn.Linear(128,128) 105 | 106 | #nn.init.kaiming_normal_(self.p1.weight.data) 107 | #nn.init.kaiming_normal_(self.p2.weight.data) 108 | nn.init.kaiming_normal_(self.t1.weight.data) 109 | nn.init.kaiming_normal_(self.t2.weight.data) 110 | 111 | for p in self.t1.parameters(): 112 | p.requires_grad=False 113 | for p in self.t2.parameters(): 114 | p.requires_grad=False 115 | 116 | def forward(self,x): 117 | ta=F.gelu(self.t1(x)) 118 | ta=self.t2(ta) 119 | pr=F.gelu(self.p1(x)) 120 | pr=self.p2(pr) 121 | return ta,pr -------------------------------------------------------------------------------- /net13.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | 9 | class Actor(nn.Module): 10 | def __init__(self): 11 | super(Actor, self).__init__() 12 | self.fc1 = nn.Linear(13, 128) 13 | self.fc2 = nn.Linear(128, 128) 14 | self.fc3 = nn.Linear(128, 128) 15 | self.fc4 = nn.Linear(128, 4) 16 | 17 | self.L1=nn.LayerNorm(128) 18 | self.L2=nn.LayerNorm(128) 19 | self.L3=nn.LayerNorm(128) 20 | self.L4=nn.LayerNorm(4) 21 | 22 | nn.init.kaiming_normal_(self.fc1.weight.data) 23 | nn.init.kaiming_normal_(self.fc2.weight.data) 24 | nn.init.kaiming_normal_(self.fc3.weight.data) 25 | nn.init.kaiming_normal_(self.fc4.weight.data) 26 | 27 | def forward(self, x): 28 | x = self.fc1(x) 29 | x = F.gelu(self.L1(x)) 30 | x = self.fc2(x) 31 | x = F.gelu(self.L2(x)) 32 | x = self.fc3(x) 33 | x = F.gelu(self.L3(x)) 34 | x = self.fc4(x) 35 | x=F.tanh(self.L4(x)) # -1 ~ 1 36 | 37 | return x 38 | 39 | class Critic(nn.Module): 40 | def __init__(self): 41 | super(Critic, self).__init__() 42 | self.fc1 = nn.Linear(13, 128) 43 | #self.fc1=nn.LSTM(8,128,1) 44 | self.fc2_1 = nn.Linear(128, 64) 45 | self.L1=nn.LayerNorm(128) 46 | 47 | nn.init.kaiming_normal_(self.fc1.weight.data) 48 | nn.init.kaiming_normal_(self.fc2_1.weight.data) 49 | 50 | #self.fc1_1=nn.LSTM(3,128,1) 51 | self.fc1_1 = nn.Linear(4, 128) 52 | self.L2=nn.LayerNorm(128) 53 | self.fc2_2 = nn.Linear(128,64) 54 | self.fc3 = nn.Linear(128, 128) 55 | self.fc4 = nn.Linear(128, 1) 56 | 57 | nn.init.kaiming_normal_(self.fc1_1.weight.data) 58 | nn.init.kaiming_normal_(self.fc2_2.weight.data) 59 | nn.init.kaiming_normal_(self.fc3.weight.data) 60 | nn.init.kaiming_normal_(self.fc4.weight.data) 61 | 62 | def forward(self, x1, a1): 63 | x1 = self.fc1(x1) 64 | x1=F.gelu(self.L1(x1)) 65 | x1 = F.gelu(self.fc2_1(x1)) 66 | a1 = self.fc1_1(a1) 67 | a1=F.gelu(self.L2(a1)) 68 | a1 = F.gelu(self.fc2_2(a1)) 69 | x1a1 = torch.cat([x1,a1], dim = 1) # [32 + 32] 70 | x = F.gelu(self.fc3(x1a1)) 71 | x = self.fc4(x) 72 | 73 | return x 74 | 75 | class RND(nn.Module): 76 | def __init__(self): 77 | super(RND,self).__init__() 78 | 79 | self.p1=nn.Linear(13,128) 80 | self.p2=nn.Linear(128,128) 81 | 82 | self.t1=nn.Linear(13,128) 83 | self.t2=nn.Linear(128,128) 84 | 85 | #nn.init.kaiming_normal_(self.p1.weight.data) 86 | #nn.init.kaiming_normal_(self.p2.weight.data) 87 | nn.init.kaiming_normal_(self.t1.weight.data) 88 | nn.init.kaiming_normal_(self.t2.weight.data) 89 | 90 | for p in self.t1.parameters(): 91 | p.requires_grad=False 92 | for p in self.t2.parameters(): 93 | p.requires_grad=False 94 | 95 | def forward(self,x): 96 | ta=F.gelu(self.t1(x)) 97 | ta=self.t2(ta) 98 | pr=F.gelu(self.p1(x)) 99 | pr=self.p2(pr) 100 | return ta,pr 101 | -------------------------------------------------------------------------------- /net2.py: -------------------------------------------------------------------------------- 1 | import random 2 | import numpy as np 3 | 4 | import torch 5 | import torch.nn as nn 6 | import torch.optim as optim 7 | import torch.nn.functional as F 8 | from torch.autograd import Variable 9 | 10 | class DQN(nn.Module): 11 | def __init__(self): 12 | super(DQN, self).__init__() 13 | 14 | self.feature = nn.Linear(11,128) 15 | 16 | self.a1 =nn.Linear(128, 128) 17 | self.a2=nn.Linear(128, 9) 18 | 19 | 20 | self.v1 =nn.Linear(128, 128) 21 | self.v2=nn.Linear(128, 1) 22 | 23 | 24 | def forward(self, x): 25 | x = F.gelu(self.feature(x)) 26 | advantage = F.gelu(self.a1(x)) 27 | advantage=self.a2(advantage) 28 | value = F.gelu(self.v1(x)) 29 | value=self.v2(value) 30 | return value + advantage - advantage.mean() 31 | 32 | def act(self, state, epsilon): 33 | seed=random.random() 34 | if seed > epsilon: 35 | state = Variable(torch.FloatTensor(state).unsqueeze(0)).detach() 36 | q_value = self.forward(state).view(-1,9) 37 | #print(torch.max(q_value[0],0)[1]) 38 | action = torch.max(q_value[0],0)[1] 39 | #print(q_value,action) 40 | else: 41 | action = random.randrange(9) 42 | return int(action) -------------------------------------------------------------------------------- /net3.py: -------------------------------------------------------------------------------- 1 | import random 2 | import numpy as np 3 | 4 | import torch 5 | import torch.nn as nn 6 | import torch.optim as optim 7 | import torch.nn.functional as F 8 | from torch.autograd import Variable 9 | 10 | class DQN(nn.Module): 11 | def __init__(self): 12 | super(DQN, self).__init__() 13 | 14 | self.feature = nn.Linear(17,128) 15 | 16 | self.a1 =nn.Linear(128, 128) 17 | self.a2=nn.Linear(128, 9) 18 | 19 | 20 | self.v1 =nn.Linear(128, 128) 21 | self.v2=nn.Linear(128, 1) 22 | 23 | 24 | def forward(self, x): 25 | x = F.gelu(self.feature(x)) 26 | advantage = F.gelu(self.a1(x)) 27 | advantage=self.a2(advantage) 28 | value = F.gelu(self.v1(x)) 29 | value=self.v2(value) 30 | return value + advantage - advantage.mean() 31 | 32 | def act(self, state, epsilon): 33 | seed=random.random() 34 | if seed > epsilon: 35 | state = Variable(torch.FloatTensor(state).unsqueeze(0)).detach() 36 | q_value = self.forward(state).view(-1,9) 37 | #print(torch.max(q_value[0],0)[1]) 38 | action = torch.max(q_value[0],0)[1] 39 | #print(q_value,action) 40 | else: 41 | action = random.randrange(9) 42 | return int(action) -------------------------------------------------------------------------------- /net4.py: -------------------------------------------------------------------------------- 1 | import random 2 | import numpy as np 3 | 4 | import torch 5 | import torch.nn as nn 6 | import torch.optim as optim 7 | import torch.nn.functional as F 8 | from torch.autograd import Variable 9 | 10 | class DQN(nn.Module): 11 | def __init__(self): 12 | super(DQN, self).__init__() 13 | 14 | self.feature = nn.Linear(15,128) 15 | 16 | self.a1 =nn.Linear(128, 128) 17 | self.a2 =nn.Linear(128, 128) 18 | self.a3=nn.Linear(128, 7) 19 | 20 | 21 | self.v1 =nn.Linear(128, 128) 22 | self.v2=nn.Linear(128, 128) 23 | self.v3=nn.Linear(128, 1) 24 | 25 | 26 | def forward(self, x): 27 | x = F.gelu(self.feature(x)) 28 | advantage = F.gelu(self.a1(x)) 29 | advantage=F.gelu(self.a2(advantage)) 30 | advantage=self.a3(advantage) 31 | value = F.gelu(self.v1(x)) 32 | value=F.gelu(self.v2(value)) 33 | value=self.v3(value) 34 | return value + advantage - advantage.mean() 35 | 36 | def act(self, state, epsilon): 37 | seed=random.random() 38 | if seed > epsilon: 39 | state = Variable(torch.FloatTensor(state).unsqueeze(0)).detach() 40 | q_value = self.forward(state).view(-1,7) 41 | #print(torch.max(q_value[0],0)[1]) 42 | action = torch.max(q_value[0],0)[1] 43 | #print(q_value,action) 44 | else: 45 | action = random.randrange(7) 46 | return int(action) -------------------------------------------------------------------------------- /net5.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | 9 | class Actor(nn.Module): 10 | def __init__(self): 11 | super(Actor, self).__init__() 12 | self.fc1 = nn.Linear(13, 256) 13 | self.fc2 = nn.Linear(256, 256) 14 | self.fc3 = nn.Linear(256, 128) 15 | self.fc4 = nn.Linear(128, 4) 16 | 17 | self.L1=nn.LayerNorm(256) 18 | self.L2=nn.LayerNorm(256) 19 | self.L3=nn.LayerNorm(128) 20 | self.L4=nn.LayerNorm(4) 21 | 22 | nn.init.kaiming_normal_(self.fc1.weight.data) 23 | nn.init.kaiming_normal_(self.fc2.weight.data) 24 | nn.init.kaiming_normal_(self.fc3.weight.data) 25 | nn.init.kaiming_normal_(self.fc4.weight.data) 26 | 27 | def forward(self, x): 28 | x = self.fc1(x) 29 | x = F.gelu(self.L1(x)) 30 | x = self.fc2(x) 31 | x = F.gelu(self.L2(x)) 32 | x = self.fc3(x) 33 | x = F.gelu(self.L3(x)) 34 | x = self.fc4(x) 35 | x=F.tanh(self.L4(x)) # -1 ~ 1 36 | 37 | return x 38 | 39 | class Critic(nn.Module): 40 | def __init__(self): 41 | super(Critic, self).__init__() 42 | self.fc1 = nn.Linear(13, 256) 43 | self.fc2_1 = nn.Linear(256, 128) 44 | self.L1=nn.LayerNorm(256) 45 | 46 | nn.init.kaiming_normal_(self.fc1.weight.data) 47 | nn.init.kaiming_normal_(self.fc2_1.weight.data) 48 | 49 | #self.fc1_1=nn.LSTM(3,128,1) 50 | self.fc1_1 = nn.Linear(4, 256) 51 | self.L2=nn.LayerNorm(256) 52 | self.fc2_2 = nn.Linear(256,128) 53 | self.fc3 = nn.Linear(256, 128) 54 | self.fc4 = nn.Linear(128, 1) 55 | 56 | nn.init.kaiming_normal_(self.fc1_1.weight.data) 57 | nn.init.kaiming_normal_(self.fc2_2.weight.data) 58 | nn.init.kaiming_normal_(self.fc3.weight.data) 59 | nn.init.kaiming_normal_(self.fc4.weight.data) 60 | 61 | def forward(self, x1, a1): 62 | x1 = self.fc1(x1) 63 | x1=F.gelu(self.L1(x1)) 64 | x1 = F.gelu(self.fc2_1(x1)) 65 | a1 = self.fc1_1(a1) 66 | a1=F.gelu(self.L2(a1)) 67 | a1 = F.gelu(self.fc2_2(a1)) 68 | x1a1 = torch.cat([x1,a1], dim = 1) # [32 + 32] 69 | x = F.gelu(self.fc3(x1a1)) 70 | x = self.fc4(x) 71 | 72 | return x -------------------------------------------------------------------------------- /net6.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | 9 | class Actor_net(nn.Module): 10 | def __init__(self): 11 | super(Actor_net, self).__init__() 12 | self.fc1 = nn.Linear(13, 128) 13 | self.fc2 = nn.Linear(128, 128) 14 | self.fc3 = nn.Linear(128, 128) 15 | 16 | self.f_mean = nn.Linear(128, 4) 17 | self.f_std=nn.Linear(128,4) 18 | 19 | nn.init.kaiming_normal_(self.fc1.weight.data) 20 | nn.init.kaiming_normal_(self.fc2.weight.data) 21 | nn.init.kaiming_normal_(self.fc3.weight.data) 22 | nn.init.kaiming_normal_(self.f_mean.weight.data) 23 | nn.init.kaiming_normal_(self.f_std.weight.data) 24 | 25 | def forward(self, x): 26 | x = F.gelu(self.fc1(x)) 27 | x = F.gelu(self.fc2(x)) 28 | x= F.gelu(self.fc3(x)) 29 | 30 | mu = F.tanh(self.f_mean(x)) # -1 ~ 1 31 | std= F.softplus(self.f_std(x)) 32 | return mu,std 33 | 34 | class Critic_net(nn.Module): 35 | def __init__(self): 36 | super(Critic_net, self).__init__() 37 | self.fc1 = nn.Linear(13, 128) 38 | self.fc2 = nn.Linear(128, 128) 39 | self.fc3 = nn.Linear(128, 128) 40 | 41 | self.f_value = nn.Linear(128, 1) 42 | 43 | nn.init.kaiming_normal_(self.fc1.weight.data) 44 | nn.init.kaiming_normal_(self.fc2.weight.data) 45 | nn.init.kaiming_normal_(self.fc3.weight.data) 46 | nn.init.kaiming_normal_(self.f_value.weight.data) 47 | 48 | def forward(self, x): 49 | x = F.gelu(self.fc1(x)) 50 | x = F.gelu(self.fc2(x)) 51 | x= F.gelu(self.fc3(x)) 52 | 53 | out=self.f_value(x) 54 | 55 | return out 56 | -------------------------------------------------------------------------------- /net7.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | 9 | class Actor(nn.Module): 10 | def __init__(self): 11 | super(Actor, self).__init__() 12 | self.fc1 = nn.Linear(13, 128,1) 13 | #self.fc1=nn.LSTM(8,128) 14 | self.fc2 = nn.Linear(128, 128) 15 | self.fc3 = nn.Linear(128, 128) 16 | self.fc4 = nn.Linear(128, 3) 17 | 18 | self.L1=nn.LayerNorm(128) 19 | self.L2=nn.LayerNorm(128) 20 | self.L3=nn.LayerNorm(128) 21 | self.L4=nn.LayerNorm(3) 22 | 23 | nn.init.kaiming_normal_(self.fc1.weight.data) 24 | nn.init.kaiming_normal_(self.fc2.weight.data) 25 | nn.init.kaiming_normal_(self.fc3.weight.data) 26 | nn.init.kaiming_normal_(self.fc4.weight.data) 27 | 28 | def forward(self, x): 29 | x = self.fc1(x) 30 | x = F.gelu(self.L1(x)) 31 | x = self.fc2(x) 32 | x = F.gelu(self.L2(x)) 33 | x = self.fc3(x) 34 | x = F.gelu(self.L3(x)) 35 | x = self.fc4(x) 36 | x=F.tanh(self.L4(x)) # -1 ~ 1 37 | 38 | return x 39 | 40 | class Critic(nn.Module): 41 | def __init__(self): 42 | super(Critic, self).__init__() 43 | self.fc1 = nn.Linear(13, 128) 44 | #self.fc1=nn.LSTM(8,128,1) 45 | self.fc2_1 = nn.Linear(128, 64) 46 | self.L1=nn.LayerNorm(128) 47 | 48 | nn.init.kaiming_normal_(self.fc1.weight.data) 49 | nn.init.kaiming_normal_(self.fc2_1.weight.data) 50 | 51 | #self.fc1_1=nn.LSTM(3,128,1) 52 | self.fc1_1 = nn.Linear(3, 128) 53 | self.L2=nn.LayerNorm(128) 54 | self.fc2_2 = nn.Linear(128,64) 55 | self.fc3 = nn.Linear(128, 128) 56 | self.fc4 = nn.Linear(128, 1) 57 | 58 | nn.init.kaiming_normal_(self.fc1_1.weight.data) 59 | nn.init.kaiming_normal_(self.fc2_2.weight.data) 60 | nn.init.kaiming_normal_(self.fc3.weight.data) 61 | nn.init.kaiming_normal_(self.fc4.weight.data) 62 | 63 | def forward(self, x1, a1): 64 | x1 = self.fc1(x1) 65 | x1=F.gelu(self.L1(x1)) 66 | x1 = F.gelu(self.fc2_1(x1)) 67 | a1 = self.fc1_1(a1) 68 | a1=F.gelu(self.L2(a1)) 69 | a1 = F.gelu(self.fc2_2(a1)) 70 | x1a1 = torch.cat([x1,a1], dim = 1) # [32 + 32] 71 | x = F.gelu(self.fc3(x1a1)) 72 | x = self.fc4(x) 73 | 74 | return x -------------------------------------------------------------------------------- /net8.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | 9 | class Actor(nn.Module): 10 | def __init__(self): 11 | super(Actor, self).__init__() 12 | self.fc1 = nn.Linear(20, 128) 13 | #self.fc1=nn.LSTM(8,128) 14 | self.fc2 = nn.Linear(128, 512) 15 | self.fc3 = nn.Linear(512, 128) 16 | self.fc4 = nn.Linear(128, 3) 17 | 18 | self.L1=nn.LayerNorm(128) 19 | self.L2=nn.LayerNorm(512) 20 | self.L3=nn.LayerNorm(128) 21 | self.L4=nn.LayerNorm(3) 22 | 23 | nn.init.kaiming_normal_(self.fc1.weight.data) 24 | nn.init.kaiming_normal_(self.fc2.weight.data) 25 | nn.init.kaiming_normal_(self.fc3.weight.data) 26 | nn.init.kaiming_normal_(self.fc4.weight.data) 27 | 28 | def forward(self, x): 29 | x = self.fc1(x) 30 | x = F.gelu(self.L1(x)) 31 | x = self.fc2(x) 32 | x = F.gelu(self.L2(x)) 33 | x = self.fc3(x) 34 | x = F.gelu(self.L3(x)) 35 | x = self.fc4(x) 36 | x=F.tanh(self.L4(x)) # -1 ~ 1 37 | 38 | return x 39 | 40 | class Critic(nn.Module): 41 | def __init__(self): 42 | super(Critic, self).__init__() 43 | self.fc1 = nn.Linear(20, 128) 44 | #self.fc1=nn.LSTM(8,128,1) 45 | self.fc2_1 = nn.Linear(128, 256) 46 | self.L1=nn.LayerNorm(128) 47 | 48 | nn.init.kaiming_normal_(self.fc1.weight.data) 49 | nn.init.kaiming_normal_(self.fc2_1.weight.data) 50 | 51 | #self.fc1_1=nn.LSTM(3,128,1) 52 | self.fc1_1 = nn.Linear(3, 128) 53 | self.L2=nn.LayerNorm(128) 54 | self.fc2_2 = nn.Linear(128,256) 55 | self.fc3 = nn.Linear(512, 128) 56 | self.fc4 = nn.Linear(128, 1) 57 | 58 | nn.init.kaiming_normal_(self.fc1_1.weight.data) 59 | nn.init.kaiming_normal_(self.fc2_2.weight.data) 60 | nn.init.kaiming_normal_(self.fc3.weight.data) 61 | nn.init.kaiming_normal_(self.fc4.weight.data) 62 | 63 | def forward(self, x1, a1): 64 | x1 = self.fc1(x1) 65 | x1=F.gelu(self.L1(x1)) 66 | x1 = F.gelu(self.fc2_1(x1)) 67 | a1 = self.fc1_1(a1) 68 | a1=F.gelu(self.L2(a1)) 69 | a1 = F.gelu(self.fc2_2(a1)) 70 | x1a1 = torch.cat([x1,a1], dim = 1) # [32 + 32] 71 | x = F.gelu(self.fc3(x1a1)) 72 | x = self.fc4(x) 73 | 74 | return x -------------------------------------------------------------------------------- /net9.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import torch.optim as optim 5 | from torch.distributions import Categorical 6 | from torch.distributions import Normal 7 | import numpy as np 8 | 9 | class Actor(nn.Module): 10 | def __init__(self): 11 | super(Actor, self).__init__() 12 | self.fc1 = nn.Linear(13, 128) 13 | self.fc2 = nn.Linear(128, 128) 14 | self.fc3 = nn.Linear(128, 128) 15 | self.fc4 = nn.Linear(128, 3) 16 | 17 | self.L1=nn.LayerNorm(128) 18 | self.L2=nn.LayerNorm(128) 19 | self.L3=nn.LayerNorm(128) 20 | self.L4=nn.LayerNorm(3) 21 | 22 | nn.init.kaiming_normal_(self.fc1.weight.data) 23 | nn.init.kaiming_normal_(self.fc2.weight.data) 24 | nn.init.kaiming_normal_(self.fc3.weight.data) 25 | nn.init.kaiming_normal_(self.fc4.weight.data) 26 | 27 | def forward(self, x): 28 | x = self.fc1(x) 29 | x = F.gelu(self.L1(x)) 30 | x = self.fc2(x) 31 | x = F.gelu(self.L2(x)) 32 | x = self.fc3(x) 33 | x = F.gelu(self.L3(x)) 34 | x = self.fc4(x) 35 | x=F.tanh(self.L4(x)) # -1 ~ 1 36 | 37 | return x 38 | 39 | class Critic(nn.Module): 40 | def __init__(self): 41 | super(Critic, self).__init__() 42 | self.fc1 = nn.Linear(13, 128) 43 | #self.fc1=nn.LSTM(8,128,1) 44 | self.fc2_1 = nn.Linear(128, 64) 45 | self.L1=nn.LayerNorm(128) 46 | 47 | nn.init.kaiming_normal_(self.fc1.weight.data) 48 | nn.init.kaiming_normal_(self.fc2_1.weight.data) 49 | 50 | #self.fc1_1=nn.LSTM(3,128,1) 51 | self.fc1_1 = nn.Linear(3, 128) 52 | self.L2=nn.LayerNorm(128) 53 | self.fc2_2 = nn.Linear(128,64) 54 | self.fc3 = nn.Linear(128, 128) 55 | self.fc4 = nn.Linear(128, 1) 56 | 57 | nn.init.kaiming_normal_(self.fc1_1.weight.data) 58 | nn.init.kaiming_normal_(self.fc2_2.weight.data) 59 | nn.init.kaiming_normal_(self.fc3.weight.data) 60 | nn.init.kaiming_normal_(self.fc4.weight.data) 61 | 62 | def forward(self, x1, a1): 63 | x1 = self.fc1(x1) 64 | x1=F.gelu(self.L1(x1)) 65 | x1 = F.gelu(self.fc2_1(x1)) 66 | a1 = self.fc1_1(a1) 67 | a1=F.gelu(self.L2(a1)) 68 | a1 = F.gelu(self.fc2_2(a1)) 69 | x1a1 = torch.cat([x1,a1], dim = 1) # [32 + 32] 70 | x = F.gelu(self.fc3(x1a1)) 71 | x = self.fc4(x) 72 | 73 | return x -------------------------------------------------------------------------------- /per_d3qn_net.py: -------------------------------------------------------------------------------- 1 | import random 2 | import numpy as np 3 | 4 | import torch 5 | import torch.nn as nn 6 | import torch.optim as optim 7 | import torch.nn.functional as F 8 | from torch.autograd import Variable 9 | 10 | class DQN(nn.Module): 11 | def __init__(self): 12 | super(DQN, self).__init__() 13 | 14 | self.feature = nn.Linear(12,128) 15 | 16 | self.a1 =nn.Linear(128, 128) 17 | self.a2=nn.Linear(128, 7) 18 | 19 | 20 | self.v1 =nn.Linear(128, 128) 21 | self.v2=nn.Linear(128, 1) 22 | 23 | 24 | def forward(self, x): 25 | x = F.gelu(self.feature(x)) 26 | advantage = F.gelu(self.a1(x)) 27 | advantage=self.a2(advantage) 28 | value = F.gelu(self.v1(x)) 29 | value=self.v2(value) 30 | return value + advantage - advantage.mean() 31 | 32 | def act(self, state, epsilon): 33 | seed=random.random() 34 | if seed > epsilon: 35 | state = Variable(torch.FloatTensor(state).unsqueeze(0)).detach() 36 | q_value = self.forward(state).view(-1,7) 37 | #print(torch.max(q_value[0],0)[1]) 38 | action = torch.max(q_value[0],0)[1] 39 | #print(q_value,action) 40 | else: 41 | action = random.randrange(7) 42 | return int(action) -------------------------------------------------------------------------------- /plot.py: -------------------------------------------------------------------------------- 1 | 2 | a=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 3 | b=a[1000:] 4 | s=sum(b)/len(b) 5 | print(s,len(b)) -------------------------------------------------------------------------------- /prioritized_memory.py: -------------------------------------------------------------------------------- 1 | import random 2 | import numpy as np 3 | from SumTree import SumTree 4 | 5 | class Memory: # stored as ( s, a, r, s_ ) in SumTree 6 | e = 0.01 7 | a = 0.6 8 | beta = 0.4 9 | beta_increment_per_sampling = 0.001 10 | 11 | def __init__(self, capacity): 12 | self.tree = SumTree(capacity) 13 | self.capacity = capacity 14 | 15 | def _get_priority(self, error): 16 | return (np.abs(error) + self.e) ** self.a 17 | 18 | def add(self, error, sample): 19 | p = self._get_priority(error) 20 | self.tree.add(p, sample) 21 | 22 | def sample(self, n): 23 | batch = [] 24 | idxs = [] 25 | segment = self.tree.total() / n 26 | priorities = [] 27 | 28 | self.beta = np.min([1., self.beta + self.beta_increment_per_sampling]) 29 | 30 | for i in range(n): 31 | a = segment * i 32 | b = segment * (i + 1) 33 | 34 | s = random.uniform(a, b) 35 | (idx, p, data) = self.tree.get(s) 36 | priorities.append(p) 37 | batch.append(data) 38 | idxs.append(idx) 39 | 40 | sampling_probabilities = priorities / self.tree.total() 41 | is_weight = np.power(self.tree.n_entries * sampling_probabilities, -self.beta) 42 | if is_weight.max()==0: 43 | pass 44 | else: 45 | is_weight /= is_weight.max() 46 | 47 | return batch, idxs, is_weight 48 | 49 | def update(self, idx, error): 50 | p = self._get_priority(error) 51 | self.tree.update(idx, p) 52 | -------------------------------------------------------------------------------- /runs/2020-05-20_19-28-37_SAC_Allegro_Gaussian__00/events.out.tfevents.1589970517.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_19-28-37_SAC_Allegro_Gaussian__00/events.out.tfevents.1589970517.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_19-29-43_SAC_Allegro_Gaussian__00/events.out.tfevents.1589970583.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_19-29-43_SAC_Allegro_Gaussian__00/events.out.tfevents.1589970583.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_19-32-42_SAC_Allegro_Gaussian__00/events.out.tfevents.1589970762.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_19-32-42_SAC_Allegro_Gaussian__00/events.out.tfevents.1589970762.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_20-11-33_SAC_Allegro_Gaussian__00/events.out.tfevents.1589973093.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_20-11-33_SAC_Allegro_Gaussian__00/events.out.tfevents.1589973093.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_20-38-53_SAC_Allegro_Gaussian__00/events.out.tfevents.1589974733.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_20-38-53_SAC_Allegro_Gaussian__00/events.out.tfevents.1589974733.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_20-39-56_SAC_Allegro_Gaussian__00/events.out.tfevents.1589974796.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_20-39-56_SAC_Allegro_Gaussian__00/events.out.tfevents.1589974796.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_20-42-34_SAC_Allegro_Gaussian__00/events.out.tfevents.1589974954.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_20-42-34_SAC_Allegro_Gaussian__00/events.out.tfevents.1589974954.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_20-46-19_SAC_Allegro_Gaussian__00/events.out.tfevents.1589975179.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_20-46-19_SAC_Allegro_Gaussian__00/events.out.tfevents.1589975179.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_20-51-17_SAC_Allegro_Gaussian__00/events.out.tfevents.1589975477.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_20-51-17_SAC_Allegro_Gaussian__00/events.out.tfevents.1589975477.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_20-54-25_SAC_Allegro_Gaussian__00/events.out.tfevents.1589975665.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_20-54-25_SAC_Allegro_Gaussian__00/events.out.tfevents.1589975665.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_20-57-38_SAC_Allegro_Gaussian__00/events.out.tfevents.1589975858.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_20-57-38_SAC_Allegro_Gaussian__00/events.out.tfevents.1589975858.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-00-38_SAC_Allegro_Gaussian__00/events.out.tfevents.1589976038.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-00-38_SAC_Allegro_Gaussian__00/events.out.tfevents.1589976038.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-02-20_SAC_Allegro_Gaussian__00/events.out.tfevents.1589976140.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-02-20_SAC_Allegro_Gaussian__00/events.out.tfevents.1589976140.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-15-16_SAC_Allegro_Gaussian__00/events.out.tfevents.1589976916.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-15-16_SAC_Allegro_Gaussian__00/events.out.tfevents.1589976916.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-20-37_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977237.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-20-37_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977237.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-23-39_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977419.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-23-39_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977419.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-24-01_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977441.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-24-01_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977441.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-26-38_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977598.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-26-38_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977598.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-27-08_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977628.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-27-08_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977628.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-27-36_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977656.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-27-36_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977656.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-28-08_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977688.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-28-08_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977688.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-28-37_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977717.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-28-37_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977717.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-29-25_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977765.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-29-25_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977765.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-29-50_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977790.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-29-50_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977790.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-30-23_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977823.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-30-23_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977823.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-33-13_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977993.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-33-13_SAC_Allegro_Gaussian__00/events.out.tfevents.1589977993.gookrice -------------------------------------------------------------------------------- /runs/2020-05-20_21-41-03_SAC_Allegro_Gaussian__00/events.out.tfevents.1589978463.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-20_21-41-03_SAC_Allegro_Gaussian__00/events.out.tfevents.1589978463.gookrice -------------------------------------------------------------------------------- /runs/2020-05-21_10-00-10_SAC_Allegro_Gaussian__00/events.out.tfevents.1590022810.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-21_10-00-10_SAC_Allegro_Gaussian__00/events.out.tfevents.1590022810.gookrice -------------------------------------------------------------------------------- /runs/2020-05-21_10-09-02_SAC_Allegro_Gaussian__00/events.out.tfevents.1590023342.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-21_10-09-02_SAC_Allegro_Gaussian__00/events.out.tfevents.1590023342.gookrice -------------------------------------------------------------------------------- /runs/2020-05-21_11-06-24_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026784.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-21_11-06-24_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026784.gookrice -------------------------------------------------------------------------------- /runs/2020-05-21_11-07-51_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026871.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-21_11-07-51_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026871.gookrice -------------------------------------------------------------------------------- /runs/2020-05-21_11-08-11_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026891.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-21_11-08-11_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026891.gookrice -------------------------------------------------------------------------------- /runs/2020-05-21_11-08-48_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026928.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-21_11-08-48_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026928.gookrice -------------------------------------------------------------------------------- /runs/2020-05-21_11-09-32_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026972.gookrice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/runs/2020-05-21_11-09-32_SAC_Allegro_Gaussian__00/events.out.tfevents.1590026972.gookrice -------------------------------------------------------------------------------- /saved_model/fig.txt: -------------------------------------------------------------------------------- 1 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -------------------------------------------------------------------------------- /saved_model2/fig.txt: -------------------------------------------------------------------------------- 1 | [0, 0, 0, 0, 1, 0, 0, 0, 0] -------------------------------------------------------------------------------- /saved_model3/fig.txt: -------------------------------------------------------------------------------- 1 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -------------------------------------------------------------------------------- /saved_model3/model1200.3.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model3/model1200.3.pth -------------------------------------------------------------------------------- /saved_model3/model1200.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model3/model1200.pth -------------------------------------------------------------------------------- /saved_model44/Figure_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/Figure_1.png -------------------------------------------------------------------------------- /saved_model44/model1020.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1020.pth -------------------------------------------------------------------------------- /saved_model44/model1040.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1040.pth -------------------------------------------------------------------------------- /saved_model44/model1060.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1060.pth -------------------------------------------------------------------------------- /saved_model44/model1080.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1080.pth -------------------------------------------------------------------------------- /saved_model44/model1100.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1100.pth -------------------------------------------------------------------------------- /saved_model44/model1120.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1120.pth -------------------------------------------------------------------------------- /saved_model44/model1140.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1140.pth -------------------------------------------------------------------------------- /saved_model44/model1160.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1160.pth -------------------------------------------------------------------------------- /saved_model44/model1180.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1180.pth -------------------------------------------------------------------------------- /saved_model44/model1200.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1200.pth -------------------------------------------------------------------------------- /saved_model44/model1220.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1220.pth -------------------------------------------------------------------------------- /saved_model44/model1240.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1240.pth -------------------------------------------------------------------------------- /saved_model44/model1260.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1260.pth -------------------------------------------------------------------------------- /saved_model44/model1280.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1280.pth -------------------------------------------------------------------------------- /saved_model44/model1300.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1300.pth -------------------------------------------------------------------------------- /saved_model44/model1320.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1320.pth -------------------------------------------------------------------------------- /saved_model44/model1340.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1340.pth -------------------------------------------------------------------------------- /saved_model44/model1360.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1360.pth -------------------------------------------------------------------------------- /saved_model44/model1380.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1380.pth -------------------------------------------------------------------------------- /saved_model44/model1400.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1400.pth -------------------------------------------------------------------------------- /saved_model44/model1420.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1420.pth -------------------------------------------------------------------------------- /saved_model44/model1440.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1440.pth -------------------------------------------------------------------------------- /saved_model44/model1460.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1460.pth -------------------------------------------------------------------------------- /saved_model44/model1480.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1480.pth -------------------------------------------------------------------------------- /saved_model44/model1500.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1500.pth -------------------------------------------------------------------------------- /saved_model44/model1520.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1520.pth -------------------------------------------------------------------------------- /saved_model44/model1540.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1540.pth -------------------------------------------------------------------------------- /saved_model44/model1560.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1560.pth -------------------------------------------------------------------------------- /saved_model44/model1580.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1580.pth -------------------------------------------------------------------------------- /saved_model44/model1600.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1600.pth -------------------------------------------------------------------------------- /saved_model44/model1620.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1620.pth -------------------------------------------------------------------------------- /saved_model44/model1640.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1640.pth -------------------------------------------------------------------------------- /saved_model44/model1660.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1660.pth -------------------------------------------------------------------------------- /saved_model44/model1680.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1680.pth -------------------------------------------------------------------------------- /saved_model44/model1700.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1700.pth -------------------------------------------------------------------------------- /saved_model44/model1720.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1720.pth -------------------------------------------------------------------------------- /saved_model44/model1740.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1740.pth -------------------------------------------------------------------------------- /saved_model44/model1760.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1760.pth -------------------------------------------------------------------------------- /saved_model44/model1780.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1780.pth -------------------------------------------------------------------------------- /saved_model44/model1800.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1800.pth -------------------------------------------------------------------------------- /saved_model44/model1820.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1820.pth -------------------------------------------------------------------------------- /saved_model44/model1840.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1840.pth -------------------------------------------------------------------------------- /saved_model44/model1860.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1860.pth -------------------------------------------------------------------------------- /saved_model44/model1880.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1880.pth -------------------------------------------------------------------------------- /saved_model44/model1900.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1900.pth -------------------------------------------------------------------------------- /saved_model44/model1920.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1920.pth -------------------------------------------------------------------------------- /saved_model44/model1940.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1940.pth -------------------------------------------------------------------------------- /saved_model44/model1960.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1960.pth -------------------------------------------------------------------------------- /saved_model44/model1980.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model1980.pth -------------------------------------------------------------------------------- /saved_model44/model2000.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2000.pth -------------------------------------------------------------------------------- /saved_model44/model2020.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2020.pth -------------------------------------------------------------------------------- /saved_model44/model2040.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2040.pth -------------------------------------------------------------------------------- /saved_model44/model2060.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2060.pth -------------------------------------------------------------------------------- /saved_model44/model2080.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2080.pth -------------------------------------------------------------------------------- /saved_model44/model2100.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2100.pth -------------------------------------------------------------------------------- /saved_model44/model2120.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2120.pth -------------------------------------------------------------------------------- /saved_model44/model2140.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2140.pth -------------------------------------------------------------------------------- /saved_model44/model2160.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2160.pth -------------------------------------------------------------------------------- /saved_model44/model2180.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2180.pth -------------------------------------------------------------------------------- /saved_model44/model2200.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2200.pth -------------------------------------------------------------------------------- /saved_model44/model2220.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2220.pth -------------------------------------------------------------------------------- /saved_model44/model2240.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2240.pth -------------------------------------------------------------------------------- /saved_model44/model2260.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2260.pth -------------------------------------------------------------------------------- /saved_model44/model2280.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2280.pth -------------------------------------------------------------------------------- /saved_model44/model2300.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2300.pth -------------------------------------------------------------------------------- /saved_model44/model2320.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2320.pth -------------------------------------------------------------------------------- /saved_model44/model2340.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2340.pth -------------------------------------------------------------------------------- /saved_model44/model2360.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2360.pth -------------------------------------------------------------------------------- /saved_model44/model2380.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2380.pth -------------------------------------------------------------------------------- /saved_model44/model2400.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2400.pth -------------------------------------------------------------------------------- /saved_model44/model2420.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2420.pth -------------------------------------------------------------------------------- /saved_model44/model2440.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2440.pth -------------------------------------------------------------------------------- /saved_model44/model2460.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2460.pth -------------------------------------------------------------------------------- /saved_model44/model2480.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2480.pth -------------------------------------------------------------------------------- /saved_model44/model2500.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2500.pth -------------------------------------------------------------------------------- /saved_model44/model2520.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2520.pth -------------------------------------------------------------------------------- /saved_model44/model2540.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2540.pth -------------------------------------------------------------------------------- /saved_model44/model2560.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2560.pth -------------------------------------------------------------------------------- /saved_model44/model2580.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2580.pth -------------------------------------------------------------------------------- /saved_model44/model2600.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2600.pth -------------------------------------------------------------------------------- /saved_model44/model2620.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2620.pth -------------------------------------------------------------------------------- /saved_model44/model2640.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2640.pth -------------------------------------------------------------------------------- /saved_model44/model2660.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2660.pth -------------------------------------------------------------------------------- /saved_model44/model2680.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2680.pth -------------------------------------------------------------------------------- /saved_model44/model2700.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2700.pth -------------------------------------------------------------------------------- /saved_model44/model2720.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2720.pth -------------------------------------------------------------------------------- /saved_model44/model2740.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2740.pth -------------------------------------------------------------------------------- /saved_model44/model2760.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2760.pth -------------------------------------------------------------------------------- /saved_model44/model2780.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2780.pth -------------------------------------------------------------------------------- /saved_model44/model2800.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2800.pth -------------------------------------------------------------------------------- /saved_model44/model2820.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2820.pth -------------------------------------------------------------------------------- /saved_model44/model2840.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2840.pth -------------------------------------------------------------------------------- /saved_model44/model2860.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2860.pth -------------------------------------------------------------------------------- /saved_model44/model2880.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2880.pth -------------------------------------------------------------------------------- /saved_model44/model2900.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2900.pth -------------------------------------------------------------------------------- /saved_model44/model2920.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2920.pth -------------------------------------------------------------------------------- /saved_model44/model2940.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2940.pth -------------------------------------------------------------------------------- /saved_model44/model2960.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2960.pth -------------------------------------------------------------------------------- /saved_model44/model2980.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/saved_model44/model2980.pth -------------------------------------------------------------------------------- /sqnnet.py: -------------------------------------------------------------------------------- 1 | import random 2 | import numpy as np 3 | 4 | import torch 5 | import torch.nn as nn 6 | import torch.optim as optim 7 | import torch.nn.functional as F 8 | from torch.distributions import Normal 9 | init_w=3e-3 10 | 11 | 12 | class SoftQNetwork(nn.Module): 13 | def __init__(self): 14 | super(SoftQNetwork, self).__init__() 15 | 16 | self.linear1 = nn.Linear(14, 128) 17 | #self.linear2 = nn.Linear(128, 128) 18 | self.linear3 = nn.Linear(128, 128) 19 | self.linear4 = nn.Linear(128, 7) 20 | self.linear4.weight.data.uniform_(-init_w, init_w) 21 | self.linear4.bias.data.uniform_(-init_w, init_w) 22 | 23 | def forward(self, state): 24 | x=F.gelu(self.linear1(state)) 25 | #x = F.gelu(self.linear2(x)) 26 | x = F.gelu(self.linear3(x)) 27 | x=self.linear4(x) 28 | return x 29 | 30 | def get_action(self, state): 31 | state = torch.FloatTensor(state).unsqueeze(0)#.to('cuda') 32 | q_value = self.forward(state) 33 | policy= F.softmax(q_value).clamp(max=1-1e-20,min=1e-20) 34 | action = torch.multinomial(policy[0],1) 35 | #action = action.detach().cpu().numpy() 36 | #policy = policy.detach().numpy() 37 | return action[0] 38 | 39 | def entropy(self,state): 40 | state = state.unsqueeze(0)#.to('cuda') 41 | q_value =self.forward(state) 42 | policy=F.softmax(q_value[0]).clamp(max=1-1e-20,min=1e-20) 43 | entropy=-torch.sum(policy*torch.log(policy),dim=-1) 44 | policy = policy.detach() 45 | entropy = entropy.detach() 46 | return entropy 47 | -------------------------------------------------------------------------------- /temp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import math 4 | 5 | temp=[-0.08917862921953201, 0.6996442079544067, 0.08796319365501404, 0.7034257054328918] 6 | x=temp[0] 7 | y=temp[1] 8 | print(math.pi/2) 9 | z=temp[2] 10 | w=temp[3] 11 | 12 | t0 = +2.0 * (w * x + y * z) 13 | t1 = +1.0 - 2.0 * (x * x + y * y) 14 | X = math.atan2(t0, t1) 15 | print(t0,t1,w) 16 | t2 = +2.0 * (w * y - z * x) 17 | t2 = +1.0 if t2 > +1.0 else t2 18 | t2 = -1.0 if t2 < -1.0 else t2 19 | Y = math.asin(t2) 20 | 21 | t3 = +2.0 * (w * z + x * y) 22 | t4 = +1.0 - 2.0 * (y * y + z * z) 23 | Z = math.atan2(t3, t4) 24 | 25 | print(X,Y,Z) -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | 2 | import argparse 3 | import datetime 4 | import gym 5 | import pybullet as p 6 | import numpy as np 7 | import itertools 8 | import torch 9 | import time 10 | 11 | from con_env12 import UR5_robotiq 12 | 13 | from collections import deque 14 | from matplotlib import pyplot as plt 15 | 16 | import collections 17 | import random 18 | import torch.nn as nn 19 | import torch.nn.functional as F 20 | import torch.optim as optim 21 | from torch.autograd import Variable 22 | 23 | parser = argparse.ArgumentParser(description='PyTorch Soft Actor-Critic Args') 24 | parser.add_argument('--env-name', default="Allegro", 25 | help='Mujoco Gym environment (default: HalfCheetah-v2)') 26 | parser.add_argument('--policy', default="Gaussian", 27 | help='Policy Type: Gaussian | Deterministic (default: Gaussian)') 28 | parser.add_argument('--eval', type=bool, default=True, 29 | help='Evaluates a policy a policy every 10 episode (default: True)') 30 | parser.add_argument('--gamma', type=float, default=0.99, metavar='G', 31 | help='discount factor for reward (default: 0.99)') 32 | parser.add_argument('--tau', type=float, default=0.005, metavar='G', 33 | help='target smoothing coefficient(τ) (default: 0.005)') 34 | parser.add_argument('--lr', type=float, default=0.0003, metavar='G', 35 | help='learning rate (default: 0.0003)') 36 | parser.add_argument('--alpha', type=float, default=0.2, metavar='G', 37 | help='Temperature parameter α determines the relative importance of the entropy\ 38 | term against the reward (default: 0.2)') 39 | parser.add_argument('--automatic_entropy_tuning', type=bool, default=False, metavar='G', 40 | help='Automaically adjust α (default: False)') 41 | parser.add_argument('--seed', type=int, default=123456, metavar='N', 42 | help='random seed (default: 123456)') 43 | parser.add_argument('--batch_size', type=int, default=256, metavar='N', 44 | help='batch size (default: 256)') 45 | parser.add_argument('--num_steps', type=int, default=1000001, metavar='N', 46 | help='maximum number of steps (default: 1000000)') 47 | parser.add_argument('--hidden_size', type=int, default=256, metavar='N', 48 | help='hidden size (default: 256)') 49 | parser.add_argument('--updates_per_step', type=int, default=1, metavar='N', 50 | help='model updates per simulator step (default: 1)') 51 | parser.add_argument('--start_steps', type=int, default=10000, metavar='N', 52 | help='Steps sampling random actions (default: 10000)') 53 | parser.add_argument('--target_update_interval', type=int, default=1, metavar='N', 54 | help='Value target update per no. of updates per step (default: 1)') 55 | parser.add_argument('--replay_size', type=int, default=1000000, metavar='N', 56 | help='size of replay buffer (default: 10000000)') 57 | parser.add_argument('--cuda', action="store_true", 58 | help='run on CUDA (default: False)') 59 | parser.add_argument('--GUI', default="GUI", 60 | help='Pybullet physics server mode GUI | DIRECT (default: GUI)') 61 | # parser.add_argument('--GUI', default="DIRECT", 62 | # help='Pybullet physics server mode GUI | DIRECT (default: GUI)') 63 | parser.add_argument('--suffix', default="00", 64 | help='Disticguish models (default: 00)') 65 | parser.add_argument('--dist_threshold', type=float, default=0.01, 66 | help='Goal and State distance threshold (default: 0.03)') 67 | parser.add_argument('--future_k', type=int, default=4, 68 | help='future_k (default: 4)') 69 | parser.add_argument('--epi_step', type=int, default=50, 70 | help='Max_episode_steps (default: 50)') 71 | parser.add_argument('--evaluate', type=bool, default=False, 72 | help='evaluate (default: False)') 73 | 74 | args = parser.parse_args() 75 | 76 | state_size=8 77 | action_size=3 78 | 79 | PATH="./saved_model3/model1200.3.pth" 80 | actor= torch.load(PATH) 81 | actor.eval() 82 | 83 | # Environment 84 | env = UR5_robotiq(args) 85 | # env.getCameraImage() 86 | 87 | pose = env.getRobotPose() 88 | print("Robot initial pose") 89 | print(pose) 90 | 91 | pose = env.holePos 92 | pose.extend(env.Orn) 93 | #pose[2] += 0.15 94 | print("Robot target pose") 95 | print(env.holePos) 96 | # p.addUserDebugText('O',np.array(env.holePos)[:3]) 97 | # env.moveL(env.holePos) 98 | # get = env.getRobotPose() 99 | # print(get) 100 | 101 | # torch.cuda.device(0) 102 | # cuda = torch.device('cuda') 103 | ''' 104 | 105 | pose = env.getRobotPose() 106 | print("Robot final pose") 107 | print(pose) 108 | ''' 109 | 110 | def main(): 111 | score = 0.0 112 | global_step=0 113 | # time.sleep(50) 114 | #env.lol() 115 | # state = env.reset() 116 | for epi_n in range(1000): 117 | state = env.reset() 118 | time.sleep(1.0) 119 | #pre_noise=np.zeros(action_size) 120 | done = False 121 | step = 0 122 | score = 0 123 | #while False: #not done: 124 | step += 1 125 | global_step+=1 126 | 127 | #action = actor(torch.FloatTensor(state)) 128 | # next_state, reward, done, info= env.step([0.0,0.0,0.0,0.0]) 129 | #next_state, reward, done, info= env.step(list(action)) 130 | # print('error',info,'next_state',next_state) 131 | # for _ in range(50): 132 | env.down(-0.08) 133 | #env.AdmittanceCtrl([0.0,0.0,-80.0,0.0]) 134 | time.sleep(2) 135 | env.down(0.08) 136 | #env.AdmittanceCtrl([0.0,0.0,80.0,0.0]) 137 | time.sleep(2) 138 | Pos=env.getRobotPoseE() 139 | print("Pose: {}".format(Pos)) 140 | 141 | # next_state, reward, done, info= env.step([0.0,0.0,0.0,0.0]) 142 | # print('error',info,'next_state',next_state) 143 | # time.sleep(0.1) 144 | #env.down(-0.005) 145 | # time.sleep(0.1) 146 | # break 147 | #score += reward 148 | #state = next_state 149 | # if done: 150 | 151 | #break 152 | print('Finish!!!!!!!!!!!!!!!!!!!!') 153 | 154 | 155 | if __name__ == '__main__': 156 | main() 157 | 158 | end = True 159 | while end: 160 | end = True -------------------------------------------------------------------------------- /ur5_robotiq85_env.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/ur5_robotiq85_env.pyc -------------------------------------------------------------------------------- /urdf/objects/block.urdf: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /urdf/objects/pan_tefal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/objects/pan_tefal.jpg -------------------------------------------------------------------------------- /urdf/objects/pan_tefal.urdf: -------------------------------------------------------------------------------- 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 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /urdf/objects/plate.urdf: -------------------------------------------------------------------------------- 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 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /urdf/objects/table.urdf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Gazebo/Wood 36 | 37 | 38 | 39 | true 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /urdf/objects/target.urdf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /urdf/objects/ur5_stand.urdf: -------------------------------------------------------------------------------- 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 | Gazebo/WoodPallet 26 | 1000 27 | 1000 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole.SLDPRT -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/Hole_1.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/Hole_1.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/Hole_12.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/Hole_12.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/Hole_2.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/Hole_2.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/Hole_22.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/Hole_22.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/Hole_3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/Hole_3.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/Hole_32.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/Hole_32.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/Hole_4.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/Hole_4.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/Hole_42.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/Hole_42.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/hole_n_1.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/hole_n_1.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/hole_n_2.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/hole_n_2.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/hole_n_3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/hole_n_3.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/hole_stl/hole_n_4.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/hole_stl/hole_n_4.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | hole.SLDPRT 3 | 1.0.0 4 | 5 |

URDF Description package for hole.SLDPRT

6 |

This package contains configuration data, 3D models and launch files 7 | for hole.SLDPRT robot

8 |
9 | TODO 10 | 11 | BSD 12 | catkin 13 | roslaunch 14 | robot_state_publisher 15 | rviz 16 | joint_state_publisher 17 | gazebo 18 | 19 | 20 | 21 |
-------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/meshes/hole.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/meshes/hole.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/meshes/new_hole.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/hole/meshes/new_hole.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/urdf/hole.SLDPRT.urdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 9 | 10 | 13 | 15 | 22 | 23 | 24 | 27 | 28 | 30 | 31 | 33 | 35 | 36 | 37 | 38 | 41 | 42 | 44 | 45 | 46 | 47 | true 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/urdf/new_hole1.urdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 9 | 10 | 13 | 15 | 22 | 23 | 24 | 27 | 28 | 30 | 31 | 33 | 35 | 36 | 37 | 38 | 41 | 42 | 44 | 45 | 46 | 47 | true 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/urdf/new_hole2.urdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 9 | 10 | 13 | 15 | 22 | 23 | 24 | 27 | 28 | 30 | 31 | 33 | 35 | 36 | 37 | 38 | 41 | 42 | 44 | 45 | 46 | 47 | true 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/urdf/new_hole3.urdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 9 | 10 | 13 | 15 | 22 | 23 | 24 | 27 | 28 | 30 | 31 | 33 | 35 | 36 | 37 | 38 | 41 | 42 | 44 | 45 | 46 | 47 | true 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/hole/urdf/new_hole4.urdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 9 | 10 | 13 | 15 | 22 | 23 | 24 | 27 | 28 | 30 | 31 | 33 | 35 | 36 | 37 | 38 | 41 | 42 | 44 | 45 | 46 | 47 | true 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/peg.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/peg.SLDPRT -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/peg/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | peg.SLDPRT 3 | 1.0.0 4 | 5 |

URDF Description package for peg.SLDPRT

6 |

This package contains configuration data, 3D models and launch files 7 | for peg.SLDPRT robot

8 |
9 | TODO 10 | 11 | BSD 12 | catkin 13 | roslaunch 14 | robot_state_publisher 15 | rviz 16 | joint_state_publisher 17 | gazebo 18 | 19 | 20 | 21 |
-------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/peg/meshes/peg.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/urdf/peg_hole_gazebo/peg/meshes/peg.STL -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/peg/urdf/new_peg.urdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 9 | 10 | 13 | 15 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 32 | 34 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 56 | 57 | 60 | 62 | 69 | 70 | 71 | 74 | 75 | 77 | 78 | 80 | 82 | 83 | 84 | 85 | 88 | 89 | 91 | 92 | 93 | 94 | true 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /urdf/peg_hole_gazebo/peg/urdf/peg.SLDPRT.urdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 9 | 10 | 13 | 15 | 22 | 23 | 24 | 27 | 28 | 30 | 31 | 33 | 35 | 37 | 38 | 39 | 40 | 43 | 44 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /urdf/ur5.urdf: -------------------------------------------------------------------------------- 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 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | import math 2 | import torch 3 | 4 | def create_log_gaussian(mean, log_std, t): 5 | quadratic = -((0.5 * (t - mean) / (log_std.exp())).pow(2)) 6 | l = mean.shape 7 | log_z = log_std 8 | z = l[-1] * math.log(2 * math.pi) 9 | log_p = quadratic.sum(dim=-1) - log_z.sum(dim=-1) - 0.5 * z 10 | return log_p 11 | 12 | def logsumexp(inputs, dim=None, keepdim=False): 13 | if dim is None: 14 | inputs = inputs.view(-1) 15 | dim = 0 16 | s, _ = torch.max(inputs, dim=dim, keepdim=True) 17 | outputs = s + (inputs - s).exp().sum(dim=dim, keepdim=True).log() 18 | if not keepdim: 19 | outputs = outputs.squeeze(dim) 20 | return outputs 21 | 22 | def soft_update(target, source, tau): 23 | for target_param, param in zip(target.parameters(), source.parameters()): 24 | target_param.data.copy_(target_param.data * (1.0 - tau) + param.data * tau) 25 | 26 | def hard_update(target, source): 27 | for target_param, param in zip(target.parameters(), source.parameters()): 28 | target_param.data.copy_(param.data) 29 | -------------------------------------------------------------------------------- /utils.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/utils.pyc -------------------------------------------------------------------------------- /utils_ur5_robotiq140.py: -------------------------------------------------------------------------------- 1 | from collections import namedtuple 2 | from attrdict import AttrDict 3 | import functools 4 | 5 | def setup_sisbot(p, robotID): 6 | controlJoints = ["shoulder_pan_joint","shoulder_lift_joint", 7 | "elbow_joint", "wrist_1_joint", 8 | "wrist_2_joint", "wrist_3_joint"]#, 9 | # "robotiq_85_left_knuckle_joint", 10 | # "robotiq_85_right_knuckle_joint", 11 | # "robotiq_85_left_inner_knuckle_joint", 12 | # "robotiq_85_right_inner_knuckle_joint", 13 | # "robotiq_85_left_finger_tip_joint", 14 | # "robotiq_85_right_finger_tip_joint", 15 | # "ee_fixed_joint", "world_arm_joint"] 16 | jointTypeList = ["REVOLUTE", "PRISMATIC", "SPHERICAL", "PLANAR", "FIXED"] 17 | numJoints = p.getNumJoints(robotID) 18 | print(numJoints) 19 | jointInfo = namedtuple("jointInfo", 20 | ["id","name","type","lowerLimit","upperLimit","maxForce","maxVelocity","controllable"]) 21 | joints = AttrDict() 22 | for i in range(numJoints): 23 | info = p.getJointInfo(robotID, i) 24 | jointID = info[0] 25 | jointName = info[1].decode("utf-8") 26 | jointType = jointTypeList[info[2]] 27 | jointLowerLimit = info[8] 28 | jointUpperLimit = info[9] 29 | jointMaxForce = info[10] 30 | jointMaxVelocity = info[11] 31 | controllable = True if jointName in controlJoints else False 32 | info = jointInfo(jointID,jointName,jointType,jointLowerLimit, 33 | jointUpperLimit,jointMaxForce,jointMaxVelocity,controllable) 34 | if info.type=="REVOLUTE": # set revolute joint to static 35 | p.setJointMotorControl2(robotID, info.id, p.VELOCITY_CONTROL, targetVelocity=0, force=0) 36 | joints[info.name] = info 37 | 38 | # explicitly deal with mimic joints 39 | # def controlGripper(robotID, parent, children, mul, **kwargs): 40 | # controlMode = kwargs.pop("controlMode") 41 | # if controlMode==p.POSITION_CONTROL: 42 | # pose = kwargs.pop("targetPosition") 43 | # # move parent joint 44 | # p.setJointMotorControl2(robotID, parent.id, controlMode, targetPosition=pose, 45 | # force=parent.maxForce, maxVelocity=parent.maxVelocity) 46 | # # move child joints 47 | # for name in children: 48 | # child = children[name] 49 | # childPose = pose * mul[child.name] 50 | # p.setJointMotorControl2(robotID, child.id, controlMode, targetPosition=childPose, 51 | # force=child.maxForce, maxVelocity=child.maxVelocity) 52 | # else: 53 | # raise NotImplementedError("controlGripper does not support \"{}\" control mode".format(controlMode)) 54 | # # check if there 55 | # if len(kwargs) is not 0: 56 | # raise KeyError("No keys {} in controlGripper".format(", ".join(kwargs.keys()))) 57 | # mimicParentName = "robotiq_140_joint_finger" 58 | # mimicChildren = {"robotiq_arg2f_base_to_robotiq_140_left_outer_knuckle": 1, 59 | # "robotiq_arg2f_base_to_robotiq_140_left_inner_knuckle": 1, 60 | # "robotiq_arg2f_base_to_robotiq_140_right_inner_knuckle": 1, 61 | # "robotiq_140_left_outer_finger_to_inner": 1, 62 | # "robotiq_140_right_outer_finger_to_inner": 1} 63 | # parent = joints[mimicParentName] 64 | # children = AttrDict((j, joints[j]) for j in joints if j in mimicChildren.keys()) 65 | # controlRobotiqC2 = functools.partial(controlGripper, robotID, parent, children, mimicChildren) 66 | 67 | return joints, controlJoints 68 | 69 | -------------------------------------------------------------------------------- /utils_ur5_robotiq140.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeongeun980906/peg-in-hole/124bbafaa05e7362cc95e1e32d47f97808372989/utils_ur5_robotiq140.pyc --------------------------------------------------------------------------------