Skip to content

pangtao22/quasistatic_simulator

Repository files navigation

Quasi-static Simulator

ci_badge

This repo provides an implementation of a differentiable, convex and quasi-static dynamics model which is effective for contact-rich manipulation planning. The dynamics formulation is described in

Additional interactive animations generated using the code in this repo can be found in this slide deck.

Dependencies

  • Drake built with Gurobi and Mosek. Free solvers (OSQP + SCS) also work, but SCS is a lot slower than Mosek for solving SOCPs.

Note that until this issue is resolved, this repo can only be built in debug mode if the official version of Drake is used, which is a lot slower than release mode. A workaround is described in the issue, but requires a custom branch of drake.

Docker

  1. Remember to check out submodules before building the docker images.
git submodule update --init --recursive
  1. In the root of this repo, to build, run
docker build -t qsim -f ./setup/qsim.dockerfile .

If on Apple Silicon Macs, run

docker buildx build --platform=linux/amd64 -t qsim -f ./setup/qsim.dockerfile .

Beware that compiling is slow! It took M2 Max more than 20 minutes to build the image.

  1. To run the github "build and test" action locally, run
docker run -v $PWD:"/workdir" --workdir="/workdir" --entrypoint "/workdir/setup/run_tests.sh" qsim

If on Apple Silicon Macs, run

docker run -v $PWD:"/workdir" --workdir="/workdir" --platform=linux/amd64 --entrypoint "/workdir/setup/run_tests.sh" qsim

It is also very slow, even slower than building the image and then running the test in CI.


If following the dockerfile and the scripts therein to build locally, it is recommended to set -DCMAKE_BUILD_TYPE=Release. Building in release mode seems to trigger segfaults inside containers.

Running python tests

In the root of the repo, run

pytest .

Multi-threaded testing with pytest-xdist :

pytest . -n auto

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages