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

Aloha MJX task cmake #298

Merged
merged 7 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading