xinjie.wang commited on
Commit
6dc99b2
·
1 Parent(s): 4bfc66d
Files changed (3) hide show
  1. .gitignore +4 -0
  2. inference.py +2 -1
  3. scripts/json2urdf.py +4 -3
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ data/
2
+ data.tar
3
+ results*/
4
+ __pycache__/
inference.py CHANGED
@@ -245,7 +245,8 @@ def _convert_json(x, c):
245
 
246
  def post_process(output, cond, save_root, gt_data_root, visualize=False):
247
  print('Post-processing...')
248
- N = output.shape[0]
 
249
  for i in range(N):
250
  cond_n = {}
251
  cond_n['n_nodes'] = cond['n_nodes'][i]
 
245
 
246
  def post_process(output, cond, save_root, gt_data_root, visualize=False):
247
  print('Post-processing...')
248
+ # N = output.shape[0]
249
+ N = 1
250
  for i in range(N):
251
  cond_n = {}
252
  cond_n['n_nodes'] = cond['n_nodes'][i]
scripts/json2urdf.py CHANGED
@@ -102,9 +102,10 @@ def pybullet_render(urdf_path, target_dir, num_frames, distance=3, fov=60):
102
  except Exception as e:
103
  print(e)
104
  return
105
- for i in range(-1, p.getNumJoints(robot)):
106
- rgba = [np.random.uniform(0.2, 1.0), np.random.uniform(0.2, 1.0), np.random.uniform(0.2, 1.0), 1]
107
- p.changeVisualShape(robot, linkIndex=i, rgbaColor=rgba)
 
108
  p.resetBasePositionAndOrientation(robot, [0, 0, 0], [0, 0.7071, 0.7071, 0])
109
  joint_info = []
110
  for i in range(p.getNumJoints(robot)):
 
102
  except Exception as e:
103
  print(e)
104
  return
105
+ # Disable part mesh colors.
106
+ # for i in range(-1, p.getNumJoints(robot)):
107
+ # rgba = [np.random.uniform(0.2, 1.0), np.random.uniform(0.2, 1.0), np.random.uniform(0.2, 1.0), 1]
108
+ # p.changeVisualShape(robot, linkIndex=i, rgbaColor=rgba)
109
  p.resetBasePositionAndOrientation(robot, [0, 0, 0], [0, 0.7071, 0.7071, 0])
110
  joint_info = []
111
  for i in range(p.getNumJoints(robot)):