Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yichao-liang committed Dec 27, 2024
1 parent a8c2df0 commit 5a1ec62
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 373 deletions.
3 changes: 2 additions & 1 deletion predicators/envs/coffee.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ def _get_jug_handle_grasp(cls, state: State,
# Orient pointing down.
rot = state.get(jug, "rot") - np.pi / 2
target_x = state.get(jug, "x") + np.cos(rot) * cls.jug_handle_offset
target_y = state.get(jug, "y") + np.sin(rot) * cls.jug_handle_offset - 0.02
target_y = state.get(jug,
"y") + np.sin(rot) * cls.jug_handle_offset - 0.02
if not CFG.coffee_use_pixelated_jug:
target_y += 0.02
target_z = cls.z_lb + cls.jug_handle_height()
Expand Down
6 changes: 4 additions & 2 deletions predicators/envs/pybullet_coffee.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,11 @@ def _reset_state(self, state: State) -> None:
logging.debug(reconstructed_state.pretty_str())
raise ValueError("Could not reconstruct state.")

def _get_state(self, render_obs:bool=False) -> State:
def _get_state(self, render_obs: bool = False) -> State:
"""Create a State instance based on the current PyBullet state.
Called in step() and reset()."""
Called in step() and reset().
"""
state_dict = {}

# Get robot state.
Expand Down
Loading

0 comments on commit 5a1ec62

Please sign in to comment.