Giter Club home page Giter Club logo

conpt's Introduction

CONPT (CONtact-rich trajectory oPTimization)

C++/python codes for contact-implicit trajectory optimization for locomotion and manipulation.

Dependencies

  • Ubuntu 20.04+
  • CMake 3.15+
  • Python 3.6+
  • C++11
  • pybind11
  • Eigen3
  • casadi (SHA "402fe583f0d3cf1fc77d1e1ac933f75d86083124"). Note that when you build casadi from source, make sure you do cmake -DWITH_IPOPT=true.
  • param, originally from here
  • matplotlib-cpp. Note that please install this package in your (native) environment.

Build and Installation

  • The easiest way to install is through CMake. We first install the dependencies:
sudo apt-get install python3-dev cmake libeigen3-dev
  • Then, you need to install casadi and param. For param installation, see this.
  • For casadi, you can also follow this. Note that if you are interested in using optimization solvers such as gurobi, which are not compiled as a default CMake setting of casadi, you need to recompile casadi. Or you can simply run the following commands:
git clone https://github.com/casadi/casadi.git
cd casadi; mkdir build; cd build
cmake ..
cmake --build .
sudo make install
  • Finally, we are ready to build and install ContactRichOpt. To do that, like how we installed casadi, we use CMake as follows:
git clone https://github.com/YukiShirai/ContactRichOpt.git
cd casadi; mkdir build; cd build
cmake ..
cmake --build .
sudo make install
  • and that's it! Note that if your CMake project complains during your cmake .. like:
/usr/bin/ld: cannot find -lContactRichOpt
  • then check where your libContactRichOpt.so was installed. It can be /usr/local/lib. If that's the case, crate symbolic link as follows:
sudo ln -s /usr/local/lib/libContactRichOpt.so /usr/lib/libContactRichOpt.so

Usage for your project in python (under construction)

conpt supports python binding, pyconpt, through pybind11.

  1. Set up virtual environment in conpt/build:
sudo pip3 install virtualenv
virtualenv -p /usr/bin/python3 env
source env/bin/activate
pip install numpy
  1. After you finish installing conpt from source, pyconpt should be ready to be used. For example,
from pyconpt import opt

cartpole = opt.CartPole()

Usage for your project in C++ (under construction)

The easiest way is using CMake.

  1. To call ContactRichOpt in your CMake project, you can do as follows:
find_package(ContactRichOpt REQUIRED)

target_link_libraries(BINARY_NAME
	                    PUBLIC
		                  ContactRichOpt)
  1. Then, in your c++ code,
#include "conpt/CartPole.h"

TODO

  • [] support other toy problems
  • [] support python bindings using pybind11.
  • [] support mixed-integer programming through gurobi
  • [] support stochastic optimization such as chance-constrained optimization.
  • [] integrate with simulator such as pybullet / drake.
  • [] support MPC
  • [] support bilevel optimization
  • [] improve customizability. user should be able to add any constraints through main.cpp.

Citation

@misc{shirai2023ContactRichOpt,
  author = {Yuki Shirai},
  title = {libContactRichOpt},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/YukiShirai/ContactRichOpt}}
}

Contact

If you have any questions, feel free to ask questions via issues or email.

@YukiShirai ([email protected])

Acknowledgements

@ColinTogashi for discussion about CMake and pybind11.

Reference

[1] Y. Shirai, D. K. Jha, A. U. Raghunathan, D. Romeres, "Chance-Constrained Optimization in Contact-Rich Systems for Robust Manipulation", ACC2023

[2] A. U. Raghunathan, D. K. Jha and D. Romeres, "PyROBOCOP: Python-based Robotic Control & Optimization Package for Manipulation", ICRA2022

[3] Y. Shirai, D. K. Jha, A. U. Raghunathan and D. Romeres, "Robust Pivoting: Exploiting Frictional Stability Using Bilevel Optimization", ICRA2022

[4] Y. Shirai et al., "Simultaneous Contact-Rich Grasping and Locomotion via Distributed Optimization Enabling Free-Climbing for Multi-Limbed Robots", IROS2022

[5] Y. Shirai, X. Lin, Y. Tanaka, A. Mehta and D. Hong, "Risk-Aware Motion Planning for a Limbed Robot with Stochastic Gripping Forces Using Nonlinear Programming", IEEE Robotics and Automation Letters, 2020

conpt's People

Contributors

yukishirai avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

xiao-wang007

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.