Skip to content

Commit

Permalink
Merge pull request #289 from thowell/hand_cube_patch
Browse files Browse the repository at this point in the history
Cube patch for hand task
  • Loading branch information
erez-tom authored Feb 19, 2024
2 parents e83b7d3 + 32b3e0d commit 42eef44
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions mjpc/tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ add_custom_target(
${CMAKE_CURRENT_BINARY_DIR}/quadrotor/quadrotor.xml
<${CMAKE_CURRENT_SOURCE_DIR}/quadrotor/quadrotor.xml.patch

## Cube reorientation
# patch cube from common assets
COMMAND patch -o ${CMAKE_CURRENT_BINARY_DIR}/common_assets/cube_modified_shadow_reorient.xml
${CMAKE_CURRENT_BINARY_DIR}/common_assets/reorientation_cube.xml
<${CMAKE_CURRENT_SOURCE_DIR}/shadow_reorient/cube.xml.patch

## Cube solve task
# copy cube model from MuJoCo
COMMAND ${CMAKE_COMMAND} -E copy
Expand Down
14 changes: 14 additions & 0 deletions mjpc/tasks/shadow_reorient/cube.xml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
mjpc/tasks/cube.xml.patch--- common_assets/reorientation_cube.xml 2024-02-11 18:42:07

This comment has been minimized.

Copy link
@keszegrobert

keszegrobert Nov 19, 2024

Contributor

this line causes the following error:
missing header for unified diff at line 3 of patch

+++ hand/cube.xml 2024-02-12 14:52:27
@@ -19,9 +19,9 @@
</asset>
<worldbody>
<light pos="0 0 1"/>
- <body name="cube" pos="0.2 0.0 0.075" quat="1 0 0 0">
+ <body name="cube" pos="0.325 0.0 0.075" quat="0.707 0.707 0 0">
<freejoint/>
- <geom name="cube" type="box" size=".03 .03 .03" mass=".122" material="cube"/>
+ <geom name="cube" type="box" size=".022 .022 .022" mass=".126" material="cube"/>
</body>
</worldbody>

3 changes: 2 additions & 1 deletion mjpc/tasks/shadow_reorient/task.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
<framepos name="trace0" objtype="body" objname="cube"/>
</sensor>

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

Expand Down

0 comments on commit 42eef44

Please sign in to comment.