This repo provides a suite of PyBullet reinforcement learning environments targeted towards using tactile data as the main form of observation.
- Installation
- Testing Environments
- Training Agents
- Pretrained Agents
- Environment Details
- Observation Details
- Alternate Robot Arms
- Additional Info
This repo has only been developed and tested with Ubuntu 18.04 and python 3.8.
# TODO: install via pypi
git clone https://github.com/ac-93/tactile_gym.git
cd tactile_gym
python setup.py install
Demonstration files are provided for all environments in the example directory. For example, from the base directory run
python examples/demo_example_env.py
to run a user controllable example environment.
The environments use the OpenAI Gym interface so should be compatible with most reinforcement learning librarys.
We use stable-baselines3 for all training, helper scripts are provided in tactile_gym/sb3_helpers/
A simple experiment can be run with simple_sb3_example.py
, a full training script can be run with train_agent.py
. Experiment hyper-params are in the parameters
directory.
Training with image augmentations: If intending to use image augmentations for training, as done in the paper, then this fork of sb3 contrib is required. (TODO: Contribute this to sb3_contrib).
Example PPO/RAD_PPO agents, trained via SB3 are provided for all environments and all observation spaces. These can be downloaded here
and placed in tactile_gym/examples/enjoy
.
In order to demonstrate a pretrained agent from the base directory run
python examples/demo_trained_agent.py -env='env_name' -obs='obs_type' -algo='algo_name'
Environment Name | Description |
---|---|
edge_follow-v0 |
|
surface_follow-v0 |
|
surface_follow-v1 |
|
object_roll-v0 |
|
object_push-v0 |
|
object_balance-v0 |
|
All environments contain 4 main modes of observation:
Observation Type | Description |
---|---|
oracle |
Comprises ideal state information from the simulator, which is difficult information to collect in the real world, we use this to give baseline performance for a task. The information in this state varies between environments but commonly includes TCP pose, TCP velocity, goal locations and the current state of the environment. This observation requires signifcantly less compute both to generate data and for training agent networks. |
tactile |
Comprises images (default 128x128) retrieved from the simulated optical tactile sensor attached to the end effector of the robot arm (Env Figures right). Where tactile information alone is not sufficient to solve a task, this observation can be extended with oracle information retrieved from the simulator. This should only include information that could be be easily and accurately captured in the real world, such as the TCP pose that is available on industrial robotic arms and the goal pose. |
visual |
Comprises RGB images (default 128x128) retrieved from a static, simulated camera viewing the environment (Env Figures left). Currently, only a single camera is used, although this could be extended to multiple cameras. |
visuotactile |
Combines the RGB visual and tactile image observations to into a 4-channel RGBT image. This case demonstrates a simple method of multi-modal sensing. |
When additional information is required to solve a task, such as goal locations, appending _and_feature
to the observation name will return the complete observation.
The majority of testing is done on the simulated UR5 robot arm. The Franka Emika Panda and Kuka LBR iiwa robot arms are additionally provided however there may be bugs when using these arms. Particularly, workframes may need to be adjusted to ensure that arms can comfortably reach all the neccessary configurations. These arms can be used by changing the self.arm_type
flag within the code.
@misc{church2021optical,
title={Optical Tactile Sim-to-Real Policy Transfer via Real-to-Sim Tactile Image Translation},
author={Alex Church and John Lloyd and Raia Hadsell and Nathan F. Lepora},
year={2021},
eprint={2106.08796},
archivePrefix={arXiv},
primaryClass={cs.RO}
}