Skip to content

Commit

Permalink
Fixed can task
Browse files Browse the repository at this point in the history
  • Loading branch information
KDharmarajanDev committed Apr 29, 2024
1 parent 035e1b3 commit 70e2f6e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 25 deletions.
35 changes: 11 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,11 @@ Clone the repo:
git clone --recurse-submodules [email protected]: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 .
```
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<xacro:include filename="$(find gazebo_env)/urdf/hand_robosuite.xacro"/>
<link name="world" />
<!-- Lift task-->
<xacro:panda_arm connected_to="world" xyz="-0.56 0 10.912"/>
<xacro:panda_arm connected_to="world" xyz="-0.56 -0.1 10.912"/>

<!-- Can task-->
<!-- <xacro:panda_arm connected_to="world" xyz="-0.56 -0.1 10.912"/> -->
Expand Down

0 comments on commit 70e2f6e

Please sign in to comment.