Giter VIP home page Giter VIP logo

pydart's Introduction

PyDart

====== PyDART is an open source python binding of [DART](https://github.com/dartsim/dart)(4.3.4), an open source physics simulator. All APIs are designed to provide a concise and powerful control on [DART](https://github.com/dartsim/dart) physics worlds. Further, a user can write simulations with a numerous python scientific libraries, such as [NumPy](http://www.numpy.org/)(linear algebra), [SciPy](http://www.scipy.org/)(optimization), [scikit-learn] (http://scikit-learn.org/stable/) (machine learning), [PyBrain](http://pybrain.org/)(machine learning), and so on.

Requirements

sudo aptitude install swig
sudo aptitude install python-numpy python-scipy 
sudo apt-get install python-pip
sudo pip install PyOpenGL PyOpenGL_accelerate

Installation

  • Checkout the project
git clone https://github.com/sehoonha/pydart.git
cd pydart
  • Setup the python package for development
sudo python setup.py develop
  • Compile the API
mkdir build
cd build
cmake ..
make
make install
  • Run the first application
python apps/helloPyDART/main.py

Screenshots

Code snippets

  • Modifying a skeleton pose using dof names (q is still a numerical vector)
q = skel.q
q["j_pelvis_rot_y"] = -0.2
q["j_thigh_left_z", "j_shin_left", "j_heel_left_1"] = 0.15, -0.4, 0.25
q["j_thigh_right_z", "j_shin_right", "j_heel_right_1"] = 0.15, -0.4, 0.25
q["j_abdomen_2"] = 0.0
skel.set_positions(q)
  • Add damping forces to the rigid chain
class DampingController:
    """ Add damping force to the skeleton """
    def __init__(self, skel):
        self.skel = skel

    def compute(self):
        damping = -0.01 * self.skel.qdot
        for i in range(1, self.skel.ndofs, 3):
            damping[i] *= 0.1
        return damping

pydart's People

Contributors

sehoonha avatar

Watchers

James Cloos avatar Jeongseok (JS) Lee avatar  avatar

pydart's Issues

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.