chrisjcc commited on
Commit
1a4d57e
·
verified ·
1 Parent(s): 9a518dc

Comment out code

Browse files
Files changed (1) hide show
  1. tray_sim.py +11 -11
tray_sim.py CHANGED
@@ -103,17 +103,17 @@ def run_tray_simulation(seed=0, num_objects=N_OBJECTS, azimuth=45, elevation=-25
103
  #data.qvel[pusher_vel_idx:pusher_vel_idx+3] = [-0.05, 0.05, 0.0] # toward center
104
  data.qvel[pusher_vel_idx:pusher_vel_idx+3] = push_velocity # toward center
105
 
106
- if t == IMPACT_STEP and not tray_force_applied:
107
- mujoco.mj_applyFT(
108
- model,
109
- data,
110
- np.array([5.0, 0.0, 0.0]), # force (e.g. impulse to the right; adjust magnitude)
111
- np.array([0.0, 0.0, 0.0]), # torque
112
- np.array([0.0, 0.0, 0.0]), # point in global frame (apply at body origin)
113
- tray_id, # body ID
114
- data.qfrc_applied # force accumulator to apply into
115
- )
116
- tray_force_applied = True
117
 
118
  mujoco.mj_step(model, data)
119
  renderer.update_scene(data, camera=cam, scene_option=scene_option)
 
103
  #data.qvel[pusher_vel_idx:pusher_vel_idx+3] = [-0.05, 0.05, 0.0] # toward center
104
  data.qvel[pusher_vel_idx:pusher_vel_idx+3] = push_velocity # toward center
105
 
106
+ #if t == IMPACT_STEP and not tray_force_applied:
107
+ # mujoco.mj_applyFT(
108
+ # model,
109
+ # data,
110
+ # np.array([5.0, 0.0, 0.0]), # force (e.g. impulse to the right; adjust magnitude)
111
+ # np.array([0.0, 0.0, 0.0]), # torque
112
+ # np.array([0.0, 0.0, 0.0]), # point in global frame (apply at body origin)
113
+ # tray_id, # body ID
114
+ # data.qfrc_applied # force accumulator to apply into
115
+ # )
116
+ # tray_force_applied = True
117
 
118
  mujoco.mj_step(model, data)
119
  renderer.update_scene(data, camera=cam, scene_option=scene_option)