Skip to content

Commit 563d033

Browse files
committed
Update docs for flattened dartpy namespace
1 parent 3f539cb commit 563d033

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

docs/onboarding/README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -558,13 +558,10 @@ graph TB
558558

559559
**Key Modules**:
560560

561-
- `dartpy.math` - Mathematical utilities and Eigen↔NumPy conversion
562-
- `dartpy.dynamics` - Skeletons, BodyNodes, Joints, IK
563-
- `dartpy.collision` - Collision detection backends
564-
- `dartpy.constraint` - Constraint solving
565-
- `dartpy.simulation` - World simulation
561+
- `dartpy` (top-level) - Core classes/functions (math, dynamics, collision, simulation, constraint, optimizer) exposed in snake_case
562+
- `dartpy.io` - File parsers (URDF, SDF, SKEL, MJCF) [alias for legacy `utils`]
566563
- `dartpy.gui` - 3D visualization with OSG and ImGui
567-
- `dartpy.utils` - File parsers (URDF, SDF, SKEL, MJCF)
564+
- Legacy `dartpy.common`/`math`/`dynamics`/`collision`/`simulation`/`constraint`/`optimizer`/`utils` remain importable in DART 7.x but emit `DeprecationWarning` and will be removed in DART 8.0.
568565

569566
**Key Files**:
570567

@@ -818,20 +815,20 @@ sequenceDiagram
818815
participant NumPy as NumPy
819816
820817
Python->>dartpy: import dartpy
821-
Python->>dartpy: world = dartpy.simulation.World()
818+
Python->>dartpy: world = dartpy.World()
822819
dartpy->>DART: World::create()
823820
824821
Python->>dartpy: skel = dartpy.dynamics.Skeleton.create()
825822
dartpy->>DART: Skeleton::create()
826823
827-
Python->>dartpy: world.addSkeleton(skel)
824+
Python->>dartpy: world.add_skeleton(skel)
828825
dartpy->>DART: World::addSkeleton()
829826
830827
loop Simulation
831828
Python->>dartpy: world.step()
832829
dartpy->>DART: World::step()
833-
Python->>dartpy: q = skel.getPositions()
834-
dartpy->>DART: Skeleton::getPositions()
830+
Python->>dartpy: q = skel.get_positions()
831+
dartpy->>DART: Skeleton::get_positions()
835832
DART->>NumPy: convert Eigen to ndarray
836833
NumPy-->>Python: positions array
837834
end
@@ -1207,7 +1204,7 @@ dart_gui/
12071204
```python
12081205
import dartpy as dart
12091206
from dartpy.gui import Viewer, RealTimeWorldNode
1210-
from dartpy.utils import DartLoader
1207+
from dartpy.io import DartLoader
12111208
```
12121209

12131210
---

docs/readthedocs/dartpy/python_api_reference.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,21 @@ To explore the bindings locally:
2222
pip install dartpy
2323
python - <<'PY'
2424
import dartpy as dart
25-
world = dart.simulation.World()
26-
print(world.getGravity())
25+
world = dart.World()
26+
print(world.get_gravity())
2727
PY
2828
2929
Module Reference
3030
----------------
3131
32-
The sections below mirror the module layout from ``docs/python_api/``.
32+
.. note::
33+
The dartpy API is now flattened: core classes/functions live on the
34+
top-level ``dartpy`` package and file parsers under ``dartpy.io``. The
35+
legacy submodules below remain importable in DART 7.x for compatibility but
36+
are deprecated and scheduled for removal in DART 8.0. Prefer importing from
37+
``dartpy`` / ``dartpy.io`` in new code.
38+
39+
The sections below mirror the legacy module layout from ``docs/python_api/`` (kept for compatibility):
3340
3441
.. toctree::
3542
:maxdepth: 1

0 commit comments

Comments
 (0)