Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cube patch for hand task #289

Merged
merged 7 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions mjpc/tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ add_custom_target(
COMMAND patch -o ${CMAKE_CURRENT_BINARY_DIR}/quadrotor/quadrotor_modified.xml
${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}/hand/cube_modified.xml
${CMAKE_CURRENT_BINARY_DIR}/common_assets/reorientation_cube.xml
<${CMAKE_CURRENT_SOURCE_DIR}/hand/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/hand/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
+++ 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/hand/task.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
<framequat name="cube_goal_orientation" objtype="body" objname="goal"/>
</sensor>

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

Expand Down
Loading