Skip to content

Commit 161191a

Browse files
Revert "WIP: Experiment with environ.pop in lieu of getenv"
This reverts commit 6bcbdc8.
1 parent 607e648 commit 161191a

File tree

86 files changed

+178
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+178
-175
lines changed

robot_descriptions/a1_description.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@
66

77
"""A1 description."""
88

9-
from os import environ as _environ
10-
from os import path as _path
9+
import os
1110

1211
from ._cache import clone_to_cache as _clone_to_cache
1312

1413
REPOSITORY_PATH: str = _clone_to_cache(
1514
"unitree_ros",
16-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
15+
commit=(
16+
os.environ.pop("ROBOT_DESCRIPTION_COMMIT")
17+
if "ROBOT_DESCRIPTION_COMMIT" in os.environ
18+
else None
19+
),
1720
)
1821

19-
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "robots", "a1_description")
22+
PACKAGE_PATH: str = os.path.join(REPOSITORY_PATH, "robots", "a1_description")
2023

21-
URDF_PATH: str = _path.join(PACKAGE_PATH, "urdf", "a1.urdf")
24+
URDF_PATH: str = os.path.join(PACKAGE_PATH, "urdf", "a1.urdf")

robot_descriptions/a1_mj_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
"""A1 MJCF description."""
88

9-
from os import environ as _environ
9+
from os import getenv as _getenv
1010
from os import path as _path
1111

1212
from ._cache import clone_to_cache as _clone_to_cache
1313

1414
REPOSITORY_PATH: str = _clone_to_cache(
1515
"unitree_mujoco",
16-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
16+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1717
)
1818

1919
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "data", "a1")

robot_descriptions/aliengo_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
"""Aliengo description."""
88

9-
from os import environ as _environ
9+
from os import getenv as _getenv
1010
from os import path as _path
1111

1212
from ._cache import clone_to_cache as _clone_to_cache
1313

1414
REPOSITORY_PATH: str = _clone_to_cache(
1515
"unitree_mujoco",
16-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
16+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1717
)
1818

1919
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "data", "aliengo")

robot_descriptions/allegro_hand_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
"""Allegro Hand description."""
88

9-
from os import environ as _environ
9+
from os import getenv as _getenv
1010
from os import path as _path
1111

1212
from ._cache import clone_to_cache as _clone_to_cache
1313

1414
REPOSITORY_PATH: str = _clone_to_cache(
1515
"drake",
16-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
16+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1717
)
1818

1919
PACKAGE_PATH: str = _path.join(

robot_descriptions/allegro_hand_mj_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
"""Allegro Hand V3 MJCF description."""
77

8-
from os import environ as _environ
8+
from os import getenv as _getenv
99
from os import path as _path
1010

1111
from ._cache import clone_to_cache as _clone_to_cache
1212

1313
REPOSITORY_PATH: str = _clone_to_cache(
1414
"mujoco_menagerie",
15-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
15+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1616
)
1717

1818
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "wonik_allegro")

robot_descriptions/aloha_mj_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
"""ALOHA 2 MJCF description."""
77

8-
from os import environ as _environ
8+
from os import getenv as _getenv
99
from os import path as _path
1010

1111
from ._cache import clone_to_cache as _clone_to_cache
1212

1313
REPOSITORY_PATH: str = _clone_to_cache(
1414
"mujoco_menagerie",
15-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
15+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1616
)
1717

1818
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "aloha")

robot_descriptions/anymal_b_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
"""ANYmal B description."""
88

9-
from os import environ as _environ
9+
from os import getenv as _getenv
1010
from os import path as _path
1111

1212
from ._cache import clone_to_cache as _clone_to_cache
1313

1414
REPOSITORY_PATH: str = _clone_to_cache(
1515
"anymal_b_simple_description",
16-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
16+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1717
)
1818

1919
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH)

robot_descriptions/anymal_b_mj_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
"""ANYmal B MJCF description."""
88

9-
from os import environ as _environ
9+
from os import getenv as _getenv
1010
from os import path as _path
1111

1212
from ._cache import clone_to_cache as _clone_to_cache
1313

1414
REPOSITORY_PATH: str = _clone_to_cache(
1515
"mujoco_menagerie",
16-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
16+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1717
)
1818

1919
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "anybotics_anymal_b")

robot_descriptions/anymal_c_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
"""ANYmal C description."""
88

9-
from os import environ as _environ
9+
from os import getenv as _getenv
1010
from os import path as _path
1111

1212
from ._cache import clone_to_cache as _clone_to_cache
1313

1414
REPOSITORY_PATH: str = _clone_to_cache(
1515
"anymal_c_simple_description",
16-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
16+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1717
)
1818

1919
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH)

robot_descriptions/anymal_c_mj_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
"""ANYmal C MJCF description."""
88

9-
from os import environ as _environ
9+
from os import getenv as _getenv
1010
from os import path as _path
1111

1212
from ._cache import clone_to_cache as _clone_to_cache
1313

1414
REPOSITORY_PATH: str = _clone_to_cache(
1515
"mujoco_menagerie",
16-
commit=_environ.pop("ROBOT_DESCRIPTION_COMMIT", None),
16+
commit=_getenv("ROBOT_DESCRIPTION_COMMIT", None),
1717
)
1818

1919
PACKAGE_PATH: str = _path.join(REPOSITORY_PATH, "anybotics_anymal_c")

0 commit comments

Comments
 (0)