Coder Social home page Coder Social logo

mistgen's Introduction

MiSTGen: Minimum Snap Trajectory Generator

1 Overview

Minimum snap trajectory generators can generate smooth trajectories that have minimum snap, pass through specified waypoints and are subject to velocity and acceleration constraints.

2 How to use

3.1 Installing

pip install mistgen

3.2 Usage

from mistgen.mist import mist_generator

myMistGen = mist_generator()

xxs,yys,tts = myMistGen.mist_2d_gen(waypts_ori,v0,a0,ve,ae,T)
vaj_xy = myMistGen.mist_2d_vaj_gen(xxs,yys,tts)
myMistGen.mist_2d_vis(waypts_ori,xxs,yys,tts,vaj_xy,show_wp=True,show_mist_xy=True,show_avj=True,same_plot=False)

# or all in one:
mistTraj = myMistGen.mist_2d_gen_all(waypts_ori,v0,a0,ve,ae,T,show_wp=True,show_mist_xy=True,show_avj=False,same_plot=False)

A simple example:

def main_demo_v010():
	ax = [0.0, 5.0,5.0,0.0]
    ay = [0.0, 0.0,6.0,6.0]
    
    waypts_ori = np.array([ax,ay])
    
    T = 10
    v0 = np.array([0,0])
    a0 = np.array([0,0])
    ve = np.array([0,0])
    ae = np.array([0,0])
    
    myMistGen = mist_generator()
    xxs,yys,tts = myMistGen.mist_2d_gen(waypts_ori,v0,a0,ve,ae,T)
    vaj_xy = myMistGen.mist_2d_vaj_gen(xxs,yys,tts)
    myMistGen.mist_2d_vis(waypts_ori,xxs,yys,tts,vaj_xy,True,True,True)
    yaw_rad,yaw_deg = myMistGen.calc_yaw(vaj_xy[0],vaj_xy[3])

For more example, please do the following:

from mistgen.examples.main_demo_v010 import main_demo_v010
from mistgen.examples.main_demo_v02x import main_demo_v020
from mistgen.examples.main_demo_v02x import main_demo_v021

3 API

Some utils functions:

from utils.T_functions import arrangeT
from utils.T_functions import init_T
from utils.cvxopt_qp import quadprog
from utils.other_utils import computeQ
from utils.other_utils import calc_tvec
from utils.other_utils import re_shape_vaj
from utils.other_utils import poly_val

License

This source code is released under GNU GENERAL PUBLIC LICENSE Version 3 license.

For more questions, please contact author: Zhaoliang ([email protected])

Reference

[1] Minimum Snap Trajectory Generation and Control for Quadrotors

mistgen's People

Contributors

zhz03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lukeb2014

mistgen's Issues

Requirement

Hi,

Very nice and neat work! Is there any requirements to run this? Thanks

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.