diff --git a/README.md b/README.md index eceb4e9..2760463 100644 --- a/README.md +++ b/README.md @@ -22,31 +22,11 @@ Clone the repo: git clone --recurse-submodules git@github.com:BerkeleyAutomation/mirage.git ``` -Install mamba and robostack to enable some python package interplay with ROS: -``` -conda install mamba -c conda-forge -mamba create -n mirage python=3.10 -mamba activate mirage - -# this adds the conda-forge channel to the new created environment configuration -conda config --env --add channels conda-forge -# and the robostack channel -conda config --env --add channels robostack-staging -# remove the defaults channel just in case, this might return an error if it is not in the list which is ok -conda config --env --remove channels defaults - -mamba install ros-humble-desktop - -# Need to reactivate the environment for changes to take effect -mamba deactivate -mamba activate mirage - -# Install for being able to build package -mamba install compilers cmake pkg-config make ninja colcon-common-extensions catkin_tools rosdep -``` +Install ROS 2 and setup the Gazebo Environment for Inpainting by following the instructions in `mirage/mirage/ros_ws/src/README.md` -Install the mirage Python package. +Create a conda environment and install the mirage Python package. ``` +conda create -n mirage --python=3.10 cd mirage pip install -e . ``` @@ -94,7 +74,14 @@ Please take a look at the example_config and the different parameters that can b ## Citation If you utilized the benchmark, please consider citing the paper: ``` -TODO: Add link to ArXiv / publication +@misc{chen2024mirage, + title={Mirage: Cross-Embodiment Zero-Shot Policy Transfer with Cross-Painting}, + author={Lawrence Yunliang Chen and Kush Hari and Karthik Dharmarajan and Chenfeng Xu and Quan Vuong and Ken Goldberg}, + year={2024}, + eprint={2402.19249}, + archivePrefix={arXiv}, + primaryClass={cs.RO} +} ``` ## Contributing diff --git a/mirage/mirage/benchmark/robosuite/evaluate_policy_demo_target_robot_client.py b/mirage/mirage/benchmark/robosuite/evaluate_policy_demo_target_robot_client.py index a031140..d756e0a 100644 --- a/mirage/mirage/benchmark/robosuite/evaluate_policy_demo_target_robot_client.py +++ b/mirage/mirage/benchmark/robosuite/evaluate_policy_demo_target_robot_client.py @@ -216,6 +216,14 @@ def rollout_robot(self, video_skip=5, return_obs=False, camera_names=None, set_o from mirage.infra.ros_inpaint_publisher_sim import ROSInpaintSimData eef_pose = self.compute_eef_pose() eef_pose_matrix = T.pose2mat((eef_pose[:3], eef_pose[3:])) + + # For some reason the Can / Pick and Place task is very weird + # It has a y offset of -0.1 for the base of the robot, so there needs to be a + # 0.1 offset for the ee to match ground truth, this needs more investigation.... + from robosuite.environments.manipulation.pick_place import PickPlace + if isinstance(self.core_env, PickPlace): + eef_pose_matrix[1] += 0.1 + data = ROSInpaintSimData(ros_rgb_img, ros_depth_img, ros_segmentation_mask, eef_pose_matrix, obs['robot0_gripper_qpos'][-1:]) print("Joints including gripper", sent_joint_angles) self.ros_inpaint_publisher.publish_to_ros_node(data) diff --git a/mirage/mirage/ros_ws/src/gazebo_env/description/urdf/panda_arm_hand_camera_scene_robosuite_can.urdf.xacro b/mirage/mirage/ros_ws/src/gazebo_env/description/urdf/panda_arm_hand_camera_scene_robosuite_can.urdf.xacro index 3e7ea5c..e529bb9 100644 --- a/mirage/mirage/ros_ws/src/gazebo_env/description/urdf/panda_arm_hand_camera_scene_robosuite_can.urdf.xacro +++ b/mirage/mirage/ros_ws/src/gazebo_env/description/urdf/panda_arm_hand_camera_scene_robosuite_can.urdf.xacro @@ -4,7 +4,7 @@ - +