Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python/simulator] First-class multi-robot support. #754

Merged
merged 15 commits into from
Apr 12, 2024
Prev Previous commit
f
  • Loading branch information
duburcqa committed Apr 12, 2024
commit fb1c95de912d48e0df47888cbeb5e4882138b023
4 changes: 2 additions & 2 deletions python/gym_jiminy/common/gym_jiminy/common/envs/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ def reset(self, # type: ignore[override]
if self.simulator.is_viewer_available:
viewer = self.simulator.viewer
assert viewer is not None # Assert(s) for type checker
viewer._setup(self.robot)
viewer._setup(self.robot) # type: ignore[attr-defined]
if viewer.has_gui():
viewer.refresh()

Expand Down Expand Up @@ -1190,7 +1190,7 @@ def _interact(key: Optional[str] = None) -> bool:

# Stop the simulation to unlock the robot.
# It will enable to display contact forces for replay.
if self.engine.is_simulation_running:
if self.simulator.is_simulation_running:
self.simulator.stop()

# Disable play interactive mode flag and restore training flag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ def __init__(self,
# Load engine and robot options
if config_path is None:
if isinstance(robot, BaseJiminyRobot):
urdf_path = robot._urdf_path_orig
urdf_path = (
robot._urdf_path_orig) # type: ignore[attr-defined]
else:
urdf_path = robot.urdf_path
if not urdf_path:
Expand Down
Loading