GithubHelp home page GithubHelp logo

kay0u / kraken-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kraken-robotics/kraken-cpp

0.0 2.0 0.0 188 KB

A tentacle-based pathfinding library for nonholonomic robotic vehicles

License: MIT License

CMake 4.32% C++ 95.68%

kraken-cpp's Introduction

License: MIT Build Status

Kraken-cpp is a work in progress !

Kraken-cpp

Kraken-cpp is a C++ port of The Kraken Pathfinding. It is a multithreaded tentacle-based pathfinding library for nonholonomic robotic vehicles. It finds a trajectory followable by a car-like vehicle in the form of a list of points.

Features

The trajectory created by Kraken has several properties, making it suitable for robotic vehicles, namely:

  • position continuity (G0 continuity), orientation continuity (G1 continuity) and curvature piecewise continuity (piecewise G2 continuity);
  • handles forward and backward movement;
  • takes into account the limited linear acceleration and deceleration;
  • limits the radial acceleration.

Kraken has two default modes:

  • find a path given a start position, a start orientation and an end position;
  • find a path given a start position, a start orientation, an end position and an end orientation.

You can easily add new modes that suit your need.

Trajectory example

Great, I have a trajectory. How do my robot follow it ?

Getting the trajectory is only half of the work, because you won't go far if your robot can't follow it. Different control algorithms exist; in this section the Samson control algorithm [1] is presented.

First, recall that the curvature of a curve C at the point P is the inverse of the radius of curvature at P, i.e. the inverse of the radius of the circle that "fits" the best C at P.

Let R be the vehicle and R' its orthogonal projection to the curve and denote θ(R) the orientation of the robot, θ(R') the orientation setpoint at R', κ(R') the curvature setpoint at R' and d the algebric distance between R and R' (d > 0 if the robot is on the left of the curve, d < 0 otherwise).

The curvature setpoint is κ = κ(R') - k₁×d - k₂×(θ(R) - θ(R')), where k₁ and k₂ are two constants depending on the system.

In practice, if the robot has a small orientation error, one can approximate d with (R.y - R'.y) cos(θ(R')) - (R.x - R'.x) sin(θ(R')).

This control algorithm has been successfully used with Kraken in the INTech Senpaï Moon-Rover project (french !).

License

This project is licensed under the MIT license, which is very permissive. I'd love to know the projects that use Kraken; please keep me posted !

Acknowledgements

I would like to thank the INTech robotics club that taught me all I know about robotics and greatly influenced the developpement of Kraken.

Bibliography

[1] Samson, C. (1995). Control of chained systems application to path following and time-varying point-stabilization of mobile robots. IEEE transactions on Automatic Control, 40(1), 64-77.

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.