(a) If you are only running the simulation, you will need Docker Desktop or Docker Engine+Compose. Below are the instructions for each operating system:
- Mac Instructions
- If you are running into a
Illegal Instructionerror when running the scripts below (common on M3 chip), you will need to disableUse Rosetta for x86_64/amd64 emulation on Apple Siliconin Docker DesktopSettings > Virtual Machine Options. Note: this will greatly slow down the simulation.
- If you are running into a
- Windows Instructions
- When pulling submodules below, if you run into a
filename too longerror, rungit config --global core.longpaths true.
- When pulling submodules below, if you run into a
- Ubuntu Instructions: First, install Docker Engine (recommend using apt). Then configure docker as a non-root user. Finally, install Docker Compose.
(b) If you are running on the actual hardware, you will need additionally to setup your computer (COMPUTER 1) and the robots according to instructions in instructions/bimanual_system_setup.md. Note: this requires your computer be Ubuntu with a realtime kernel patch.
Make sure your terminal is in root of this repo (robot_tutorials).
First, pull in the submodules:
git submodule init
git submodule updateNext, build docker container. This will take ~6 minutes and ~6.3GB of space.
docker compose -f docker/compose.bimanual.yaml buildAfter that, start the docker container using one of the following:
# Mac/Windows/Ubuntu
docker compose -f docker/compose.bimanual.yaml run --rm --service-ports bimanual-base
# Ubuntu computer with real-time kernel patch to run code on robot
docker compose -f docker/compose.bimanual.real.yaml run --rm --service-ports bimanual-baseRun the following to test your system in Mujoco. Then go to http://localhost:8765.
python3 -m robot_motion_interface.examples.oscillating_ex --interface mujoco_browserIf you see the robot "dancing" in your browser, as shown below, your system is setup correctly. You are ready to move on to the next step. If you're curious what the script that runs this looks like, you can check it out at libs/robot-stack/robot_motion_interface/src/robot_motion_interface/examples/oscillating_ex.py.
Your task to to make the robot move the block. Fill in tutorial_1.py to complete the task. In the file are examples of functions you can use. To run the program, you can run:
python3 tutorial_1/tutorial_1.py --interface simAn example solution is at tutorial_1_solution.py.
You can run the script you executed in sim (note: this has to be on the computer with the kernel patch... see Requirements section a).
python3 tutorial_1/tutorial_1.py --interface real