Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuyifengzju committed Apr 23, 2024
1 parent d31c34f commit 21602ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion deoxys/deoxys/experimental/motion_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def follow_joint_traj(
joint_traj: list,
num_addition_steps=30,
controller_cfg: dict = None,
gripper_close=True,
):
"""This is a simple function to follow a given trajectory in joint space.
Expand Down Expand Up @@ -132,7 +133,10 @@ def follow_joint_traj(
else:
action = target_joint_pos
if len(action) == 7:
action = action + [-1.0]
if gripper_close:
action = action + [1.0]
else:
action = action + [-1.0]
current_joint_pos = np.array(robot_interface.last_q)
robot_interface.control(
controller_type="JOINT_IMPEDANCE",
Expand Down
2 changes: 1 addition & 1 deletion deoxys/examples/collect_low_dim_states_with_spacemouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def main():

time.sleep(2)

while i < 2000:
while i < 4000:
logger.info(i)
i += 1
start_time = time.time_ns()
Expand Down

0 comments on commit 21602ed

Please sign in to comment.