dartpy 6.16.5__cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. dartpy-6.16.5.dist-info/METADATA +146 -0
  2. dartpy-6.16.5.dist-info/RECORD +64 -0
  3. dartpy-6.16.5.dist-info/WHEEL +6 -0
  4. dartpy-6.16.5.dist-info/licenses/LICENSE +31 -0
  5. dartpy-6.16.5.dist-info/sboms/auditwheel.cdx.json +1 -0
  6. dartpy-6.16.5.dist-info/top_level.txt +2 -0
  7. dartpy.cpython-313-x86_64-linux-gnu.so +0 -0
  8. dartpy.libs/libGLU-ff1477cc.so.1.3.1 +0 -0
  9. dartpy.libs/libOpenThreads-40f1b21a.so.3.3.1 +0 -0
  10. dartpy.libs/libXi-9178a6bd.so.6.1.0 +0 -0
  11. dartpy.libs/libXxf86vm-8446c95f.so.1.0.0 +0 -0
  12. dartpy.libs/libassimp-6dbf32af.so.5.4.3 +0 -0
  13. dartpy.libs/libccd-252352d2.so.2.0 +0 -0
  14. dartpy.libs/libconsole_bridge-74a7293d.so.1.0 +0 -0
  15. dartpy.libs/libfcl-e62f87aa.so.0.7.0 +0 -0
  16. dartpy.libs/libglut-a761335e.so.3.10.0 +0 -0
  17. dartpy.libs/liboctomap-f33cbde0.so.1.10.0 +0 -0
  18. dartpy.libs/liboctomath-f45b7699.so.1.10.0 +0 -0
  19. dartpy.libs/libosg-918cf1aa.so.3.7.0 +0 -0
  20. dartpy.libs/libosgDB-d5a653a6.so.3.7.0 +0 -0
  21. dartpy.libs/libosgGA-92a7c57e.so.3.7.0 +0 -0
  22. dartpy.libs/libosgManipulator-f07690ad.so.3.7.0 +0 -0
  23. dartpy.libs/libosgShadow-2d57b09e.so.3.7.0 +0 -0
  24. dartpy.libs/libosgText-b23e4e3d.so.3.7.0 +0 -0
  25. dartpy.libs/libosgUtil-5431abc7.so.3.7.0 +0 -0
  26. dartpy.libs/libosgViewer-6e464f80.so.3.7.0 +0 -0
  27. dartpy.libs/liburdfdom_model-c401d788.so.4.0 +0 -0
  28. dartpy.libs/liburdfdom_model_state-9c22f9db.so.4.0 +0 -0
  29. dartpy.libs/liburdfdom_sensor-ef1de772.so.4.0 +0 -0
  30. dartpy.libs/liburdfdom_world-cc923b78.so.4.0 +0 -0
  31. tests/__init__.py +0 -0
  32. tests/integration/__init__.py +0 -0
  33. tests/integration/test_joint_force_torque.py +305 -0
  34. tests/unit/__init__.py +0 -0
  35. tests/unit/collision/__init__.py +0 -0
  36. tests/unit/collision/test_collision.py +249 -0
  37. tests/unit/common/__init__.py +0 -0
  38. tests/unit/common/test_logging.py +20 -0
  39. tests/unit/common/test_stopwatch.py +50 -0
  40. tests/unit/common/test_string.py +42 -0
  41. tests/unit/common/test_uri.py +20 -0
  42. tests/unit/constraint/__init__.py +0 -0
  43. tests/unit/constraint/test_constraint.py +42 -0
  44. tests/unit/dynamics/__init__.py +0 -0
  45. tests/unit/dynamics/test_aspect.py +15 -0
  46. tests/unit/dynamics/test_body_node.py +65 -0
  47. tests/unit/dynamics/test_inertia.py +76 -0
  48. tests/unit/dynamics/test_inverse_kinematics.py +98 -0
  49. tests/unit/dynamics/test_joint.py +149 -0
  50. tests/unit/dynamics/test_meta_skeleton.py +41 -0
  51. tests/unit/dynamics/test_simple_frame.py +54 -0
  52. tests/unit/dynamics/test_skeleton.py +23 -0
  53. tests/unit/math/__init__.py +0 -0
  54. tests/unit/math/test_random.py +40 -0
  55. tests/unit/optimizer/__init__.py +0 -0
  56. tests/unit/optimizer/test_optimizer.py +93 -0
  57. tests/unit/simulation/__init__.py +0 -0
  58. tests/unit/simulation/test_world.py +45 -0
  59. tests/unit/utils/__init__.py +0 -0
  60. tests/unit/utils/test_dart_loader.py +72 -0
  61. tests/unit/utils/test_mjcf_parser.py +19 -0
  62. tests/unit/utils/test_sdf_parser.py +21 -0
  63. tests/unit/utils/test_skel_parser.py +22 -0
  64. tests/util.py +18 -0
@@ -0,0 +1,146 @@
1
+ Metadata-Version: 2.4
2
+ Name: dartpy
3
+ Version: 6.16.5
4
+ Summary: Python API of Dynamic Animation and Robotics Toolkit.
5
+ Home-page: https://github.com/dartsim/dart.git
6
+ Author: Jeongseok Lee
7
+ Author-email: jslee02@gmail.com
8
+ License: BSD 2-Clause
9
+ Keywords: dartsim robotics
10
+ Classifier: Development Status :: 2 - Pre-Alpha
11
+ Classifier: Framework :: Robot Framework
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Requires-Python: >=3.7
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: numpy
22
+ Provides-Extra: test
23
+ Requires-Dist: pytest>=6.0; extra == "test"
24
+ Dynamic: author
25
+ Dynamic: author-email
26
+ Dynamic: classifier
27
+ Dynamic: description
28
+ Dynamic: description-content-type
29
+ Dynamic: home-page
30
+ Dynamic: keywords
31
+ Dynamic: license
32
+ Dynamic: license-file
33
+ Dynamic: provides-extra
34
+ Dynamic: requires-dist
35
+ Dynamic: requires-python
36
+ Dynamic: summary
37
+
38
+ # DART
39
+
40
+ <br>
41
+ <p align="center">
42
+ <img src="https://raw.githubusercontent.com/dartsim/dart/master/docs/dart_logo_377x107.jpg" alt="DART: Dynamic Animation and Robotics Toolkit">
43
+ </p>
44
+
45
+ DART (Dynamic Animation and Robotics Toolkit) is an open-source library that
46
+ provides data structures and algorithms for kinematic and dynamic applications
47
+ in robotics and computer animation. Renowned for its accuracy and stability,
48
+ DART utilizes generalized coordinates to represent articulated rigid body
49
+ systems and employs Featherstone's Articulated Body Algorithm to compute motion
50
+ dynamics.
51
+
52
+ ## Getting Started
53
+
54
+ DART provides both C++ and Python interfaces, which can be installed using
55
+ various package managers. For cross-platform compatibility, we recommend using
56
+ Conda or Pixi.
57
+
58
+ ### C++
59
+
60
+ #### Cross-Platform (Recommended)
61
+
62
+ Conda:
63
+
64
+ ```shell
65
+ conda install -c conda-forge dartsim-cpp
66
+ ```
67
+
68
+ Pixi:
69
+
70
+ ```shell
71
+ pixi add dartsim-cpp
72
+ ```
73
+
74
+ #### Linux
75
+
76
+ Ubuntu:
77
+
78
+ ```shell
79
+ sudo apt install libdart-all-dev
80
+ ```
81
+
82
+ Arch Linux:
83
+
84
+ ```shell
85
+ yay -S libdart
86
+ ```
87
+
88
+ FreeBSD:
89
+
90
+ ```shell
91
+ pkg install dartsim
92
+ ```
93
+
94
+ #### macOS (Homebrew)
95
+
96
+ ```shell
97
+ brew install dartsim
98
+ ```
99
+
100
+ #### Windows (Vcpkg)
101
+
102
+ ```shell
103
+ vcpkg install dartsim:x64-windows
104
+ ```
105
+
106
+ ### Python
107
+
108
+ For the Python interface, we recommend using Conda or Pixi. Note that the PyPI
109
+ package is being deprecated to reduce maintenance—contributions are welcome!
110
+
111
+ Conda:
112
+
113
+ ```shell
114
+ conda install -c conda-forge dartpy
115
+ ```
116
+
117
+ Pixi:
118
+
119
+ ```shell
120
+ pixi add dartpy
121
+ ```
122
+
123
+ PyPI (deprecated):
124
+
125
+ ```shell
126
+ pip install dartpy
127
+ ```
128
+
129
+ ## Documentation
130
+
131
+ For more information on DART, please visit the DART documentation: [English](https://dart.readthedocs.io/) | [한국어](https://dart-ko.readthedocs.io/) (WIP)
132
+
133
+ An overview of DART is also available on [DeepWiki](https://deepwiki.com/dartsim/dart).
134
+
135
+ ## Project Status
136
+
137
+ | Item | Status |
138
+ | --------------------- | ------ |
139
+ | Build | [![CI Ubuntu](https://github.com/dartsim/dart/actions/workflows/ci_ubuntu.yml/badge.svg)](https://github.com/dartsim/dart/actions/workflows/ci_ubuntu.yml) [![CI macOS](https://github.com/dartsim/dart/actions/workflows/ci_macos.yml/badge.svg)](https://github.com/dartsim/dart/actions/workflows/ci_macos.yml) [![CI Windows](https://github.com/dartsim/dart/actions/workflows/ci_windows.yml/badge.svg)](https://github.com/dartsim/dart/actions/workflows/ci_windows.yml) |
140
+ | Doc, Coverage, Linter | [![API Documentation](https://github.com/dartsim/dart/actions/workflows/api_doc.yml/badge.svg)](https://github.com/dartsim/dart/actions/workflows/api_doc.yml) [![Documentation Status](https://readthedocs.org/projects/dart/badge/?version=latest)](https://dart.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/gh/dartsim/dart/branch/main/graph/badge.svg)](https://codecov.io/gh/dartsim/dart) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/2d95a9b951be4b73a71097670ec351e8)](https://www.codacy.com/gh/dartsim/dart/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=dartsim/dart&amp;utm_campaign=Badge_Grade) |
141
+ | Packages | [![Packaging status](https://repology.org/badge/vertical-allrepos/dart-sim.svg)](https://repology.org/project/dart-sim/versions) [![Anaconda-Server Badge](https://anaconda.org/conda-forge/dartsim/badges/version.svg)](https://anaconda.org/conda-forge/dartsim) [![PyPI Version](https://img.shields.io/pypi/v/dartpy)](https://pypi.org/project/dartpy/) |
142
+ | Maintenance | [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/dartsim/dart.svg)](http://isitmaintained.com/project/dartsim/dart "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/dartsim/dart.svg)](http://isitmaintained.com/project/dartsim/dart "Percentage of issues still open") |
143
+
144
+ ## Citation
145
+
146
+ If you use DART in an academic publication, please consider citing this [JOSS Paper](https://doi.org/10.21105/joss.00500) [[BibTeX](https://gist.github.com/jslee02/998b8809e3ae1b7aef6ef04dd2ad5e27)]
@@ -0,0 +1,64 @@
1
+ dartpy.cpython-313-x86_64-linux-gnu.so,sha256=OTgyGC_cXMKNohF1HOvjmqMVffuQATgu6UdiNN3Xs9Y,16634585
2
+ dartpy.libs/libGLU-ff1477cc.so.1.3.1,sha256=BGOW9YiNDomfWCJJH2rKOuL4T6HRsibrN3JsfbJdZbc,506529
3
+ dartpy.libs/libOpenThreads-40f1b21a.so.3.3.1,sha256=5XTb9_ZN88CRLyaVE5j1qV5yjIgsvs2BQj1elGOZ_Xc,55873
4
+ dartpy.libs/libXi-9178a6bd.so.6.1.0,sha256=d7hu2oSLjfb-sHACSGBU4z13CnBF0RP11fwKXIw6qdY,76633
5
+ dartpy.libs/libXxf86vm-8446c95f.so.1.0.0,sha256=qLhK_XFE5RAwCLqEmtHH3Y_-5PjYy9H2Ihvm3fTSJE4,25777
6
+ dartpy.libs/libassimp-6dbf32af.so.5.4.3,sha256=QPIZoW9l7GKAm0PzvBqOY-9msy4e1i8u5vdhGYDf-h0,14026641
7
+ dartpy.libs/libccd-252352d2.so.2.0,sha256=X_z9C2Q_PIRXJPZrrUOxL5HKrMIM67o7llZTEfHjQpM,49945
8
+ dartpy.libs/libconsole_bridge-74a7293d.so.1.0,sha256=clcatrhQCAgpHo1GxPdW2JuCprqzLiqWvRUzKBOQSdk,35337
9
+ dartpy.libs/libfcl-e62f87aa.so.0.7.0,sha256=zUCe91Kvi5SQyD209TzEP5CMz50NiP0LHeVJHNQ7qs8,14943025
10
+ dartpy.libs/libglut-a761335e.so.3.10.0,sha256=I7zh1lntjQxOksji062y6rx1O0-E3PXhbgvBOxarax8,373457
11
+ dartpy.libs/liboctomap-f33cbde0.so.1.10.0,sha256=WxUQrA6cuiExgSleXVjePJ8T_LRvmYQnidB_gkSze_Y,595265
12
+ dartpy.libs/liboctomath-f45b7699.so.1.10.0,sha256=Bmvrm5guWBLHQwB4LcntbTpucx_INeZOymTA_G0WKq4,44329
13
+ dartpy.libs/libosg-918cf1aa.so.3.7.0,sha256=iqd3ChAifBquYmG6xMFjuXK4MLmY_H-YLqr643CDn1o,5504105
14
+ dartpy.libs/libosgDB-d5a653a6.so.3.7.0,sha256=cWe_1ay4QQn5N-uVVBxhFPk8ht1OLxNqXiMXijXoOrw,2204817
15
+ dartpy.libs/libosgGA-92a7c57e.so.3.7.0,sha256=hC7eQXhXOHcwsVOZkIHaExI_Wu1eKJS35Eb9MC20_H8,1239097
16
+ dartpy.libs/libosgManipulator-f07690ad.so.3.7.0,sha256=rvg4NmxD1BeJ-4PWuC3ldwv2y27QM3vqgGVd7sFrWLE,512873
17
+ dartpy.libs/libosgShadow-2d57b09e.so.3.7.0,sha256=84LumZMS74wvzLIpIcqE-Eiw-Pd4PhwzKT8c5QOXZoE,938713
18
+ dartpy.libs/libosgText-b23e4e3d.so.3.7.0,sha256=-pse8TGRfogRHnoUt3VQHgKPxzbmDcy0zCrQTz0SwYQ,646641
19
+ dartpy.libs/libosgUtil-5431abc7.so.3.7.0,sha256=qHQwTpvTZxPD-ZnOrwJkpgsKmAIOBlVCEOzOH798tro,2980609
20
+ dartpy.libs/libosgViewer-6e464f80.so.3.7.0,sha256=oUf9MdUJz9EaPweVnasY5vJChfPPBWosZWJj_S38V8w,1755065
21
+ dartpy.libs/liburdfdom_model-c401d788.so.4.0,sha256=oiELxNxAnH2hdJrQm6yFa2P4ZPfHR7xf0Z_RoFwEuc4,357609
22
+ dartpy.libs/liburdfdom_model_state-9c22f9db.so.4.0,sha256=uoN91CKisAmSzSxl2L-TZeEC74f90qvyjO_tcY0LuZ4,197841
23
+ dartpy.libs/liburdfdom_sensor-ef1de772.so.4.0,sha256=H8Ig53s_ri_5tXB9DWir8sYLCOB7U1P6cWGN4cSVgBE,55705
24
+ dartpy.libs/liburdfdom_world-cc923b78.so.4.0,sha256=G_1xNSQ_pLky_H-dqkbHmdG4fHDVPFxMVAdLLSgriDk,357609
25
+ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ tests/util.py,sha256=Yy24PPwQfjBe-qsWxA8FApawuWHDpKKPGJD1eAzUAJo,472
27
+ tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ tests/integration/test_joint_force_torque.py,sha256=7taMgLk2d1rdGZhYw7G2OZK822TuxylKzrI5rF4MYqc,10246
29
+ tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ tests/unit/collision/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
+ tests/unit/collision/test_collision.py,sha256=snHrpbht3tIm9dOlNoaGr7FTRH6uDCJzsYizieNHChg,7551
32
+ tests/unit/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ tests/unit/common/test_logging.py,sha256=Fggqt5BI1CW2zmcZ_4pbwgZ73gmuuToFZaJ7-gU-gac,415
34
+ tests/unit/common/test_stopwatch.py,sha256=QVUK7BHPHbatPQU0b_LRowFRAmtyzC84ld_Nv80YS9c,1230
35
+ tests/unit/common/test_string.py,sha256=qkW39bDG_d1BG4GJHFcwkDAkJOazu3ap51RvxpkkKNU,1515
36
+ tests/unit/common/test_uri.py,sha256=eZJZj8MQplyTogNAsZJwBkb9mrjnuvLz0BLxD_UvVrw,745
37
+ tests/unit/constraint/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
+ tests/unit/constraint/test_constraint.py,sha256=-CTSY8Aeyhwxvqnw3GtroUt6_RYfwgD7v_cU0ZeQZtA,1361
39
+ tests/unit/dynamics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
+ tests/unit/dynamics/test_aspect.py,sha256=IUTexMqGy_3qxrJGUteGXLmKsU4I2tRuuI-AYu34j90,380
41
+ tests/unit/dynamics/test_body_node.py,sha256=QBz453qGtzlzC56a4118jtrJ4h-I_eU4U00VSRF9sO8,2132
42
+ tests/unit/dynamics/test_inertia.py,sha256=SdAT2KNQ3fW27x8pgq13T9dXyQIcZ1CEvH8b1A55acg,2202
43
+ tests/unit/dynamics/test_inverse_kinematics.py,sha256=xghfdaUs1VUTUfWaciA5mneHCDJnu_Hm5dvGH3hZ6KA,2700
44
+ tests/unit/dynamics/test_joint.py,sha256=8S5ujxUVvuIjiAa4iNPGBOg4aNBvyGnPLR4Uewuvp1A,4439
45
+ tests/unit/dynamics/test_meta_skeleton.py,sha256=TAVYQEPOhUKacjgGo926Z6hBucFU0NHnVLsIiq1FdhA,1058
46
+ tests/unit/dynamics/test_simple_frame.py,sha256=IKVXgckdy9OfZ8T1F51WR2mgQpmdRLhd1KemlGIgivk,1937
47
+ tests/unit/dynamics/test_skeleton.py,sha256=gJoT3CvYX1eXfXdHT2m5Yth15DFG6VlnNuK0iZLLwz4,525
48
+ tests/unit/math/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
+ tests/unit/math/test_random.py,sha256=GgA8UR0Q_9IE4fr46nmvAeugtXSNLUZ0_V8CrOo7f0I,788
50
+ tests/unit/optimizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
+ tests/unit/optimizer/test_optimizer.py,sha256=CyEdYosTjyjzZZfO_KRUJJ2ZE-6I6xub7Wc7AHpb1SE,2491
52
+ tests/unit/simulation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
+ tests/unit/simulation/test_world.py,sha256=YhAyLATFmp7EaPKha9vBSyzxMk_UhHaLHdIf7WWEIl8,1317
54
+ tests/unit/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ tests/unit/utils/test_dart_loader.py,sha256=gvJFiZmSak_82DtjurKUhWhvd5w-liZGtmxvZQuOnxs,2216
56
+ tests/unit/utils/test_mjcf_parser.py,sha256=IUekER9GvMf_3H89Uy85vINdfYGvkyIYC6y7Gk4TnOM,338
57
+ tests/unit/utils/test_sdf_parser.py,sha256=hHUQbo6IkyAtKyOprkjEYhUW0Ked9_7YiINedVSU_sk,465
58
+ tests/unit/utils/test_skel_parser.py,sha256=AlZJ9_bL6ynfqUROK4UHPsHGYBzFLCqL-xl9KnwPGsI,550
59
+ dartpy-6.16.5.dist-info/METADATA,sha256=WHrB4JU7jU0tuCT6uu50hAae9fmBzdNwa8-TUXFNyaI,5124
60
+ dartpy-6.16.5.dist-info/WHEEL,sha256=bcNxuezh3cUsuVGxaomPMuC1AJzl68d75GNJI4GyHpg,153
61
+ dartpy-6.16.5.dist-info/top_level.txt,sha256=uS54APWVBb-a3RHZ0OUaZMgYA3_YFTZ-6m_1uYJFlls,18
62
+ dartpy-6.16.5.dist-info/RECORD,,
63
+ dartpy-6.16.5.dist-info/licenses/LICENSE,sha256=LcwntAgtV7ppDmVvgqFClYONBGCg1sReCTwCqQp-npk,1740
64
+ dartpy-6.16.5.dist-info/sboms/auditwheel.cdx.json,sha256=NerWP0MZpkfHjZRWrLFMIcOaFS2lkIPPQY7xck4wtkE,2762
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.1)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313-manylinux_2_27_x86_64
5
+ Tag: cp313-cp313-manylinux_2_28_x86_64
6
+
@@ -0,0 +1,31 @@
1
+ BSD 2-Clause License
2
+
3
+ Copyright (c) 2011-2016, Humanoid Lab, Georgia Tech Research Corporation
4
+ Copyright (c) 2016-2017, Personal Robotics Lab, Carnegie Mellon University
5
+ Copyright (c) 2011-2019, Graphics Lab, Georgia Tech Research Corporation
6
+ Copyright (c) 2017-2019, Personal Robotics Lab, University of Washington
7
+ Copyright (c) 2017-2019, Open Source Robotics Foundation
8
+ Copyright (c) 2019-2024, The Movement Lab, Stanford University
9
+ Copyright (c) 2019-2025, Jeongseok Lee
10
+ All rights reserved.
11
+
12
+ Redistribution and use in source and binary forms, with or without
13
+ modification, are permitted provided that the following conditions are met:
14
+
15
+ * Redistributions of source code must retain the above copyright notice, this
16
+ list of conditions and the following disclaimer.
17
+
18
+ * Redistributions in binary form must reproduce the above copyright notice,
19
+ this list of conditions and the following disclaimer in the documentation
20
+ and/or other materials provided with the distribution.
21
+
22
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1 @@
1
+ {"bomFormat": "CycloneDX", "specVersion": "1.4", "version": 1, "metadata": {"component": {"type": "library", "bom-ref": "pkg:pypi/dartpy@6.16.5?file_name=dartpy-6.16.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", "name": "dartpy", "version": "6.16.5", "purl": "pkg:pypi/dartpy@6.16.5?file_name=dartpy-6.16.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl"}, "tools": [{"name": "auditwheel", "version": "6.6.0"}]}, "components": [{"type": "library", "bom-ref": "pkg:pypi/dartpy@6.16.5?file_name=dartpy-6.16.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", "name": "dartpy", "version": "6.16.5", "purl": "pkg:pypi/dartpy@6.16.5?file_name=dartpy-6.16.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl"}, {"type": "library", "bom-ref": "pkg:rpm/almalinux/mesa-libGLU@9.0.0-15.el8#ae695714a639f13cc22e61484aa0acb772e9d44ce2541675f63920c8f4c5c035", "name": "mesa-libGLU", "version": "9.0.0-15.el8", "purl": "pkg:rpm/almalinux/mesa-libGLU@9.0.0-15.el8"}, {"type": "library", "bom-ref": "pkg:rpm/almalinux/libXxf86vm@1.1.4-9.el8#9208a17911eaf2939c86558cf3acc7ccf58a30315e6e94ebe22741d6fd7e07eb", "name": "libXxf86vm", "version": "1.1.4-9.el8", "purl": "pkg:rpm/almalinux/libXxf86vm@1.1.4-9.el8"}, {"type": "library", "bom-ref": "pkg:rpm/almalinux/freeglut@3.0.0-9.el8#3a2946991d5a7b938e06786497cecaf675a491cbbc47c3d2b89684a9d010a970", "name": "freeglut", "version": "3.0.0-9.el8", "purl": "pkg:rpm/almalinux/freeglut@3.0.0-9.el8"}, {"type": "library", "bom-ref": "pkg:rpm/almalinux/libXi@1.7.10-1.el8#65fc716d38d0bd8ad193d063ce6351a2b30a74e69ab15efa7cc8042cf18d205a", "name": "libXi", "version": "1.7.10-1.el8", "purl": "pkg:rpm/almalinux/libXi@1.7.10-1.el8"}], "dependencies": [{"ref": "pkg:pypi/dartpy@6.16.5?file_name=dartpy-6.16.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", "dependsOn": ["pkg:rpm/almalinux/mesa-libGLU@9.0.0-15.el8#ae695714a639f13cc22e61484aa0acb772e9d44ce2541675f63920c8f4c5c035", "pkg:rpm/almalinux/libXxf86vm@1.1.4-9.el8#9208a17911eaf2939c86558cf3acc7ccf58a30315e6e94ebe22741d6fd7e07eb", "pkg:rpm/almalinux/freeglut@3.0.0-9.el8#3a2946991d5a7b938e06786497cecaf675a491cbbc47c3d2b89684a9d010a970", "pkg:rpm/almalinux/libXi@1.7.10-1.el8#65fc716d38d0bd8ad193d063ce6351a2b30a74e69ab15efa7cc8042cf18d205a"]}, {"ref": "pkg:rpm/almalinux/mesa-libGLU@9.0.0-15.el8#ae695714a639f13cc22e61484aa0acb772e9d44ce2541675f63920c8f4c5c035"}, {"ref": "pkg:rpm/almalinux/libXxf86vm@1.1.4-9.el8#9208a17911eaf2939c86558cf3acc7ccf58a30315e6e94ebe22741d6fd7e07eb"}, {"ref": "pkg:rpm/almalinux/freeglut@3.0.0-9.el8#3a2946991d5a7b938e06786497cecaf675a491cbbc47c3d2b89684a9d010a970"}, {"ref": "pkg:rpm/almalinux/libXi@1.7.10-1.el8#65fc716d38d0bd8ad193d063ce6351a2b30a74e69ab15efa7cc8042cf18d205a"}]}
@@ -0,0 +1,2 @@
1
+ dartpy_math
2
+ tests
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
tests/__init__.py ADDED
File without changes
File without changes
@@ -0,0 +1,305 @@
1
+ import math
2
+
3
+ import dartpy as dart
4
+ import numpy as np
5
+ import pytest
6
+
7
+
8
+ def read_world(uri: dart.common.Uri):
9
+ options = dart.utils.SdfParser.Options()
10
+ options.mDefaultRootJointType = dart.utils.SdfParser.RootJointType.FIXED
11
+ world = dart.utils.SdfParser.readWorld(uri, options)
12
+ for i in range(world.getNumSkeletons()):
13
+ skel = world.getSkeleton(i)
14
+ for j in range(skel.getNumJoints()):
15
+ joint = skel.getJoint(j)
16
+ joint.setLimitEnforcement(True)
17
+ return world
18
+
19
+
20
+ def test_static():
21
+ # Load world
22
+ world = read_world("dart://sample/sdf/test/force_torque_test.world")
23
+ assert world is not None
24
+ assert world.getNumSkeletons() == 1
25
+
26
+ # Check if the world is correctly loaded
27
+ model_1 = world.getSkeleton(0)
28
+ assert model_1 is not None
29
+ assert model_1.getName() == "model_1"
30
+ assert model_1.getNumBodyNodes() == 2
31
+ assert model_1.getNumJoints() == 2
32
+
33
+ world.setGravity([0, 0, -50])
34
+
35
+ # Simulate 1 step
36
+ world.step()
37
+ t = world.getTime()
38
+
39
+ # Get time step size
40
+ dt = world.getTimeStep()
41
+ assert dt > 0
42
+ assert t == pytest.approx(dt)
43
+
44
+ # Get joint and get force torque
45
+ link_1 = model_1.getBodyNode("link_1")
46
+ assert link_1 is not None
47
+ link_2 = model_1.getBodyNode("link_2")
48
+ assert link_2 is not None
49
+ joint_01 = model_1.getJoint("joint_01")
50
+ assert joint_01 is not None
51
+ joint_12 = model_1.getJoint("joint_12")
52
+ assert joint_12 is not None
53
+
54
+ tf = dart.math.Isometry3()
55
+
56
+ # Run 10 steps
57
+ for _ in range(10):
58
+ world.step()
59
+
60
+ # ----------------------
61
+ # Test joint_01 wrench
62
+ # ----------------------
63
+
64
+ # Reference adjustment for the difference of the joint frame conventions
65
+ # between Gazebo and DART
66
+ tf.set_identity()
67
+ tf.set_translation(joint_01.getTransformFromParentBodyNode().translation())
68
+ parent_frame01 = dart.dynamics.SimpleFrame(
69
+ dart.dynamics.Frame.World(), "parent_frame01", tf
70
+ )
71
+ tf.set_identity()
72
+ tf.set_translation(joint_01.getTransformFromChildBodyNode().translation())
73
+ child_frame01 = dart.dynamics.SimpleFrame(link_1, "child_frame01", tf)
74
+
75
+ parent_f01 = joint_01.getWrenchToParentBodyNode(parent_frame01)
76
+ assert (parent_f01 == [0, 0, 0, 0, 0, 1000]).all()
77
+
78
+ child_f01 = joint_01.getWrenchToChildBodyNode(child_frame01)
79
+ assert (child_f01 == -parent_f01).all()
80
+
81
+ # ----------------------
82
+ # Test joint_12 wrench
83
+ # ----------------------
84
+
85
+ # Reference adjustment for the difference of the joint frame conventions
86
+ # between Gazebo and DART
87
+ tf.set_identity()
88
+ tf.set_translation(joint_12.getTransformFromParentBodyNode().translation())
89
+ parent_frame12 = dart.dynamics.SimpleFrame(link_1, "parent_frame12", tf)
90
+ tf.set_identity()
91
+ tf.set_translation(joint_12.getTransformFromChildBodyNode().translation())
92
+ child_frame12 = dart.dynamics.SimpleFrame(link_2, "child_frame12", tf)
93
+
94
+ parent_f12 = joint_12.getWrenchToParentBodyNode(parent_frame12)
95
+ assert (parent_f12 == [0, 0, 0, 0, 0, 500]).all()
96
+
97
+ child_f12 = joint_12.getWrenchToChildBodyNode(child_frame12)
98
+ assert (child_f12 == -parent_f12).all()
99
+
100
+
101
+ def test_force_torque_at_joint_limits():
102
+ # Load world
103
+ world = read_world("dart://sample/sdf/test/force_torque_test.world")
104
+ assert world is not None
105
+ assert world.getNumSkeletons() == 1
106
+
107
+ # Check if the world is correctly loaded
108
+ model_1 = world.getSkeleton(0)
109
+ assert model_1 is not None
110
+ assert model_1.getName() == "model_1"
111
+ assert model_1.getNumBodyNodes() == 2
112
+ assert model_1.getNumJoints() == 2
113
+
114
+ world.setGravity([0, 0, -50])
115
+
116
+ # Simulate 1 step
117
+ world.step()
118
+ t = world.getTime()
119
+
120
+ # Get time step size
121
+ dt = world.getTimeStep()
122
+ assert dt > 0
123
+ assert t == pytest.approx(dt)
124
+
125
+ # Get joint and get force torque
126
+ link_1 = model_1.getBodyNode("link_1")
127
+ assert link_1 is not None
128
+ link_2 = model_1.getBodyNode("link_2")
129
+ assert link_2 is not None
130
+ joint_01 = model_1.getJoint("joint_01")
131
+ assert joint_01 is not None
132
+ joint_12 = model_1.getJoint("joint_12")
133
+ assert joint_12 is not None
134
+
135
+ # Change gravity so that the top link topples over, then remeasure
136
+ world.setGravity([-30, 10, -50])
137
+
138
+ # Wait for dynamics to be stabilized
139
+ for i in range(2000):
140
+ world.step()
141
+
142
+ tf = dart.math.Isometry3()
143
+
144
+ # Run 5 steps
145
+ for _ in range(5):
146
+ world.step()
147
+
148
+ # ----------------------
149
+ # Test joint_01 wrench
150
+ # ----------------------
151
+
152
+ # Reference adjustment for the difference of the joint frame conventions
153
+ # between Gazebo and DART
154
+ tf.set_identity()
155
+ tf.set_translation(joint_01.getTransformFromParentBodyNode().translation())
156
+ parent_frame01 = dart.dynamics.SimpleFrame(
157
+ dart.dynamics.Frame.World(), "parent_frame01", tf
158
+ )
159
+ tf.set_identity()
160
+ tf.set_translation(joint_01.getTransformFromChildBodyNode().translation())
161
+ child_frame01 = dart.dynamics.SimpleFrame(link_1, "child_frame01", tf)
162
+
163
+ parent_f01 = joint_01.getWrenchToParentBodyNode(parent_frame01)
164
+ assert np.isclose(
165
+ parent_f01, [750, 0, -450, 600, -200, 1000], rtol=0.1, atol=4.5
166
+ ).all()
167
+
168
+ child_f01 = joint_01.getWrenchToChildBodyNode(child_frame01)
169
+ assert np.isclose(
170
+ child_f01, [-750, -450, 0, -600, 1000, 200], rtol=0.1, atol=4.5
171
+ ).all()
172
+
173
+ # ----------------------
174
+ # Test joint_12 wrench
175
+ # ----------------------
176
+
177
+ # Reference adjustment for the difference of the joint frame conventions
178
+ # between Gazebo and DART
179
+ tf.set_identity()
180
+ tf.set_translation(joint_12.getTransformFromParentBodyNode().translation())
181
+ parent_frame12 = dart.dynamics.SimpleFrame(link_1, "parent_frame12", tf)
182
+ tf.set_identity()
183
+ tf.set_translation(joint_12.getTransformFromChildBodyNode().translation())
184
+ child_frame12 = dart.dynamics.SimpleFrame(link_2, "child_frame12", tf)
185
+
186
+ parent_f12 = joint_12.getWrenchToParentBodyNode(parent_frame12)
187
+ assert np.isclose(
188
+ parent_f12, [250, 150, 0, 300, -500, -100], rtol=0.1, atol=0.1
189
+ ).all()
190
+
191
+ child_f12 = joint_12.getWrenchToChildBodyNode(child_frame12)
192
+ assert np.isclose(
193
+ child_f12, [-250, -150, 0, -300, 500, 100], rtol=0.1, atol=0.1
194
+ ).all()
195
+
196
+
197
+ def test_force_torque_at_joint_limits_with_external_forces():
198
+ # Load world
199
+ world = read_world("dart://sample/sdf/test/force_torque_test2.world")
200
+ assert world is not None
201
+ assert world.getNumSkeletons() == 1
202
+
203
+ # Check if the world is correctly loaded
204
+ model_1 = world.getSkeleton(0)
205
+ assert model_1 is not None
206
+ assert model_1.getName() == "boxes"
207
+ assert model_1.getNumBodyNodes() == 3
208
+ assert model_1.getNumJoints() == 3
209
+ assert model_1.getNumDofs() == 2
210
+
211
+ # The first joint is fixed joint
212
+ assert model_1.getRootJoint().getType() == dart.dynamics.WeldJoint.getStaticType()
213
+
214
+ world.setGravity([0, 0, -50])
215
+
216
+ # Simulate 1 step
217
+ world.step()
218
+ t = world.getTime()
219
+
220
+ # Get time step size
221
+ dt = world.getTimeStep()
222
+ assert dt > 0
223
+ assert t == pytest.approx(dt)
224
+
225
+ # Get joint and get force torque
226
+ link_1 = model_1.getBodyNode("link1")
227
+ assert link_1 is not None
228
+ link_2 = model_1.getBodyNode("link2")
229
+ assert link_2 is not None
230
+ link_3 = model_1.getBodyNode("link3")
231
+ assert link_3 is not None
232
+ joint_12 = model_1.getJoint("joint1")
233
+ assert joint_12 is not None
234
+ joint_23 = model_1.getJoint("joint2")
235
+ assert joint_23 is not None
236
+
237
+ tf = dart.math.Isometry3()
238
+
239
+ # Run 45005 steps
240
+ kp1 = 5e4
241
+ kp2 = 1e4
242
+ target1 = 0
243
+ target2 = -0.25 * math.pi
244
+ steps = 4500
245
+ for _ in range(steps):
246
+ # PD control
247
+ j1_state = joint_12.getPosition(0)
248
+ j2_state = joint_23.getPosition(0)
249
+ p1_error = target1 - j1_state
250
+ p2_error = target2 - j2_state
251
+ effort1 = kp1 * p1_error
252
+ effort2 = kp2 * p2_error
253
+ joint_12.setForce(0, effort1)
254
+ joint_23.setForce(0, effort2)
255
+
256
+ world.step()
257
+
258
+ assert joint_12.getPosition(0) == pytest.approx(target1, abs=1e-1)
259
+ assert joint_23.getPosition(0) == pytest.approx(target2, abs=1e-1)
260
+
261
+ tol = 2
262
+
263
+ # ----------------------
264
+ # Test joint_12 wrench
265
+ # ----------------------
266
+
267
+ # Reference adjustment for the difference of the joint frame conventions
268
+ # between Gazebo and DART
269
+ tf.set_identity()
270
+ tf.set_translation(joint_12.getTransformFromParentBodyNode().translation())
271
+ parent_frame01 = dart.dynamics.SimpleFrame(link_1, "parent_frame01", tf)
272
+ tf.set_identity()
273
+ tf.set_translation(joint_12.getTransformFromChildBodyNode().translation())
274
+ child_frame01 = dart.dynamics.SimpleFrame(link_2, "child_frame01", tf)
275
+
276
+ parent_f01 = joint_12.getWrenchToParentBodyNode(parent_frame01)
277
+ assert np.isclose(parent_f01, [25, -175, 0, 0, 0, 300], rtol=0.01, atol=tol).all()
278
+
279
+ child_f01 = joint_12.getWrenchToChildBodyNode(child_frame01)
280
+ assert np.isclose(child_f01, [-25, 175, 0, 0, 0, -300], rtol=0.01, atol=tol).all()
281
+
282
+ # ----------------------
283
+ # Test joint_23 wrench
284
+ # ----------------------
285
+
286
+ # Reference adjustment for the difference of the joint frame conventions
287
+ # between Gazebo and DART
288
+ tf.set_identity()
289
+ tf.set_translation(joint_23.getTransformFromParentBodyNode().translation())
290
+ parent_frame12 = dart.dynamics.SimpleFrame(link_2, "parent_frame12", tf)
291
+ tf.set_identity()
292
+ tf.set_translation(joint_23.getTransformFromChildBodyNode().translation())
293
+ child_frame12 = dart.dynamics.SimpleFrame(link_3, "child_frame12", tf)
294
+
295
+ parent_f12 = joint_23.getWrenchToParentBodyNode(parent_frame12)
296
+ assert np.isclose(parent_f12, [25, 0, 0, 0, 0, 50], rtol=0.01, atol=tol).all()
297
+
298
+ child_f12 = joint_23.getWrenchToChildBodyNode(child_frame12)
299
+ assert np.isclose(
300
+ child_f12, [-17.678, 0, 17.679, -35.355, 0, -35.355], rtol=0.01, atol=tol
301
+ ).all()
302
+
303
+
304
+ if __name__ == "__main__":
305
+ pytest.main()
tests/unit/__init__.py ADDED
File without changes
File without changes