Skip to content

Full kinodynamics constraints for arbitrary robot configurations with factor graphs.

License

Notifications You must be signed in to change notification settings

borglab/GTDynamics

Folders and files

NameName
Last commit message
Last commit date
Apr 4, 2021
Apr 9, 2021
Apr 21, 2021
Apr 8, 2021
Apr 3, 2021
Mar 16, 2021
Apr 7, 2021
Apr 5, 2021
Jan 31, 2020
Apr 4, 2021
Apr 7, 2021
Jan 31, 2020
Apr 5, 2021
Apr 8, 2021

Repository files navigation

GTDynamics

Full kinodynamics constraints for arbitrary robot configurations with factor graphs.

Build Status

GTDynamics is a library that allows the user to express the full kinodynamics constraints of an arbitrary robot configuration on a factor graph. These constraints can be used to solve the forward and inverse dynamics problems.

Dependencies

Installing SDFormat

GTDynamics uses the SDFormat parser to parse SDF/URDF files containing robot descriptions.

Homebrew

Using Homebrew is the easiest way to get SDFormat installed and it also makes switching versions straightforward.

$ # Install homebrew.
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ # Download sdformat to your preferred location.
$ brew tap osrf/simulation
$ brew install sdformat8

Source

Alternatively, you can install from source if you want more fine-tuned control.

We provide an Ubuntu-based process below. Please reference this tutorial for complete details on installing from source.

# Install basic dependencies
sudo apt-get install ruby-dev build-essential libtinyxml-dev libboost-all-dev cmake pkg-config

# sdformat requires libignition-math
sudo apt-get install libignition-math4-dev

# Specifically download sdformat8
wget http://osrf-distributions.s3.amazonaws.com/sdformat/releases/sdformat-8.6.1.tar.bz2

tar -xvjf sdformat-8.6.1.tar.bz2

cd sdformat-8.6.1
mkdir build && cd build

cmake -DCMAKE_INSTALL_PREFIX ../install ..
make -j4
sudo make install

Installing GTDynamics

$ git clone https://github.com/borglab/GTDynamics.git
$ cd GTDynamics
$ mkdir build; cd build
# We can specify the install path with -DCMAKE_INSTALL_PREFIX
$ cmake -DCMAKE_INSTALL_PREFIX ../install ..
$ make
$ sudo make install

Running Tests

$ make check

Running Examples

The /examples directory contains example projects that demonstrate how to include GTDynamics in your application. To run an example, ensure that the CMAKE_PREFIX_PATH is set to the GTDynamics install directory.

  1. Navigate to the example's subdirectory and create a build directory. e.g.
cd GTDynamics/examples/example_forward_dynamics
mkdir build; cd build
  1. Make the example.

If GTDynamics was installed to ~/JohnDoe/gtdynamics_install, then run the cmake command with:

cmake -DCMAKE_PREFIX_PATH=~/JohnDoe/gtdynamics_install ..
make
  1. Run the example!
./exec

Python Wrapper

GTDynamics now supports a Pybind11-based Python API.

To start, please download and install the GTwrap repository.

To compile and install the GTDynamics python library:

  1. In the build directory, run cmake with the flag GTDYNAMICS_BUILD_PYTHON=ON.

    cmake -DGTDYNAMICS_BUILD_PYTHON=ON ..
  2. Build as normal and install the python package.

    make && make python-install
  3. To run the Python tests, you can simply run:

    make python-test

Citing This Work

Please cite the following paper if you use this code as part of any published research:

@misc{2011.06194,
    Author = {Mandy Xie, Alejandro Escontrela, and Frank Dellaert},
    Title = {A Factor-Graph Approach for Optimization Problems with Dynamics Constraints},
    Year = {2020},
    Eprint = {arXiv:2011.06194},
}

About

Full kinodynamics constraints for arbitrary robot configurations with factor graphs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published