Skip to content

Python Implementation of Planning and Control

License

Notifications You must be signed in to change notification settings

carlosiglezb/PyPnC

This branch is 195 commits ahead of, 2 commits behind junhyeokahn/PyPnC:master.

Folders and files

NameName
Last commit message
Last commit date
Jan 3, 2021
May 31, 2024
May 30, 2024
Jan 12, 2021
Jul 14, 2024
Jul 25, 2024
Jul 11, 2024
Apr 11, 2022
Jun 4, 2024
Jan 30, 2024
Jun 4, 2024
Jul 22, 2024
May 27, 2024
Dec 30, 2020
Apr 23, 2021
Sep 16, 2020
Jul 25, 2024
Jan 13, 2021
Jun 24, 2024
Jul 20, 2023
Jul 25, 2024

Repository files navigation

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

Note: The multicontact modules have only been tested in Ubuntu 20.04 LTS and assumes the environment pypnc_croc.yml is activated.

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}}

About

Python Implementation of Planning and Control

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 48.8%
  • C++ 33.5%
  • C 17.3%
  • Other 0.4%