Skip to content

Commit 857cd47

Browse files
author
Razer
committed
make the dm_control dependency opt-in
1 parent 951d02a commit 857cd47

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ dependencies = [# Optional
5757
'transformations',
5858
'absl-py',
5959
'lxml',
60-
'dm_control',
6160
'pyyaml'
6261
]
6362

@@ -71,6 +70,7 @@ dependencies = [# Optional
7170
# projects.
7271
[project.optional-dependencies] # Optional
7372
test = ["pytest"]
73+
mujoco = ["dm_control"]
7474

7575
# List URLs that are relevant to your project
7676
#
@@ -102,4 +102,4 @@ test = ["pytest"]
102102
# These are the assumed default build requirements from pip:
103103
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
104104
requires = ["setuptools>=43.0.0", "wheel"]
105-
build-backend = "setuptools.build_meta"
105+
build-backend = "setuptools.build_meta"

src/pytorch_kinematics/mjcf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from dm_control import mjcf
2-
31
import pytorch_kinematics.transforms as tf
42
from . import chain
53
from . import frame
@@ -59,6 +57,8 @@ def build_chain_from_mjcf(data):
5957
chain.Chain
6058
Chain object created from MJCF.
6159
"""
60+
from dm_control import mjcf
61+
6262
model = mjcf.from_xml_string(data)
6363
root_body = model.worldbody.body[0]
6464
root_frame = frame.Frame(root_body.name + "_frame",

0 commit comments

Comments
 (0)