Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-thankyou-lin committed Oct 30, 2024
1 parent aeac5ec commit 125ddc5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_controllers/test_linear_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def step(env, action, current_torques):
env.sim.forward()
env._pre_action(action, policy_step)
last_torques = current_torques
current_torques = env.robots[0].composite_controller.part_controllers['right'].torques
current_torques = env.robots[0].composite_controller.part_controllers["right"].torques
summed_abs_delta_torques += np.abs(current_torques - last_torques)
env.sim.step()
policy_step = False
Expand Down Expand Up @@ -139,7 +139,9 @@ def test_linear_interpolator():
initial_state = [env.robots[0]._hand_pos["right"], T.mat2quat(env.robots[0]._hand_orn["right"])]
dstate = [
env.robots[0]._hand_pos["right"] - initial_state[0],
T.mat2euler(T.quat2mat(T.quat_distance(T.mat2quat(env.robots[0]._hand_orn["right"]), initial_state[1]))),
T.mat2euler(
T.quat2mat(T.quat_distance(T.mat2quat(env.robots[0]._hand_orn["right"]), initial_state[1]))
),
]

# Define the uniform trajectory action
Expand Down Expand Up @@ -168,7 +170,9 @@ def test_linear_interpolator():
timesteps[j] += 1
dstate = [
env.robots[0]._hand_pos["right"] - initial_state[0],
T.mat2euler(T.quat2mat(T.quat_distance(T.mat2quat(env.robots[0]._hand_orn["right"]), initial_state[1]))),
T.mat2euler(
T.quat2mat(T.quat_distance(T.mat2quat(env.robots[0]._hand_orn["right"]), initial_state[1]))
),
]

# When finished, print out the timestep results
Expand Down
1 change: 1 addition & 0 deletions tests/test_grippers/test_all_grippers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Obviously, if an environment crashes during runtime, that is considered a failure as well.
"""

from robosuite.models.grippers import GRIPPER_MAPPING


Expand Down
1 change: 1 addition & 0 deletions tests/test_grippers/test_panda_gripper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests panda gripper on grabbing task
"""

from robosuite.models.grippers import GripperTester, PandaGripper


Expand Down
1 change: 1 addition & 0 deletions tests/test_grippers/test_rethink_gripper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests two finger gripper and left two finger gripper on grabbing task
"""

from robosuite.models.grippers import GripperTester, RethinkGripper


Expand Down

0 comments on commit 125ddc5

Please sign in to comment.