Skip to content

Commit

Permalink
Update MJX colab with hfield example.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 641061897
Change-Id: I2d840aa2e696a73d31522b8a94c9c4e0c58d1218
  • Loading branch information
btaba authored and copybara-github committed Jun 6, 2024
1 parent 3ff2857 commit 24e4502
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
Binary file added google_barkour_vb/assets/hfield.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion google_barkour_vb/barkour_vb_mjx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<worldbody>
<body name="torso" childclass="bkvb">
<freejoint name="torso"/>
<camera name="track" pos="0.846 -1.465 0.916" xyaxes="0.866 0.500 0.000 -0.171 0.296 0.940" mode="trackcom"/>
<camera name="track" pos="1.958 -2.348 0.591" xyaxes="0.768 0.641 0.000 -0.101 0.122 0.987" mode="trackcom"/>
<inertial pos="0.0055238 -0.000354563 0.00835899" quat="-0.00150849 0.694899 -0.000198355 0.719106" mass="6.04352"
diaginertia="0.144664 0.12027 0.0511405"/>
<geom class="bkvb/torso" pos="-7.85127e-05 -0.000500734 0" mesh="neck"/>
Expand Down
39 changes: 39 additions & 0 deletions google_barkour_vb/scene_hfield_mjx.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<mujoco model="barkour vB scene">
<include file="barkour_vb_mjx.xml"/>

<statistic center="0 0 0.1" extent="0.8"/>

<visual>
<headlight diffuse="0.6 0.6 0.6" ambient="0.3 0.3 0.3" specular="0 0 0"/>
<rgba haze="0.15 0.25 0.35 1"/>
<global azimuth="120" elevation="-20"/>
</visual>

<asset>
<texture type="skybox" builtin="gradient" rgb1="0.3 0.5 0.7" rgb2="0 0 0" width="512" height="3072"/>
<texture type="2d" name="groundplane" builtin="checker" mark="edge" rgb1="0.2 0.3 0.4" rgb2="0.1 0.2 0.3"
markrgb="0.8 0.8 0.8" width="300" height="300"/>
<material name="groundplane" texture="groundplane" texuniform="true" texrepeat="5 5" reflectance="0.2"/>
<hfield name="hfield" file="assets/hfield.png" size="10 10 .05 0.1"/>
</asset>

<worldbody>
<light pos="0 0 1.5" dir="0 0 -1" directional="true"/>
<camera name="default" pos="0.846 -1.465 0.916" xyaxes="0.866 0.500 0.000 -0.171 0.296 0.940"/>
<geom name="floor" type="hfield" hfield="hfield" conaffinity="1" material="groundplane"/>
</worldbody>

<keyframe>
<key name="home"
qpos="0 0 0.3
1 0 0 0
0.0 0.5 1.0
0.0 0.5 1.0
0.0 0.5 1.0
0.0 0.5 1.0"
ctrl="0.0 0.5 1.0
0.0 0.5 1.0
0.0 0.5 1.0
0.0 0.5 1.0"/>
</keyframe>
</mujoco>

0 comments on commit 24e4502

Please sign in to comment.