Skip to content

Commit

Permalink
revert kp, formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Luo1 committed Apr 19, 2024
1 parent 8a1f547 commit d369447
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions anybotics_anymal_c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,23 @@ description](https://github.com/ANYbotics/anymal_c_simple_description).
11. Softened the contacts of the feet to approximate the effect of rubber.
12. Added `scene.xml` which includes the robot, with a textured groundplane, skybox, and haze.

## MJX
#### MJX

The MuJoCo config in `anymal_c_mjx.xml` has the following edits made specifically for MJX:
A version of the ANYmal C for use in [MJX](https://mujoco.readthedocs.io/en/stable/mjx.html) is available in scene_mjx.xml with the following changes:

* The solver `iterations` and `ls_iterations` were modified for performance.
* `frictionloss` was removed.
* PD gain was re-tuned.
* A custom `init_qpos` was added.
* The friction cone was changed from elliptic to pyramidal.
* All contacts other than the sphere geoms on the feet were turned off. Its contact dimensionality was changed from 6 to 3.
* All contacts other than the sphere geoms on the feet were turned off. Contact dimensionality was changed from 6 to 3.
* Pairwise contacts between feet were turned off to speed up simulation.
* The compiler option was changed to `<option timestep="0.002" iterations="1" solver="Newton"/>`, with `<flag eulerdamp="disable"/>`.
* Some decorative geoms were removed from the torso, to speed up rendering.

*Hint*: Call `mujoco.MjModel.from_xml_path` on `scene.xml` or `scene_mjx.xml`, not on the Anymal files!

[An example of using this XML for policy learning](https://github.com/google-deepmind/mujoco/blob/main/mjx/training_apg.ipynb)

## License

This model is released under a [BSD-3-Clause License](LICENSE).
4 changes: 2 additions & 2 deletions anybotics_anymal_c/anymal_c_mjx.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<mujoco model="anymal_c">
<compiler angle="radian" meshdir="assets" texturedir="assets" autolimits="true"/>
<option timestep="0.002" iterations="1" ls_iterations="4" solver="Newton">
<flag eulerdamp="disable"/>
<flag eulerdamp="disable"/>
</option>
<option cone="pyramidal" impratio="100"/>

Expand All @@ -26,7 +26,7 @@
</default>

<default class="affine">
<position kp="230" ctrlrange="-6.28 6.28" forcerange="-80 80"/>
<position kp="100" ctrlrange="-6.28 6.28" forcerange="-80 80"/>
</default>

</default>
Expand Down
2 changes: 1 addition & 1 deletion anybotics_anymal_c/scene_mjx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
<light pos="0 0 1.5" dir="0 0 -1" directional="true"/>
<geom name="floor" size="0 0 0.05" type="plane" material="groundplane"/>
</worldbody>
</mujoco>
</mujoco>

0 comments on commit d369447

Please sign in to comment.