SenseNet is a sensorimotor and touch simulator for deep reinforcement learning research

Overview

SenseNet

SenseNet is a sensorimotor and touch simulator to teach AIs how to interact with their environments via sensorimotor systems and touch neurons. SenseNet is meant as a research framework for machine learning researchers and theoretical computational neuroscientists.

gestures

Reinforcement learning

SenseNet can be used in reinforcement learning environments. The original code used OpenAI's gym as the base and so any code written for gym can be used with little to no tweaking of your code. Oftentimes you can just replace gym with sensenet and everything will work. Additionally, SenseNet can be used

Supported Systems

We currently support Mac OS X and Linux (ubuntu 14.04), Windows mostly works, but we don't have a windows developer. We also have docker and vagrant/virtualbox images for you to run an any platform that supports them.

Install from source

git clone http://github.com/jtoy/sensenet you can run "pip install -r requirements.txt" to install all the python software dependencies pip install -e '.[all]'

Install the fast way:

pip install sensenet

Train an basic RL agent to learn to touch a missile with "6th sense":

python examples/agents/reinforce.py -e TouchWandEnv-v0

Dataset

I have made and collected thousands of different objects to manipulate in the simulator. You can use the SenseNet dataset or your own dataset. Download the full dataset at https://sensenet.ai

dataset

Testing

we use pytest to run tests, to tun the tests just type "cd tests && pytest" from the root directory

running benchmarks

Included with SenseNet are several examples for competing on the benchmark "blind object classification" There is a pytorch example and a tensorflow example. to run them: cd agents && python reinforce.py

to see the graphs: tensorboard --logdir runs then go to your browser at http://localhost:6000/ python setup.py register sdist upload

Comments
  • touch / camera sensor needs to be more accurate

    touch / camera sensor needs to be more accurate

    it works on certain angles, but not all angles. need to test and verify this. this is how the could should work:

    You will need to compute the viewmatrix, based on the index finger world transform matrix. You can get this using the pybullet.getLinkState API. Then extract the position and orientation form that, and build the view matrix using pybullet.calculateViewMatrix. It is a bit complex, the racecar example (https://github.com/bulletphysics/bullet3/blob/449c8afc118a7f3629bc940c304743a084dcfac6/examples/pybullet/gym/pybullet_envs/bullet/racecarZEDGymEnv.py#L95) computes the camera based on the chassis. The finger world transform 3x3 matrix is basically fwd, left, up vectors.

    opened by jtoy 3
  • better error if path to dataset not found

    better error if path to dataset not found

    better error if path to dataset not found, this is current error:

    python reinforce.py --data_path=../concave_objects --render --obj_type=obj pybullet build time: Nov 30 2017 10:16:07 Vendor: NVIDIA Corporation Renderer: NVIDIA GeForce GT 750M OpenGL Engine Version: 4.1 NVIDIA-10.4.2 310.41.35f01 GLSL: 4.10 b3Printf: Selected demo: Physics Server startThreads creating 1 threads. starting thread 0 started thread 0 MotionThreadFunc thread started Traceback (most recent call last): File "reinforce.py", line 192, in env = SenseEnv(vars(args)) File "../env.py", line 47, in init self.load_object() File "../env.py", line 78, in load_object stlfile = files[random.randrange(0,files.len())] File "/Users/jtoy/miniconda3/lib/python3.6/random.py", line 198, in randrange raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width)) ValueError: empty range for randrange() (0,0, 0) numActiveThreads = 0 stopping threads stopThreads: Thread 0 used: 1 Thread with taskId 0 exiting Thread TERMINATED destroy semaphore semaphore destroyed destroy main semaphore main semaphore destroyed

    good first issue 
    opened by jtoy 2
  • convert objects to concave shapes

    convert objects to concave shapes

    our collisions use convex hull shapes. we want to model more accurately with concave shapes. we need to use VHACD on our objects. see this ticket for more information: https://github.com/bulletphysics/bullet3/issues/1324

    opened by jtoy 1
  • use constraints instead of resetBasePositionAndOrientation

    use constraints instead of resetBasePositionAndOrientation

    we can't use resetBasePositionAndOrientation because that breaks the physics simulation. don't use "resetBasePositionAndOrientation" while simulating, it should be only if you 'reset' the simulation at the start of the simulation.

    Instead, create a 'fixed' constraint, and set its transform. See for example vrhand.py ( https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/vrhand.py )

    hand_cid = p.createConstraint(hand,-1,-1,-1,p.JOINT_FIXED,[0,0,0],[0.1,0,0],[0.500000,0.300006,0.700000],ho)

    Then instead of using resetBasePositionAndOrientation, you use

    p.changeConstraint(hand_cid,e[POSITION],e[ORIENTATION], maxForce=50)

    (pick your max force as suitable)

    opened by jtoy 1
  • TouchWandEnv - wand sticks on object

    TouchWandEnv - wand sticks on object

    While the wand is in contact with the object the movement slows down, giving the appearance that the wand is stuck on the object. This is noticeable during the rendering process.

    Wand should not show an appreciable slowdown while in contact with the object.

    Related to the use of the computeProjectionMatrixFOV and getCameraImage functions. These introduce overhead that causes the time between successive calls to _step, thus giving the appearance of a slowdown.

    opened by philtabor 0
  • TouchWandEnv - number of moves to touch object

    TouchWandEnv - number of moves to touch object

    In the TouchWandEnv it takes the wand approximately 30,000 moves to touch the object.

    In the HandEnv it takes the hand only hundreds of moves to touch the object.

    I suspect this is related to the interplay between the maxForce (in the changeConstraint), the mass of the agent, and the self.move parameter

    These numbers of actions to touch the object should be standardized to enable the use of a universal max_steps parameter

    opened by philtabor 0
  • port this numpy RL example to use sensenet

    port this numpy RL example to use sensenet

    https://gist.github.com/karpathy/a4166c7fe253700972fcbc77e4ea32c5

    this is a pure numpy example. port it to work on sensenet just like our reinforce example: https://github.com/jtoy/sensenet/blob/master/agents/reinforce.py

    opened by jtoy 0
  • logo

    logo

    need to get a logo designed soon. we need to get some concept art designed for this. probably an image with some combination of touch / senses and brains/ artificial intelligence.

    help wanted good first issue 
    opened by jtoy 1
Owner
interesting in understanding intelligence. researching computational models of intelligence, currently focused on embodied cognition research.
null
Deep Reinforcement Learning for mobile robot navigation in ROS Gazebo simulator

DRL-robot-navigation Deep Reinforcement Learning for mobile robot navigation in ROS Gazebo simulator. Using Twin Delayed Deep Deterministic Policy Gra

null 87 Jan 7, 2023
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research

Welcome to AirSim AirSim is a simulator for drones, cars and more, built on Unreal Engine (we now also have an experimental Unity release). It is open

Microsoft 13.8k Jan 5, 2023
Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX

CQL-JAX This repository implements Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX (FLAX). Implementation is built on

Karush Suri 8 Nov 7, 2022
Reinforcement-learning - Repository of the class assignment questions for the course on reinforcement learning

DSE 314/614: Reinforcement Learning This repository containing reinforcement lea

Manav Mishra 4 Apr 15, 2022
Megaverse is a new 3D simulation platform for reinforcement learning and embodied AI research

Megaverse Megaverse is a new 3D simulation platform for reinforcement learning and embodied AI research. The efficient design of the engine enables ph

Aleksei Petrenko 191 Dec 23, 2022
MiniHack the Planet: A Sandbox for Open-Ended Reinforcement Learning Research

MiniHack the Planet: A Sandbox for Open-Ended Reinforcement Learning Research

Facebook Research 338 Dec 29, 2022
FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.

Detectron is deprecated. Please see detectron2, a ground-up rewrite of Detectron in PyTorch. Detectron Detectron is Facebook AI Research's software sy

Facebook Research 25.5k Jan 7, 2023
A resource for learning about deep learning techniques from regression to LSTM and Reinforcement Learning using financial data and the fitness functions of algorithmic trading

A tour through tensorflow with financial data I present several models ranging in complexity from simple regression to LSTM and policy networks. The s

null 195 Dec 7, 2022
A modular framework for vision & language multimodal research from Facebook AI Research (FAIR)

MMF is a modular framework for vision and language multimodal research from Facebook AI Research. MMF contains reference implementations of state-of-t

Facebook Research 5.1k Jan 4, 2023
Deep Learning and Reinforcement Learning Library for Scientists and Engineers 🔥

TensorLayer is a novel TensorFlow-based deep learning and reinforcement learning library designed for researchers and engineers. It provides an extens

TensorLayer Community 7.1k Dec 27, 2022
Deep Learning and Reinforcement Learning Library for Scientists and Engineers 🔥

TensorLayer is a novel TensorFlow-based deep learning and reinforcement learning library designed for researchers and engineers. It provides an extens

TensorLayer Community 7.1k Dec 29, 2022
Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pytorch Lightning 1.4k Jan 1, 2023
PyTorch implementation of Advantage Actor Critic (A2C), Proximal Policy Optimization (PPO), Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation (ACKTR) and Generative Adversarial Imitation Learning (GAIL).

PyTorch implementation of Advantage Actor Critic (A2C), Proximal Policy Optimization (PPO), Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation (ACKTR) and Generative Adversarial Imitation Learning (GAIL).

Ilya Kostrikov 3k Dec 31, 2022
Learning to Communicate with Deep Multi-Agent Reinforcement Learning in PyTorch

Learning to Communicate with Deep Multi-Agent Reinforcement Learning This is a PyTorch implementation of the original Lua code release. Overview This

Minqi 297 Dec 12, 2022
TLoL (Python Module) - League of Legends Deep Learning AI (Research and Development)

TLoL-py - League of Legends Deep Learning Library TLoL-py is the Python component of the TLoL League of Legends deep learning library. It provides a s

null 7 Nov 29, 2022
A TensorFlow implementation of SOFA, the Simulator for OFfline LeArning and evaluation.

SOFA This repository is the implementation of SOFA, the Simulator for OFfline leArning and evaluation. Keeping Dataset Biases out of the Simulation: A

null 22 Nov 23, 2022
A PyTorch Library for Accelerating 3D Deep Learning Research

Kaolin: A Pytorch Library for Accelerating 3D Deep Learning Research Overview NVIDIA Kaolin library provides a PyTorch API for working with a variety

NVIDIA GameWorks 3.5k Jan 7, 2023