File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 27
27
- name : Install dependencies
28
28
run : |
29
29
python -m pip install --upgrade pip
30
- python -m pip install .
30
+ python -m pip install .[test]
31
31
python -m pip install flake8 pytest
32
32
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33
33
- name : Lint with flake8
Original file line number Diff line number Diff line change 6
6
# Installation
7
7
``` shell
8
8
pip install pytorch-kinematics
9
+ # Alternatively, if you want to load from mujoco's XML format, use:
10
+ pip install pytorch-kinematics[mujoco]
9
11
```
10
12
11
13
For development, clone repository somewhere, then ` pip3 install -e . ` to install in editable mode.
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ dependencies = [# Optional
57
57
' transformations' ,
58
58
' absl-py' ,
59
59
' lxml' ,
60
- ' dm_control' ,
61
60
' pyyaml'
62
61
]
63
62
@@ -70,7 +69,8 @@ dependencies = [# Optional
70
69
# Similar to `dependencies` above, these must be valid existing
71
70
# projects.
72
71
[project .optional-dependencies ] # Optional
73
- test = [" pytest" ]
72
+ test = [" pytest" , " dm_control" ]
73
+ mujoco = [" dm_control" ]
74
74
75
75
# List URLs that are relevant to your project
76
76
#
@@ -102,4 +102,4 @@ test = ["pytest"]
102
102
# These are the assumed default build requirements from pip:
103
103
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
104
104
requires = [" setuptools>=43.0.0" , " wheel" ]
105
- build-backend = " setuptools.build_meta"
105
+ build-backend = " setuptools.build_meta"
Original file line number Diff line number Diff line change 1
- from dm_control import mjcf
2
-
3
1
import pytorch_kinematics .transforms as tf
4
2
from . import chain
5
3
from . import frame
@@ -59,6 +57,8 @@ def build_chain_from_mjcf(data):
59
57
chain.Chain
60
58
Chain object created from MJCF.
61
59
"""
60
+ from dm_control import mjcf
61
+
62
62
model = mjcf .from_xml_string (data )
63
63
root_body = model .worldbody .body [0 ]
64
64
root_frame = frame .Frame (root_body .name + "_frame" ,
You can’t perform that action at this time.
0 commit comments