Skip to content

Commit 9980e66

Browse files
authored
Adds print info in disassembly direct environment (#2750)
# Description Add more information in the print out message, when generating disassembly paths. ## Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ## Checklist - [ x ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [ x ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ x ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent 68d96a5 commit 9980e66

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

source/isaaclab_tasks/isaaclab_tasks/direct/automate/disassembly_env.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def _move_gripper_to_eef_pose(self, env_ids, goal_pos, goal_quat, sim_steps, if_
555555
for _ in range(sim_steps):
556556
if if_log:
557557
self._log_robot_state_per_timestep()
558-
# print('finger', self.fingertip_midpoint_pos[0], 'goal', goal_pos[0])
558+
559559
# Compute error to target.
560560
pos_error, axis_angle_error = fc.get_pose_error(
561561
fingertip_midpoint_pos=self.fingertip_midpoint_pos[env_ids],
@@ -567,10 +567,7 @@ def _move_gripper_to_eef_pose(self, env_ids, goal_pos, goal_quat, sim_steps, if_
567567
)
568568

569569
delta_hand_pose = torch.cat((pos_error, axis_angle_error), dim=-1)
570-
# print('delta hand pose', delta_hand_pose[0])
571570
self.actions *= 0.0
572-
# print('action shape', self.actions[env_ids, :6].shape)
573-
# print('delta hand shape', delta_hand_pose.shape)
574571
self.actions[env_ids, :6] = delta_hand_pose
575572

576573
is_rendering = self.sim.has_gui() or self.sim.has_rtx_sensors()
@@ -746,7 +743,6 @@ def _disassemble_plug_from_socket(self):
746743

747744
if_intersect = (self.held_pos[:, 2] < self.fixed_pos[:, 2] + self.disassembly_dists).cpu().numpy()
748745
env_ids = np.argwhere(if_intersect == 0).reshape(-1)
749-
# print('env ids', env_ids)
750746
self._randomize_gripper_pose(self.cfg_task.move_gripper_sim_steps, env_ids)
751747

752748
def _lift_gripper(self, lift_distance, sim_steps, env_ids=None):
@@ -880,6 +876,9 @@ def _save_log_traj(self):
880876
with open(log_filename, "w+") as out_file:
881877
json.dump(log_item, out_file, indent=6)
882878

879+
print(f"Trajectory collection complete! Collected {len(self.log_arm_dof_pos)} trajectories!")
883880
exit(0)
884881
else:
885-
print("current logging item num: ", len(self.log_arm_dof_pos))
882+
print(
883+
f"Collected {len(self.log_arm_dof_pos)} trajectories so far (target: > {self.cfg_task.num_log_traj})."
884+
)

0 commit comments

Comments
 (0)