https://github.com/junhyeokahn/pypnc
Python Implementation of Planning and Control
https://github.com/junhyeokahn/pypnc
control locomotion machine-learning optimization planning robotics simulation walking-pattern-generation whole-body-control
Last synced: 2 months ago
JSON representation
Python Implementation of Planning and Control
- Host: GitHub
- URL: https://github.com/junhyeokahn/pypnc
- Owner: junhyeokahn
- License: mit
- Created: 2020-09-16T22:18:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T19:52:41.000Z (over 1 year ago)
- Last Synced: 2024-02-27T20:49:13.797Z (over 1 year ago)
- Topics: control, locomotion, machine-learning, optimization, planning, robotics, simulation, walking-pattern-generation, whole-body-control
- Language: C++
- Homepage:
- Size: 51.1 MB
- Stars: 41
- Watchers: 6
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyPnC
PyPnC is a python library designed for generating trajectories for a robot
system and stabilizing the system over the trajectories.## Installation
- Install [anaconda](https://docs.anaconda.com/anaconda/install/)
- 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](https://github.com/ethz-adrl/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}}
```