Skip to content

Commit 2657b24

Browse files
committed
cube patch for hand task
1 parent 20e5030 commit 2657b24

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

mjpc/tasks/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ add_custom_target(
110110
COMMAND patch -o ${CMAKE_CURRENT_BINARY_DIR}/quadrotor/quadrotor_modified.xml
111111
${CMAKE_CURRENT_BINARY_DIR}/quadrotor/quadrotor.xml
112112
<${CMAKE_CURRENT_SOURCE_DIR}/quadrotor/quadrotor.xml.patch
113+
114+
## Cube reorientation
115+
# patch cube from common assets
116+
COMMAND patch -o ${CMAKE_CURRENT_BINARY_DIR}/hand/cube_modified.xml
117+
${CMAKE_CURRENT_BINARY_DIR}/common_assets/reorientation_cube.xml
118+
<${CMAKE_CURRENT_SOURCE_DIR}/hand/cube.xml.patch
119+
113120
## Cube solve task
114121
# copy cube model from MuJoCo
115122
COMMAND ${CMAKE_COMMAND} -E copy

mjpc/tasks/hand/cube.xml.patch

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/hand/task.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
<framequat name="cube_goal_orientation" objtype="body" objname="goal"/>
4747
</sensor>
4848

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

0 commit comments

Comments
 (0)