Skip to content

Commit 063ff93

Browse files
Merge of 42eef44
PiperOrigin-RevId: 608540104 Change-Id: I53b5419003449e825a9c414de9841633bd7f6411
2 parents 9a94dbf + 42eef44 commit 063ff93

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

mjpc/tasks/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ add_custom_target(
116116
${CMAKE_CURRENT_BINARY_DIR}/quadrotor/quadrotor.xml
117117
<${CMAKE_CURRENT_SOURCE_DIR}/quadrotor/quadrotor.xml.patch
118118

119+
## Cube reorientation
120+
# patch cube from common assets
121+
COMMAND patch -o ${CMAKE_CURRENT_BINARY_DIR}/common_assets/cube_modified_shadow_reorient.xml
122+
${CMAKE_CURRENT_BINARY_DIR}/common_assets/reorientation_cube.xml
123+
<${CMAKE_CURRENT_SOURCE_DIR}/common_assets/cube.xml.patch
124+
119125
## Cube solve task
120126
# copy cube model from MuJoCo
121127
COMMAND ${CMAKE_COMMAND} -E copy
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
mjpc/tasks/cube.xml.patch--- common_assets/reorientation_cube.xml 2024-02-11 18:42:07
2+
+++ hand/cube.xml 2024-02-12 14:52:27
3+
@@ -19,9 +19,9 @@
4+
</asset>
5+
<worldbody>
6+
<light pos="0 0 1"/>
7+
- <body name="cube" pos="0.2 0.0 0.075" quat="1 0 0 0">
8+
+ <body name="cube" pos="0.325 0.0 0.075" quat="0.707 0.707 0 0">
9+
<freejoint/>
10+
- <geom name="cube" type="box" size=".03 .03 .03" mass=".122" material="cube"/>
11+
+ <geom name="cube" type="box" size=".022 .022 .022" mass=".126" material="cube"/>
12+
</body>
13+
</worldbody>
14+

mjpc/tasks/shadow_reorient/task.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
<framepos name="trace0" objtype="body" objname="cube"/>
4848
</sensor>
4949

50-
<include file="../common_assets/reorientation_cube.xml"/>
50+
<!-- from: common_assets -->
51+
<include file="../common_assets/cube_modified_shadow_reorient.xml"/>
5152
<!-- from: https://github.com/google-deepmind/mujoco_menagerie/tree/main/shadow_hand -->
5253
<include file="right_hand.xml"/>
5354

0 commit comments

Comments
 (0)