SAPIEN Manipulation Skill Benchmark

Overview

ManiSkill Benchmark

SAPIEN Manipulation Skill Benchmark (abbreviated as ManiSkill, pronounced as "Many Skill") is a large-scale learning-from-demonstrations benchmark for articulated object manipulation with visual input (point cloud and image). ManiSkill supports object-level variations by utilizing a rich and diverse set of articulated objects, and each task is carefully designed for learning manipulations on a single category of objects. We equip ManiSkill with high-quality demonstrations to facilitate learning-from-demonstrations approaches and perform evaluations on common baseline algorithms. We believe ManiSkill can encourage the robot learning community to explore more on learning generalizable object manipulation skills.

Currently, ManiSkill has released 4 different tasks: OpenCabinetDoor, OpenCabinetDrawer, PushChair, and MoveBucket.

Click here for our website and paper.

This README describes how to install ManiSkill, how to run a basic example, and relevant environment details.

Table of Contents:

Updates and Announcements

  • July 29, 2021: The initial version of ManiSkill is released!

Preliminary Knowledge

ManiSkill environment is built on the gym interface. If you have used OpenAI gym or have worked on RL previously, you can skip this section.

In ManiSkill environments, you are controlling a robot to accomplish certain predefined tasks in simulated environments. The tasks are defined by rewards. Every timestep you are given an observation (e.g., point cloud / image) from the environment, and you are required to output an action (a vector) to control the robot.

(* image credits to OpenAI Gym)

Explanations about the above terminologies:

  • Observation: a description about the current state of the simulated environment, which may not contain complete information. Observation is usually represented by several arrays (e.g., point clouds, images, vectors).
  • Action: how an agent interacts with the environment, which is usually represented by a vector.
  • Reward: used to define the goal of an agent, which is usually represented by a scalar value.

What Can I Do with ManiSkill? (TL;DR)

For Computer Vision People

Based on the current visual observations (point clouds / RGBD images), your job is to output an action (a vector). We provide supervision for actions, so training an agent is just supervised learning (more specifically, imitation learning). You can start with little knowledge on robotics and policy learning.

For Reinforcement Learning People

ManiSkill is designed for the generalization of policies and learning-from-demonstrations methods. Some topics you might be interested:

  • how to combine offline RL and online RL
  • generalize a manipulation policy to unseen objects
  • ...

For Robot Learning People

In simulated environments, large-scale learning and planning are feasible. We provide four meaningful daily-life tasks for you as a good test bed.

Getting Started

This section introduces benchmark installation, basic examples, demonstrations, and baselines we provide.

System Requirements

Minimum requirements

  • Ubuntu 18.04 / Ubuntu 20.04 or equivalent Linux distribution. 16.04 is not supported.
  • Nvidia GPU with > 6G memory
  • Nvidia Graphics Driver 460+ (lower versions may work but are untested)

Installation

First, clone this repository and cd into it.

git clone https://github.com/haosulab/sapien-rl-benchmark.git
cd sapien-rl-benchmark

Second, install dependencies listed in environment.yml. It is recommended to use the latest (mini)conda to manage the environment, but you can also choose to manually install the dependencies.

conda env create -f environment.yml
conda activate mani_skill

Lastly, install ManiSkill.

pip install -e .

Basic Example

Here is a basic example for making an environment in ManiSkill and running a random policy in it. You can also run the full script using basic_example.py. ManiSkill environment is built on the OpenAI Gym interface. If you have not used OpenAI Gym before, we strongly recommend reading their documentation first.

import gym
import mani_skill.env

env = gym.make('OpenCabinetDoor-v0')
# full environment list can be found in available_environments.txt

env.set_env_mode(obs_mode='state', reward_type='sparse')
# obs_mode can be 'state', 'pointcloud' or 'rgbd'
# reward_type can be 'sparse' or 'dense'
print(env.observation_space) # this shows the observation structure in Openai Gym's format
print(env.action_space) # this shows the action space in Openai Gym's format

for level_idx in range(0, 5): # level_idx is a random seed
    obs = env.reset(level=level_idx)
    print('#### Level {:d}'.format(level_idx))
    for i_step in range(100000):
        # env.render('human') # a display is required to use this function; note that rendering will slow down the running speed
        action = env.action_space.sample()
        obs, reward, done, info = env.step(action) # take a random action
        print('{:d}: reward {:.4f}, done {}'.format(i_step, reward, done))
        if done:
            break
env.close()

Viewer Tutorial

The env.render('human') line above opens the SAPIEN viewer for interactively debugging the environment. Here is a short tutorial.

Navigation:

  • Use wasd keys to move around (just like in FPS games).
  • Hold Right Mouse Button to rotate the view.
  • Click on any object to select it. Now press f to enter the focus mode. In the focus mode, hold Right Mouse Button to rotate around the object origin. Use wasd to exit the focus mode.
  • Important limitation: do not reset a level while an object is selected, otherwise the program will crash.

Inspection:

  • Pause will keep the rendering running in a loop and pause the simulation. You can look around with the navigation keys when paused.
  • You can use the Scene Hierarchy tool to select objects.
  • Use the Actor/Entity tab and the Articulation tab to view the properties of the selected object.

You can find a more detailed tutorial here.

Utilize Demonstrations

We provide demonstration datasets for each task to facilitate learning-from-demonstrations approaches. Please refer to the documentation here.

Baselines

We provide imitation learning and inverse RL baselines, as well as relevant development kits in ManiSkill-Learn framework. Try it out!

In our challenge, ManiSkill (this repo) contains the environments you need to work on, and ManiSkill-Learn framework contains the baselines provided by us. ManiSkill is a required component for this challenge, but ManiSkill-Learn is not required. However, we encourage you to use ManiSkill-Learn to develop your algorithms and it will help you start quicklier and easier.

FAQ

FAQ page is hosted here.

Environment Details

This section describes some details of the environments in the ManiSkill Benchmark. ManiSkill environments are built on the Gym interface. If you have not used OpenAI Gym before, we strongly recommend reading their documentation first.

Tasks

ManiSkill Benchmark currently contains 4 tasks: OpenCabinetDoor, OpenCabinetDrawer, PushChair, and MoveBucket.

OpenCabinetDoor and OpenCabinetDrawer are examples of manipulating articulated objects with revolute and prismatic joints respectively. The agent is required to open the target door or drawer through the coordination between arm and body.

PushChair exemplifies the ability to manipulate complex underactuated systems. The agent needs to push a swivel chair to a target location. Each chair is typically equipped with several omni-directional wheels and a rotating seat.

MoveBucket is an example of manipulation that heavily relies on two-arm coordination. The agent is required to lift a bucket with a ball in it from the ground onto a platform.

These environments can be constructed by changing the environment name passed to gym.make. Keep reading for more details.

Robots and Actions

The state of the robot is a vector, and the action is also a vector. We have implemented modules compiling the state of the robot into a vector, and modules converting the action vector into the robot control signals. While you do not need to worry about them, the details are provided below in case of you are curious. All the tasks in ManiSkill use similar robots, which are composed of three parts: moving platform, Sciurus robot body, and one or two Franka Panda arm(s). The moving platform can move and rotate on the ground plane, and its height is also adjustable. The robot body is fixed on top of the platform, providing support for the arms. Depending on the task, one or two robot arm(s) are connected to the robot body. There are 22 joints in the dual-arm robot and 13 for the single-arm robot. To match with the realistic robotics setup, we use PID controllers to control the joints of the robots. The robot fingers use position controllers, while all other joints, including the moving platform joints and the arm joints, use velocity controllers. The controllers are internally implemented as augmented PD and PID controllers. The action space corresponds to the normalized target values of all controllers.

Observations

ManiSkill supports three observation modes: state, pointcloud and rgbd, which can be set by env.set_env_mode(obs_mode=obs_mode). For all observation modes, the observation consist of three components: 1) A vector that describes the current state of the robot, including pose, velocity, angular velocity of the moving platform of the robot, joint angles and joint velocities of all robot joints, as well as states of all controllers; 2) A vector that describes task-relevant information, if necessary; 3) Perception of the scene, which has different representations according to the observation modes. In state mode, the perception information is a vector that encodes the full ground truth physical state of the environment (e.g. pose of the manipulated objects); in pointcloud mode, the perception information is a point cloud captured from the mounted cameras on the robot; in rgbd mode, the perception information is RGB-D images captured from the cameras.

Observation Structure for Each Mode

The following script shows the structure of the observations in different observation modes.

# Observation structure for pointcloud mode
obs = {
    'agent': ... , # a vector that describes the agent's state, including pose, velocity, angular velocity of the 
                   # moving platform of the robot, joint angles and joint velocities of all robot joints, 
                   # positions and velocities of end-effectors
    'pointcloud': {
        'rgb': ... , # (N, 3) array, RGB values for each point
        'xyz': ... , # (N, 3) array, position for each point, recorded in the world frame
        'seg': ... , # (N, k) array, k task-relevant segmentation masks, e.g. handle of a cabinet door, each mask is a binary array
    }
}

# Observation structure for rgbd mode
obs = {
    'agent': ... , # a vector that describes agent's state, including pose, velocity, angular velocity of the 
                   # moving platform of the robot, joint angles and joint velocities of all robot joints, 
                   # positions and velocities of end-effectors
    'rgbd': {
        'rgb': ... , # (160, 400, 3*3) array, three RGB images concatenated on the last dimension, captured by three cameras on robot
        'depth': ... , # (160, 400, 3) array, three depth images concatenated on the last dimension
        'seg': ... , # (160, 400, k*3) array, k task-relevant segmentation masks, e.g. handle of a cabinet door, each mask is a binary array
    }
}

# Observation structure for state mode
obs = ... # a vector that describes agent's state, task-relevant information, and object-relevant information; 
          # the object-relevant information includes pose, velocity, angular velocity of the object, 
          # as well as joint angles and joint velocities if it is an articulated object (e.g, cabinet). 
# State mode is commonly used when training and test on the same object, 
# but is not suitable for studying the generalization to unseen objects, 
# as different objects may have completely different state representations. 

The observations obs are typically obtained when resetting and stepping the environment as shown below

# reset
obs = env.reset(level=level_idx)

# step
obs, reward, done, info = env.step(action)

Segmentation Masks

As mentioned in the codes above, we provide task-relevant segmentation masks in pointcloud and rgbd modes. Here are the details about our segmentation masks for each task:

  • OpenCabinetDoor: handle of the target door, target door, robot (3 masks in total)
  • OpenCabinetDrawer: handle of the target drawer, target drawer, robot (3 masks in total)
  • PushChair: robot (1 mask in total)
  • MoveBucket: robot (1 mask in total)

Basically, we provide the robot mask and any mask that is necessary for specifying the target. For example, in OpenCabinetDoor/Drawer environments, a cabinet might have many doors/drawers, so we provide the door/drawer mask such that users know which door/drawer to open. We also provide handle mask such that the users know from which direction the door/drawer should be opened.

Rewards

The reward for the next step can be obtained by obs, reward, done, info = env.step(action). ManiSkill supports two kinds of rewards: sparse and dense. The sparse reward is a binary signal which is equivalent to the task-specific success condition. Learning with sparse reward is very difficult. To alleviate such difficulty, we carefully designed well-shaped dense reward functions for each task. The type of reward can be configured by env.set_env_mode(reward_type=reward_type).

Termination

The agent-environment interaction process is composed of subsequences, each containing a starting point and an ending point, which we call episodes. Examples include plays of a game and trips through a maze.

In ManiSkill tasks, an episode will be terminated if either of the following conditions is satisfied:

  • Go beyond the time limit
    • In all tasks, the time limit for each episode is 200, which should be sufficient to solve the task.
  • Task is solved
    • We design several success metrics for each task, which can be accessed from info['eval_info'].
    • Each metric will be True if and only if some certain conditions are satisfied for 10 consecutive steps.
    • The task is regarded as solved when all the metrics are True at the same time.

Evaluation

We evaluate the performance of a policy (agent) on each task by the mean success rate. A formal description of the challenge submission and evaluation processes can be found here.

Users can also evaluate their policies using the evaluation tools provided by us. Please go through the following steps:

  • Implement your solution following this example
    • If your codes include file paths, please use the relative paths with respect to your code file. (Check this example)
  • Name your solution file user_solution.py
  • Run PYTHONPATH=YOUR_SOLUTION_DIRECTORY:$PYTHONPATH python mani_skill/tools/evaluate_policy.py --env ENV_NAME
    • YOUR_SOLUTION_DIRECTORY is the directory containing your user_solution.py
    • Specify the levels on which you want to evaluate: --level-range 100-200
    • Note that you should active a python environment supporting your user_solution.py before running the script
  • Result will be exported to ./eval_results.csv

Visualization

The environment normally runs in off-screen mode. If you want to visualize the scene in a window and interactively inspect the scene, you need to call

env.render("human")

This function requires your machine to be connected to a display screen, or more specifically, a running x-server. It opens a visualization window that you can interact with. Do note that using this visualization can add additional helper objects or change the appearance of objects in the scene, so you should NOT generate any data for training purposes while the visualizer is open.

The visualizer is based on the SAPIEN viewer, and it provides a lot of debugging functionalities. You can read more about how to use this viewer here. Note: the render function must be called repeatedly to interact with the viewer, and the viewer will not run by itself when the program is paused.

Available Environments

We registered two kinds of environments:

  1. Random-object environment
  • If you call env.reset(), you may get a different object instance (e.g., a different chair in PushChair task).
  • Environment names: OpenCabinetDoor-v0, OpenCabinetDrawer-v0, PushChair-v0, and MoveBucket-v0.
  1. Fixed-object environment
  • Only one object instance will be presented in the environment, and it will never be replaced by other object instances.
  • These environments are registered as simpler versions of the multi-object environments, and they can be used for debugging.
  • Environment name examples: PushChair_3000-v0, OpenCabinetDoor_1000_link_0-v0, ... .

The full list of available environments can be found in available_environments.txt. (Note: OpenCabinetDoor and OpenCabinetDrawer also have Single-link environments, in which the target door or drawer is fixed.)

Advanced Usage

Custom Split

If you want to select some objects to be used in a task (e.g., create training/validation split), we provide an example for you. Let us take the PushChair task as an example. You can create a file such as mani_skill/assets/config_files/chair_models_custom_split_example.yml to specify the objects you want to use. You also need to modify these lines accordingly to register new environments.

Visualization inside Docker

If you want to visualize the environment while running in a Docker, you should give the Docker container access to the graphics card and let the Docker container access your local x-server. When starting the Docker, make sure to pass --gpus all -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 -e XAUTHORITY -e NVIDIA_DRIVER_CAPABILITIES=all -v /tmp/.X11-unix:/tmp/.X11-unix as arguments. For example,

docker run -i -d --gpus all --name maniskill_container  \
  -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 -e XAUTHORITY -e NVIDIA_DRIVER_CAPABILITIES=all -v /tmp/.X11-unix:/tmp/.X11-unix  \
  DOCKER_IMAGE_NAME

Next, connect the x-server by

xhost +local:`docker inspect --format='{{ .Config.Hostname }}' maniskill_container`

You can replace the maniskill_container with your container name.

Conclusion

Now that you have familiarized yourself with the ManiSkill benchmark, you can train and visualize policies on the ManiSkill environments. You may want to play with our baselines and get started with learning-from-demonstrations algorithms.

Acknowledgements

We thank Qualcomm for sponsoring the associated challenge, Sergey Levine and Ashvin Nair for insightful discussions during the whole development process, Yuzhe Qin for the suggestions on building robots, Jiayuan Gu for providing technical support on SAPIEN, and Rui Chen, Songfang Han, Wei Jiang for testing our system.

Citation

TBD

Comments
  • Install problem

    Install problem

    Hi, thanks for sharing this great work! I'm trying to run the basic_example.py after following the installation instructions provided in the readme on our slurm cluster. However, this line env = gym.make('OpenCabinetDoor-v0') cause a segmentation fault and the program crashed. Could you provide some potential tips to solve it?

    cuda 10.1, nvidia 450.142, ubuntu 20, rtx-2080ti

    Thanks

    opened by ray8828 9
  • Unstable Physics of Franka Robot

    Unstable Physics of Franka Robot

    Please see the video linked below... We have found that the robot's physics is not stable when testing our baseline policy. Using the OSC control interface, some parts of robot seem to be "wobbly", swinging randomly. The actions we are doing are" go straight forward, and then lower the body, only controlling the robot's moving base. When the robot's base starts lowering, the grippers would unexpectedly close (as seen in the video).

    Also, we are not sure about how friction works in the simulator because it seems like the handle of the door would slip out of the gripper's grip even if we have a firm grasp... This would increase the difficulty of motion planning dramatically...

    https://drive.google.com/file/d/1gRVYh3ZpBgGGZrCt9Se8mPjm0KK59Ewc/view?usp=sharing

    opened by harryzhangOG 9
  • vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed

    vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed

    Hello, an error occurred to me when I tried to make an maniskill environment, could you help me with it?

    Traceback (most recent call last): File "1.py", line 4, in env = gym.make('OpenCabinetDoor-v0') File "/scratch/makq/.conda/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 145, in make return registry.make(id, **kwargs) File "/scratch/makq/.conda/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 90, in make env = spec.make(**kwargs) File "/scratch/makq/.conda/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 59, in make cls = load(self.entry_point) File "/scratch/makq/.conda/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 18, in load mod = importlib.import_module(mod_name) File "/scratch/makq/.conda/envs/mani_skill/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/scratch/makq/ManiSkill/ManiSkill-SourceCode/mani_skill/env/open_cabinet_door_drawer.py", line 5, in from mani_skill.env.base_env import BaseEnv File "/scratch/makq/ManiSkill/ManiSkill-SourceCode/mani_skill/env/base_env.py", line 59, in _renderer = sapien.VulkanRenderer(default_mipmap_levels=1) RuntimeError: vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed

    opened by 1800012973 8
  • Robot Self-Collision

    Robot Self-Collision

    Hi, we are using the OSC control interface to control the robot arm to reach a target point and rpy pose. However, the twist motion generated results in self-collision. Is self-collision prevention not enforced in the current OSC interface? Thanks.

    Here is the code to reproduce:

            rot = R.from_quat(env.agent.get_pose().q).as_matrix()
            hand_xyz = env.agent.get_pose().p
            T_world_robot = np.vstack([np.hstack([rot, hand_xyz.reshape(3, 1)]), np.array([[0, 0, 0, 1]])])
            T_robot_world = np.linalg.inv(T_world_robot)
            T_world_goal = np.vstack([np.hstack([goal_rpy_mat, goal_xyz.reshape(3, 1)]), np.array([[0, 0, 0, 1]])])
            T_robot_goal = T_robot_world@T_world_goal
            
            from pytransform3d import transformations
            twist_mat = transformations.transform_log_from_transform(T_robot_goal)
    
            deltaV = twist_mat[:3, -1]
            omg_wedge = twist_mat[:3, :3]
            deltaOmg = np.array([omg_wedge[-1, 1], -omg_wedge[-1, 0], omg_wedge[1, 0]])
    
            hand_forward = np.zeros(osc_interface.osc_dim)
            hand_forward[6:9] = deltaV
            hand_forward[9:12] = deltaOmg
            print(hand_forward)
            keep_open = osc_interface.operational_space_and_null_space_to_joint_space(
                                qpos, hand_forward, action[:osc_interface.null_space_dim])
            action = keep_open
    
    opened by harryzhangOG 7
  • rendering in VNC server

    rendering in VNC server

    Hello,

    I'm trying to use 'viewer' for debugging, but when I uncomment env.render('human') in basic_example.py, I get RuntimeError: vk::PhysicalDevice::getSurfaceFormatsKHR: ErrorInitializationFailed when I do this on VNC server. The viewer works well on a local machine.

    I guess the VNC server setting is not a problem since it can render other gym environments like 'Humanoid-v2'.

    I installed vulkan-utils just in case, sudo apt install vulkan-utils. But things didn't change.

    How can I fix this?

    opened by hskAlena 7
  • Motion Planning for OpenCabinetDoor

    Motion Planning for OpenCabinetDoor

    The paper mentions that OpenCabinetDoor "is relatively easy to solve by traditional motion planning and control pipelines." Under what assumptions? Given the optimal grasp pose? Given a map of the environment?

    opened by arjung128 6
  • access to the meshes at each time step

    access to the meshes at each time step

    Hi thanks for sharing the great work!

    I'm generating my customized dataset from the demonstration traj, it would be quite important and helpful if I have the access to the full mesh at each frame, is this possible? Thanks!

    opened by ray8828 6
  • Pose of Articulated Object from Gym Environment

    Pose of Articulated Object from Gym Environment

    When I run the evaluation script on the pre-trained model, the environment name is OpenCabinetDrawer_1045_link_0-v0 and the level is 2153004774. self.env.get_state() returns a 94-dim vector -- what does this correspond to? Can all of this information be used to extract the exact initial articulated object asset_id and pose, or the pose throughout the evaluation episode?

    opened by arjung128 5
  • Runtime error: Vulkan is not initialized

    Runtime error: Vulkan is not initialized

    I installed the ManiSkill environment on a new machine, but when I run basic_example.py there is the problem. File /usr/share/vulkan/icd.d/nvidia_icd.json exists and 'VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json' is ensured

    Traceback (most recent call last): File "/home/shenhao/ManiSkill/basic_example.py", line 7, in env = gym.make('MoveBucket-v0') File "/home/shenhao/anaconda3/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 145, in make return registry.make(id, **kwargs) File "/home/shenhao/anaconda3/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 90, in make env = spec.make(kwargs) File "/home/shenhao/anaconda3/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 60, in make env = cls(_kwargs) File "/home/shenhao/ManiSkill/mani_skill/env/move_bucket.py", line 17, in init super().init( File "/home/shenhao/ManiSkill/mani_skill/env/base_env.py", line 93, in init obs = self.reset(level=0) File "/home/shenhao/ManiSkill/mani_skill/env/move_bucket.py", line 26, in reset super().reset(*args, **kwargs) File "/home/shenhao/ManiSkill/mani_skill/env/base_env.py", line 168, in reset self._setup_cameras() File "/home/shenhao/ManiSkill/mani_skill/env/base_env.py", line 224, in _setup_cameras camera = self._load_camera(cam_info) File "/home/shenhao/ManiSkill/mani_skill/env/base_env.py", line 211, in _load_camera camera = self._scene.add_mounted_camera( RuntimeError: Vulkan is not initialized Segmentation fault (core dumped)

    opened by shen-hhao 5
  • Handle Information in State Mode

    Handle Information in State Mode

    When the environment is in state-mode for the OpenCabinetDrawer task, the 94-dim state vector does not contain the handle information, correct? So for two different cabinet instances, if they have the same pose (i.e. positions, orientations, velocities, etc.), their state vector will be the same (assuming their self.target_indicator is the same), right?

    opened by arjung128 4
  • About Operational Space

    About Operational Space

    Hello, I have some questions about the operational space and EndEffectorInterface.
    1.What is the meaning of 'qpos' in EndEffectorInterface and OperationalSpaceControlInterface? Meanwhile there is a difference when calculating qpos in these two functions: s = np.concatenate([np.zeros(3), s]) # append dummy base qpos in OperationalSpaceControlInterface, and s = np.concatenate([qpos_mobile_base, s]) in EndEffectorInterface, are these two 'qpos' different? 2. What is coordinates the pose and vel (i.e ee_pose) w.r.t? Is it the camera coordinates?

    opened by 1800012973 4
  • How to add wrist camera

    How to add wrist camera

    Hi, I want to add a wrist-mounted camera for the OpenCabinetDrawer env I create a config file for the camera

    name: "wrist"
    position: [0, 0, 1.0]
    rotation: [0.9238795, 0, 0.3826834, 0]  # transforms3d.euler.euler2quat(-np.pi/3*k, np.pi/4, 0, 'rzyx')
    _include: "default_camera.yml"
    

    I try to mount the camera on right_panda_link8 (maybe other link8 is more appropriate) by adding the following code to _load_camera function in base_env.py:

    links = self.agent.robot.get_links()
    if cam_info['name'] == 'wrist':
        camera_mount_actor = links[14]
    

    The left image is the world frame image and the right image is my wrist-mounted camera image. It seems that the camera take a picture from behind the cabinet. How can I adjust the parameter like position, rotation, and camera_mount_actor to get an appropriate wrist-mounted camera? I have tried a lot but can't get the desired camera. 0_17

    opened by Alxead 3
  • vk::PhysicalDevice::createDeviceUnique: ErrorInitializationFailed when running multiple tasks

    vk::PhysicalDevice::createDeviceUnique: ErrorInitializationFailed when running multiple tasks

    hello! I'm working on the basis of mani-skill. When I run one task, everying is ok, but when I'm running 2 tasks(e.g. I run

    python -m tools.run_rl configs/sac/sac_mani_skill_state_1M_train.py --seed=0 --cfg-options "env_cfg.env_name=OpenCabinetDrawer_1000_link_0-v0" --num-gpus 1 --clean-up
    python -m tools.run_rl configs/sac/sac_mani_skill_state_1M_train.py --seed=0 --cfg-options "env_cfg.env_name=OpenCabinetDrawer_1000-v0" --num-gpus 1 --clean-up
    python -m tools.run_rl configs/sac/sac_mani_skill_state_1M_train.py --seed=0 --cfg-options "env_cfg.env_name=OpenCabinetDrawer-v0" --num-gpus 1 --clean-up
    

    at the same time on different gpus). The last instruction will result in an error

    OpenCabinetDrawer_1000-v0 - INFO - 2022-04-22 20:46:49 - Set random seed to 0
    Traceback (most recent call last):
      File "/home/ruichentie/miniconda3/envs/mani_skill/lib/python3.8/runpy.py", line 194, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/home/ruichentie/miniconda3/envs/mani_skill/lib/python3.8/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/home/ruichentie/mani/ManiSkill-Learn/tools/run_rl.py", line 290, in <module>
        main()
      File "/home/ruichentie/mani/ManiSkill-Learn/tools/run_rl.py", line 271, in main
        obs_shape, action_shape, action_space = get_env_info(cfg.env_cfg)
      File "/home/ruichentie/mani/ManiSkill-Learn/mani_skill_learn/env/env_utils.py", line 46, in get_env_info
        env = build_env(env_cfg)
      File "/home/ruichentie/mani/ManiSkill-Learn/mani_skill_learn/env/env_utils.py", line 95, in build_env
        return build_from_cfg(cfg, ENVS, default_args)
      File "/home/ruichentie/mani/ManiSkill-Learn/mani_skill_learn/utils/meta/registry.py", line 132, in build_from_cfg
        return obj_cls(**args)
      File "/home/ruichentie/mani/ManiSkill-Learn/mani_skill_learn/env/env_utils.py", line 60, in make_gym_env
        env = gym.make(env_name, **tmp_kwargs)
      File "/home/ruichentie/miniconda3/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 145, in make
        return registry.make(id, **kwargs)
      File "/home/ruichentie/miniconda3/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 90, in make
        env = spec.make(**kwargs)
      File "/home/ruichentie/miniconda3/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 59, in make
        cls = load(self.entry_point)
      File "/home/ruichentie/miniconda3/envs/mani_skill/lib/python3.8/site-packages/gym/envs/registration.py", line 18, in load
        mod = importlib.import_module(mod_name)
      File "/home/ruichentie/miniconda3/envs/mani_skill/lib/python3.8/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
      File "<frozen importlib._bootstrap>", line 991, in _find_and_load
      File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 848, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/ruichentie/ManiSkill/mani_skill/env/open_cabinet_door_drawer.py", line 5, in <module>
        from mani_skill.env.base_env import BaseEnv
      File "/home/ruichentie/ManiSkill/mani_skill/env/base_env.py", line 59, in <module>
        _renderer = sapien.VulkanRenderer(default_mipmap_levels=1)
    RuntimeError: vk::PhysicalDevice::createDeviceUnique: ErrorInitializationFailed
    

    I'm sure the gpu driver is installed properly ,nvidia_icd.json exists and environment variable set.

    Do you have any idea about this? Thank you!

    opened by crtie 1
Owner
Hao Su's Lab, UCSD
Hao Su's Lab, UCSD
Official implementation of "Accelerating Reinforcement Learning with Learned Skill Priors", Pertsch et al., CoRL 2020

Accelerating Reinforcement Learning with Learned Skill Priors [Project Website] [Paper] Karl Pertsch1, Youngwoon Lee1, Joseph Lim1 1CLVR Lab, Universi

Cognitive Learning for Vision and Robotics (CLVR) lab @ USC 134 Dec 6, 2022
Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet.

Ravens is a collection of simulated tasks in PyBullet for learning vision-based robotic manipulation, with emphasis on pick and place. It features a Gym-like API with 10 tabletop rearrangement tasks, each with (i) a scripted oracle that provides expert demonstrations (for imitation learning), and (ii) reward functions that provide partial credit (for reinforcement learning).

Google Research 367 Jan 9, 2023
Data manipulation and transformation for audio signal processing, powered by PyTorch

torchaudio: an audio library for PyTorch The aim of torchaudio is to apply PyTorch to the audio domain. By supporting PyTorch, torchaudio follows the

null 1.9k Dec 28, 2022
Spatial Intention Maps for Multi-Agent Mobile Manipulation (ICRA 2021)

spatial-intention-maps This code release accompanies the following paper: Spatial Intention Maps for Multi-Agent Mobile Manipulation Jimmy Wu, Xingyua

Jimmy Wu 70 Jan 2, 2023
Spatial Action Maps for Mobile Manipulation (RSS 2020)

spatial-action-maps Update: Please see our new spatial-intention-maps repository, which extends this work to multi-agent settings. It contains many ne

Jimmy Wu 27 Nov 30, 2022
Provided is code that demonstrates the training and evaluation of the work presented in the paper: "On the Detection of Digital Face Manipulation" published in CVPR 2020.

FFD Source Code Provided is code that demonstrates the training and evaluation of the work presented in the paper: "On the Detection of Digital Face M

null 88 Nov 22, 2022
Official Implementation of Swapping Autoencoder for Deep Image Manipulation (NeurIPS 2020)

Swapping Autoencoder for Deep Image Manipulation Taesung Park, Jun-Yan Zhu, Oliver Wang, Jingwan Lu, Eli Shechtman, Alexei A. Efros, Richard Zhang UC

null 449 Dec 27, 2022
ManipulaTHOR, a framework that facilitates visual manipulation of objects using a robotic arm

ManipulaTHOR: A Framework for Visual Object Manipulation Kiana Ehsani, Winson Han, Alvaro Herrasti, Eli VanderBilt, Luca Weihs, Eric Kolve, Aniruddha

AI2 65 Dec 30, 2022
PyTorch Implementation for AAAI'21 "Do Response Selection Models Really Know What's Next? Utterance Manipulation Strategies for Multi-turn Response Selection"

UMS for Multi-turn Response Selection Implements the model described in the following paper Do Response Selection Models Really Know What's Next? Utte

Taesun Whang 47 Nov 22, 2022
Attention-driven Robot Manipulation (ARM) which includes Q-attention

Attention-driven Robotic Manipulation (ARM) This codebase is home to: Q-attention: Enabling Efficient Learning for Vision-based Robotic Manipulation I

Stephen James 84 Dec 29, 2022
Official implementation of "SinIR: Efficient General Image Manipulation with Single Image Reconstruction" (ICML 2021)

SinIR (Official Implementation) Requirements To install requirements: pip install -r requirements.txt We used Python 3.7.4 and f-strings which are in

null 47 Oct 11, 2022
Motion Planner Augmented Reinforcement Learning for Robot Manipulation in Obstructed Environments (CoRL 2020)

Motion Planner Augmented Reinforcement Learning for Robot Manipulation in Obstructed Environments [Project website] [Paper] This project is a PyTorch

Cognitive Learning for Vision and Robotics (CLVR) lab @ USC 49 Nov 28, 2022
Code release for our paper, "SimNet: Enabling Robust Unknown Object Manipulation from Pure Synthetic Data via Stereo"

SimNet: Enabling Robust Unknown Object Manipulation from Pure Synthetic Data via Stereo Thomas Kollar, Michael Laskey, Kevin Stone, Brijen Thananjeyan

null 68 Dec 14, 2022
ManipNet: Neural Manipulation Synthesis with a Hand-Object Spatial Representation - SIGGRAPH 2021

ManipNet: Neural Manipulation Synthesis with a Hand-Object Spatial Representation - SIGGRAPH 2021 Dataset Code Demos Authors: He Zhang, Yuting Ye, Tak

HE ZHANG 194 Dec 6, 2022
This is a vision-based 3d model manipulation and control UI

Manipulation of 3D Models Using Hand Gesture This program allows user to manipulation 3D models (.obj format) with their hands. The project support bo

Cortic Technology Corp. 43 Oct 23, 2022
CLIPort: What and Where Pathways for Robotic Manipulation

CLIPort CLIPort: What and Where Pathways for Robotic Manipulation Mohit Shridhar, Lucas Manuelli, Dieter Fox CoRL 2021 CLIPort is an end-to-end imitat

null 246 Dec 11, 2022
RGB-stacking 🛑 🟩 🔷 for robotic manipulation

RGB-stacking ?? ?? ?? for robotic manipulation BLOG | PAPER | VIDEO Beyond Pick-and-Place: Tackling Robotic Stacking of Diverse Shapes, Alex X. Lee*,

DeepMind 95 Dec 23, 2022
Official implementation of Generalized Data Weighting via Class-level Gradient Manipulation (NeurIPS 2021).

Generalized Data Weighting via Class-level Gradient Manipulation This repository is the official implementation of Generalized Data Weighting via Clas

null 9 Nov 3, 2021