Skip to content

6. Tutorials & FAQs

Vittorio Caggiano edited this page Apr 8, 2023 · 14 revisions

Installation

How to install RoboHive using pipy?

We recommend installation within a conda environment. If you don't have one yet, create one using

conda create -n robohive python=3
conda activate robohive

It is possible to install RoboHive with:

pip install -U robohive
How to install RoboHive in editable mode?

Follow install instructions at robohive/setup/README.md

How to install RoboHive on a colab?

RoboHive has a detailed colab tutorial to walk you through various steps of installation to env-interactions. Give it a try.

Which MuJoCo bindings does RoboHive supports? How can I pick MuJoCo bindings for RoboHive?

RoboHive supports both MuJoCo bindings - MuJoCo bindings from DeepMind as well as MuJoCo_Py bindings form OpenAI.

Set the environment variable sim_backend=MUJOCO or sim_backend=MUJOCO_PY to choose which binding to use.

Explore Environments

How to explore an environment onscreen using random actions? RoboHive exposes a powerful utility script to examine environments. Following command can be used to examine an environment with random actions.
  $ python robohive/utils/examine_env.py --env_name FrankaReachRandom-v0

Also try the python robohive/utils/examine_env.py --help to view all available options.

How to explore an environment onscreen using actions from specified policy?

RoboHive exposes a powerful utility script to examine environments using actions from a policy. Following command can be used

  $ python robohive/utils/examine_env.py --env_name FrankaReachRandom-v0 --policy_path <path_to_policy>

policy is expected to be a pickle file. The policy class is expected to expose a act = policy.get_actions(observations) method. See robohive/utils/examine_env.py for more details.
Also try the python robohive/utils/examine_env.py --help to view all available options.

How to explore an environment offscreen?

RoboHive exposes a powerful utility script to examine environments. Following command can be used to examine a policy offscreen

  $ python robohive/utils/examine_env.py --env_name FrankaReachRandom-v0 --render offscreen

Also try the python robohive/utils/examine_env.py --help to view all available options for onscreen/offscreen rendering.

Register Environments

How to register a RoboHive environment?

RoboHive environment follow OpenAI's gym API. Environment can be registered like any gym environment. We provide an detailed notebook explaining the process of registering and instantiating a robohive environment at - robohive/tutorials/1_env_registration_and_customization.ipynb

How to customize a existing RoboHive environment?

RoboHive environment follow OpenAI's gym API. We provide an detailed notebook explaining the process of customizing RoboHive's environments at - robohive/tutorials/1_env_registration_and_customization.ipynb

Interact with Environments

How to interact with a RoboHive environment?

RoboHive environment follow OpenAI's gym API. Environment interactions are similar to any gym environment. We provide an detailed notebook at - robohive/tutorials/1_env_registration_and_customization.ipynb explaining with examples how to interactive with RoboHive's environments.

Explore Simulations

How to render images offscreen form a RoboHive's simulation?

RoboHive simulations are pure MuJoCo models. We provide a tutorial (robohive/tutorials/render_cams.py) showing ways to render images offscreen and save using a mujoco model

Explore Robots

How to interact with a RoboHive's Robot without the environment?

RoboHive provides an explicit robot class that hides the differences between the sim and the real allowing uses to seamlessly switch between the two. We provide a tutorial (/robohive/tutorials/examine_robot.py) to demonstrate how to use the RoboHive's Robot class in isolation. This usecase is common in scenarios where the entire env definitions aren't required for experiments. In this tutorial we demonstrate how we can use the RoboHive's Franka Robot in the real world using specifications available in a hardware config file.

    # python tutorials/examine_robot.py --sim_path PATH_robot_sim.xml --config_path PATH_robot_configurations.config
    $ python tutorials/examine_robot.py --sim_path envs/arms/franka/assets/franka_reach_v0.xml --config_path envs/arms/franka/assets/franka_reach_v0.config

Inverse Kinematics

How to use RoboHive's inverse kinematics (with min jerk)?

RoboHive provides support for inverse kinematics. We provide a tutorial (/robohive/tutorials/ik_minjerk_trajectory.py) to demonstrate how to use the RoboHive's inverse kinematics with a min jerk trajectories.

python tutorials/ik_minjerk_trajectory.py --sim_path envs/arms/franka/assets/franka_busbin_v0.xml

Tele-Operation

How to use RoboHive's teleoperation capabilities with keyboard/ spacenave?

RoboHive provides support for teleoperation. We provide a tutorial (/robohive/tutorials/ee_teleop.py) to demonstrate how to use RoboHive's teleoperation capabilities over an environment to collect data

python robohive/tutorials/ee_teleop.py -e rpFrankaRobotiqData-v0
How to use RoboHive's teleoperation capabilities with oculus controller?

RoboHive provides support for teleoperation. We provide a tutorial (robohive/tutorials/ee_teleop_oculus.py) to demonstrate how to use RoboHive's teleoperation capabilities over an environment to collect data

python tutorials/ee_teleop.py -e rpFrankaRobotiqData-v0
How do I setup RoboHive's teleoperation in the sim/ real?

RoboHive provides support for teleoperation. We provide a video tutorial to walk you through RoboHive's

  • installation
  • teleoperation capabilities over an environment to collect data
  • Easy of switching between simulation and hardware teleoperation
Clone this wiki locally