Giter Club home page Giter Club logo

cloth_simulation's Introduction

cloth_simulation

This repository contains scripts used to simulate cloth physics in 3D under various conditions and interactions.

Files, Scripts, and Directories:

point.py

Contains the Point class, which represents a point mass.

constraint.py

Contains the Constraint class, which represents a relationship between two points that the points try to maintain.

cloth.py

Contains the Cloth class, which represents a collection of points structured into a rectangular grid in 3D along with perpendicular constraints for each point. The cloth is pinned along the top and bottom by default. It can also be grabbed and tensioned by a tensioner object.

circlecloth.py

Contains the CircleCloth class which extends the Cloth class. It is similar, but also has a circular pattern drawn on it with specified dimensions/location, and can be grabbed and tensioned as well. The cloth is pinned along the top and bottom by default as well.

shapecloth.py

Contains a ShapeCloth class which extends the Cloth class. Similar to the CircleCloth class, it has a pattern drawn on it. It takes in a function that specifies whether or not a point is on the outline.

tensioner.py

Contains the Tensioner class which can be used to grab a position on the cloth, and tug it in a direction.

mouse.py

Contains the Mouse class, which can be used as a medium through which a physical or virtual mouse can interact with a cloth.

util.py

Contains utility functions relating to the scripts and objects in the repository.

demo.py

Contains a main method that can be run out of the box to view a demo of the code in action.

To run:

Run python setup.py build_ext --inplace

To run an trial that cuts a predefined trajectory on a Cloth object, run "python demo.py" in the terminal from within the directory containing the scripts. To run a trial that takes in the physical mouse's location on the canvas as the location of the scissors, run "python demo.py manual" in the terminal from within the directory containing the scripts.

simulation.py

Contains a simulation object class that can be used for running simulations with different cloth objects. See the main method for example usage.

To run:

Run python setup.py build_ext --inplace

To run a trial that cuts a predefined trajectory on a CircleCloth object, run "python simulation.py" in the terminal from within the directory containing the scripts.

environment_rep

A package containing environments defined for various experiments with various frameworks such as RLPy or rllab.

config_files

A folder containing configuration files that can be used to generate simulation objects. An example is default.json.

Dependencies

  • Python 2.7
  • Matplotlib
  • Numpy
  • Scipy 0.18.0 or newer
  • Cython
  • IPython

Optional Dependencies

Dependencies that are only required for specific scripts in the repository, but not for core functionality.

  • rllab
  • RLPy
  • OpenAI Gym
  • ROS
  • dvrk_utils

cloth_simulation's People

Contributors

animesh-garg avatar bthananjeyan avatar puririshi98 avatar richardliaw avatar sjyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloth_simulation's Issues

List of issues

  1. Separate the initialization of experiment from object instantiation
  2. Reset doesn't automatically display environment again

More to be added

cc: @bthananjeyan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.