Git Product home page Git Product logo

sdf_robot's Introduction

A simple Signed Distance Field(SDF) for use in robotics

Stand-alone python wrap of signed distance field and collision cost implementations for applications in robotics.

Dependencies

Eigen 3.4.0, Pybind11 ,numpy, scipy, plotly.

Build shared library

git clone https://github.com/hzyu17/sdf_robot.git
cd sdf_robot
mkdir build && cd build
cmake ..
make

Tests

cd tests
pytest

Examples

For collision checking on a multi-body robot, a vector of collision checking points in different locations are considered in the workspace.

Each collision checking point is forward transformed to the workspace. A signed distance to the obstacles is first computed elementwise, and then a hinge loss is applied to the signed distance. Finally, a norm weighted by $\Sigma_{\rm obs}$ represents the collision cost.

We define the forward chain as $\mathbf{h}(S(F(X_t)))$, $\mathbf{h}(\cdot)$ is a hinge loss function, $S(\cdot)$ is the signed distance to the obstacles, $F(\cdot)$ represents the forward kinematics for the collision-checking positions, and $\Sigma_{obs}$ is a weight applied on the hinge losses, and the collision cost function is defined as $$ V(X_t) = \left\lVert \mathbf{h}(S(F(X_t))) \right\rVert_{\Sigma_{\text{obs}}}^2. $$

The gradient $\partial_x V$ can be obtained from the chain rule where each chain has a predefined closed form or can be computed using finite difference.

Below is an example of a planar quadrotor with multiple collision-checking points in a planar sdf with one obstacle.

Figure

sdf_robot's People

Contributors

hzyu17 avatar

Watchers

 avatar

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.