Giter Site home page Giter Site logo

junhyeokahn / pypnc Goto Github PK

View Code? Open in Web Editor NEW
42.0 6.0 14.0 52.32 MB

Python Implementation of Planning and Control

License: MIT License

Python 37.75% Batchfile 0.03% CMake 0.52% C 20.96% C++ 40.73%
robotics simulation planning control machine-learning optimization walking-pattern-generation whole-body-control locomotion

pypnc's Introduction

PyPnC

PyPnC is a python library designed for generating trajectories for a robot system and stabilizing the system over the trajectories.

Installation

  • Install anaconda
  • Clone the repository:
    $ git clone https://github.com/junhyeokahn/PyPnC.git
  • Create a virtual environment and install dependancies:
    $ conda env create -f pypnc.yml
  • Activate the environment:
    $ conda activate pypnc

Running Examples

Three Link Manipulator Control with Operational Space Control

  • Run the code:
    $ python simulator/pybullet/manipulator_main.py

Atlas Walking Control with DCM planning and IHWBC

  • Run the code:
    $ python simulator/pybullet/atlas_dynamics_main.py
  • Send walking commands through keystroke interface. For example, press 8 for forward walking, press 5 for in-place walking, press 4 for leftward walking, press 6 for rightward walking, press 2 for backward walking, press 7 for ccw turning, and press 9 for cw turning.
  • Plot the results:
    $ python plot/atlas/plot_task.py --file=data/history.pkl

Atlas Locomotion Planning with TOWR+

  • For TOWR+, install additional dependancy ifopt
  • Train a Composite Rigid Body Inertia network and generate files for optimization:
    $ python simulator/pybullet/atlas_crbi_trainer.py and press 5 for training
  • Run TOWR+:
    $ mkdir build && cd build && cmake .. && make -j6 && ./atlas_forward_walk
  • Plot the optimized trajectory:
    $ python plot/plot_towr_plus_trajectory.py --file=data/atlas_forward_walk.yaml --crbi_model_path=data/tf_model/atlas_crbi
  • Replay the optimized trajectory with the robot:
    $ python simulator/pybullet/atlas_kinematics_main.py --file=data/atlas_forward_walk.yaml

Citation

@article{10.3389/frobt.2021.712239,
	author = {Ahn, Junhyeok and Jorgensen, Steven Jens and Bang, Seung Hyeon and Sentis, Luis},
	journal = {Frontiers in Robotics and AI},
	pages = {257},
	title = {Versatile Locomotion Planning and Control for Humanoid Robots},
	volume = {8},
	year = {2021}}

pypnc's People

Contributors

carlosiglezb avatar gemcat avatar junhyeokahn avatar shbang91 avatar

Stargazers

 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pypnc's Issues

Atlas example gets stuck

Not sure what I'm missing here but the Atlas example gets stuck after a few iterations.

I only know this because enabling the control computation time print out shows that it stops. This is not the case for the manipulator example.

Initialize
================================================================================
[WalkingState] STAND
ctrl computation time:  0.01023721694946289
ctrl computation time:  0.010233163833618164
ctrl computation time:  0.009650945663452148
ctrl computation time:  0.010210990905761719
ctrl computation time:  0.012571573257446289
ctrl computation time:  0.014132022857666016
ctrl computation time:  0.009562015533447266
ctrl computation time:  0.008954524993896484
ctrl computation time:  0.008904695510864258
ctrl computation time:  0.011704683303833008
ctrl computation time:  0.011358022689819336
ctrl computation time:  0.008925676345825195
ctrl computation time:  0.008788585662841797
ctrl computation time:  0.01023411750793457
ctrl computation time:  0.009508371353149414
ctrl computation time:  0.00990438461303711
ctrl computation time:  0.009284496307373047
ctrl computation time:  0.010796070098876953
ctrl computation time:  0.009235858917236328
ctrl computation time:  0.01134800910949707
ctrl computation time:  0.010422468185424805

Running on 20.04 LTS. Perhaps that's the issue.

Add reference to paper.

I think it's good add a reference to the paper so that people know what to cite when they use PyPnC to benchmark their whole-body controllers.

Ahn, J., Jorgensen, S. J., Bang, S. H., & Sentis, L. (2021). Versatile Locomotion Planning and Control for Humanoid Robots. Frontiers in Robotics and AI, 257.

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.