Setting Up & Running Zero-Shot Models on Hello Robot Stretch
- Ensure you have red cylindrical gripper tips on your Stretch’s end-effector
- Clone and enter repository
git clone https://github.com/haritheja-e/robot-utility-models.git
cd robot-utility-models
Open 2 terminal windows. On one side follow “Robot Server” instructions and on the other side follow “Imitation in Homes” instructions below.
Robot Server
This is run in the Hello Robot’s root pip environment (outside conda/mamba)
- Enter the
robot-serverfoldercd robot-server
- Install required packages
pip install -r requirements.txt
- Start server
- If using the SE3’s default D405 wrist camera:
python3 start_server.py camera=d405
- If using an iPhone Pro (Record3D app’s USB Streaming)
- Ensure the phone’s angle relative to gripper is 75º using a third-party app (we use “Precise Level” app)
python3 start_server.py camera=iphone
- If using the SE3’s default D405 wrist camera:
Imitation in Homes
- Download mamba with instructions from here, also shown below
- Run the commands below in terminal and follow the instructions
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" bash Miniforge3-$(uname)-$(uname -m).sh
- Re-open shell and run
mamba activateif not already in the base environment
- Run the commands below in terminal and follow the instructions
- Enter the
imitation-in-homesfoldercd imitation-in-homes
- Create and activate environment
mamba env create -f conda_env.yaml
mamba activate home_robot3
- Edit
configs/env_vars/env_vars.yaml- Set
project_rootvariable to your imitation-in-homes directory
- Set
- Load and run the desired policy (VQ-BeT):
python run.py task=door_opening
python run.py task=drawer_opening
python run.py task=reorientation
python run.py task=bag_pick_up
python run.py task=tissue_pick_up
- Ensure the device you’re SSH-ing from and the robot are on the same network
- Open the UI in your local browser at
http://ROBOT_IP:7860
- Follow the instructions in the UI to run the policy. See the video below for a quick example of using the UI:
- Optionally: run Diffusion Policy by
python run.py --config-name=run_diffusion task=door_opening
python run.py --config-name=run_diffusion task=drawer_opening
python run.py --config-name=run_diffusion task=reorientation
python run.py --config-name=run_diffusion task=bag_pick_up
python run.py --config-name=run_diffusion task=tissue_pick_up
- Note: Diffusion Policy will run very slow on the robot’s CPU (upwards of 5 seconds per step). Modify the following to run on a GPU workstation:
- Ensure the robot and GPU workstation are on the same network
- In
robot-server/configs/network/network.yamlon your robot, sethost_addressto your robot’s IP
remote_addressto your workstation’s IP
- Then run
python3 start_server.py
- We now instead run
run.pyon the workstation. Inimitation-in-homes/configs/run_diffusion.yamlon your workstation setnetwork.hostto your workstation’s IP
network.remoteto your robot’s IP
- Then run the desired
python run.pycommand