-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmain.py
35 lines (28 loc) · 912 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
import numpy as np
import pybullet as p
from tqdm import tqdm
from env import ClutteredPushGrasp
from robot import Panda, UR5Robotiq85, UR5Robotiq140
from utilities import YCBModels, Camera
import time
import math
def user_control_demo():
ycb_models = YCBModels(
os.path.join('./data/ycb', '**', 'textured-decmp.obj'),
)
camera = Camera((1, 1, 1),
(0, 0, 0),
(0, 0, 1),
0.1, 5, (320, 320), 40)
camera = None
# robot = Panda((0, 0.5, 0), (0, 0, math.pi))
robot = UR5Robotiq85((0, 0.5, 0), (0, 0, 0))
env = ClutteredPushGrasp(robot, ycb_models, camera, vis=True)
env.reset()
# env.SIMULATION_STEP_DELAY = 0
while True:
obs, reward, done, info = env.step(env.read_debug_parameter(), 'end')
# print(obs, reward, done, info)
if __name__ == '__main__':
user_control_demo()