Raise not implemented for frictionloss for now. #1344
PiperOrigin-RevId: 602453907 Change-Id: I0ea506b54f96c4fadc0f29f9ed0a21b0b6a7e5d9
This commit is contained in:
committed by
Copybara-Service
parent
4fe16dd44e
commit
508669a9f2
@@ -31,6 +31,7 @@ MJX
|
|||||||
8. Added ``mjx.ray`` which mirrors :ref:`mj_ray` for planes, spheres, capsules, boxes, and meshes.
|
8. Added ``mjx.ray`` which mirrors :ref:`mj_ray` for planes, spheres, capsules, boxes, and meshes.
|
||||||
9. Added ``mjx.is_sparse`` which mirrors :ref:`mj_isSparse` and ``mjx.full_m`` which mirrors :ref:`mj_fullM`.
|
9. Added ``mjx.is_sparse`` which mirrors :ref:`mj_isSparse` and ``mjx.full_m`` which mirrors :ref:`mj_fullM`.
|
||||||
10. Added support for specifying sparse or dense mass matrices via :ref:`option-jacobian`.
|
10. Added support for specifying sparse or dense mass matrices via :ref:`option-jacobian`.
|
||||||
|
11. Raise a not implemented error when nonzero frictionloss is present. Fixes :github:issue:`1344`.
|
||||||
|
|
||||||
Python bindings
|
Python bindings
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|||||||
@@ -164,6 +164,9 @@ def _validate(m: mujoco.MjModel):
|
|||||||
if f & m.opt.enableflags:
|
if f & m.opt.enableflags:
|
||||||
warnings.warn(f'Ignoring enable flag {f.name}.')
|
warnings.warn(f'Ignoring enable flag {f.name}.')
|
||||||
|
|
||||||
|
if not np.allclose(m.dof_frictionloss, 0):
|
||||||
|
raise NotImplementedError('dof_frictionloss is not implemented.')
|
||||||
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def device_put(value: mujoco.MjData) -> types.Data:
|
def device_put(value: mujoco.MjData) -> types.Data:
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ def put_model(m: mujoco.MjModel, device=None) -> types.Model:
|
|||||||
f'{[mj_type(m) for m in missing]} not supported'
|
f'{[mj_type(m) for m in missing]} not supported'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not np.allclose(m.dof_frictionloss, 0):
|
||||||
|
raise NotImplementedError('dof_frictionloss is not implemented.')
|
||||||
|
|
||||||
opt = _put_option(m.opt, device=device)
|
opt = _put_option(m.opt, device=device)
|
||||||
stat = _put_statistic(m.stat, device=device)
|
stat = _put_statistic(m.stat, device=device)
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<default>
|
<default>
|
||||||
<default class="right_hand">
|
<default class="right_hand">
|
||||||
<mesh scale="0.001 0.001 0.001"/>
|
<mesh scale="0.001 0.001 0.001"/>
|
||||||
<joint axis="1 0 0" damping="0.05" armature="0.0002" frictionloss="0.01"/>
|
<joint axis="1 0 0" damping="0.05" armature="0.0002"/>
|
||||||
<position forcerange="-1 1"/>
|
<position forcerange="-1 1"/>
|
||||||
|
|
||||||
<default class="wrist">
|
<default class="wrist">
|
||||||
|
|||||||
Reference in New Issue
Block a user