Skip to content

Commit

Permalink
Merge pull request #298 from thowell/mjx
Browse files Browse the repository at this point in the history
Aloha MJX task cmake
  • Loading branch information
erez-tom authored Mar 3, 2024
2 parents 55bb4bd + a457b55 commit c1b15e5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ set(MUJOCO_MPC_MUJOCO_GIT_TAG
)

set(MUJOCO_MPC_MENAGERIE_GIT_TAG
8ef01e87fffaa8ec634a4826c5b2092733b2f3c8
8a5f659ac3607dc5adb988e0187f683fe0f4edf4
CACHE STRING "Git revision for MuJoCo Menagerie."
)

Expand Down
24 changes: 24 additions & 0 deletions mjpc/tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,30 @@ add_custom_target(
${CMAKE_CURRENT_BINARY_DIR}/bimanual/aloha.xml
<${CMAKE_CURRENT_SOURCE_DIR}/bimanual/aloha.patch

# MJX ALOHA
COMMAND ${CMAKE_COMMAND} -E copy
${menagerie_SOURCE_DIR}/aloha/mjx_aloha.patch
${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_aloha.patch
COMMAND patch -o ${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_aloha.xml
${CMAKE_CURRENT_BINARY_DIR}/bimanual/aloha.xml
<${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_aloha.patch
COMMAND ${CMAKE_COMMAND} -E copy
${menagerie_SOURCE_DIR}/aloha/scene.xml
${CMAKE_CURRENT_BINARY_DIR}/bimanual/scene.xml
COMMAND ${CMAKE_COMMAND} -E copy
${menagerie_SOURCE_DIR}/aloha/mjx_scene.patch
${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_scene.patch
COMMAND patch -o ${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_scene.xml
${CMAKE_CURRENT_BINARY_DIR}/bimanual/scene.xml
<${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_scene.patch

COMMAND ${CMAKE_COMMAND} -E copy
${menagerie_SOURCE_DIR}/aloha/mjx_integrated_cartesian_actuators.patch
${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_integrated_cartesian_actuators.patch
COMMAND patch -o ${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_integrated_cartesian_actuators.xml
${CMAKE_CURRENT_BINARY_DIR}/bimanual/integrated_cartesian_actuators.xml
<${CMAKE_CURRENT_BINARY_DIR}/bimanual/mjx_integrated_cartesian_actuators.patch

COMMAND ${CMAKE_COMMAND} -E copy
${menagerie_SOURCE_DIR}/robotis_op3/op3.xml
${CMAKE_CURRENT_BINARY_DIR}/op3/op3.xml
Expand Down
2 changes: 1 addition & 1 deletion python/mujoco_mpc/mjx/tasks/bimanual/handover.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_models_and_cost_fn() -> (
):
"""Returns a tuple of the model and the cost function."""
path = epath.Path(
'build/mujoco_menagerie/aloha/'
'build/mjpc/tasks/bimanual/'
)
model_file_name = 'mjx_scene.xml'
xml = (path / model_file_name).read_text()
Expand Down

0 comments on commit c1b15e5

Please sign in to comment.