Coder Social home page Coder Social logo

exbibyte / sample_planning Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 103.11 MB

sample based kinodynamic planning

License: MIT License

Rust 17.23% Shell 0.28% Makefile 0.44% C 73.18% MATLAB 8.87%
kinodynamic sst rrt motion-planning stable-sparse-rrt motion-primitives

sample_planning's Introduction

Briefing

Sample Based Motion Planning.

This project is intended as educational replication of several general ideas:

  • Sparseness
  • Motion Primitives
  • Importance Sampling

A sub-goal of this project is to integrate and leverage benefits of several of these ideas in a hybrid solution.

Inputs to program

  • system dynamics and various constraints are supplied as functions
  • environment obstacles

What's in it:

Writeups, Benchmarks, etc..

project

Running Planner

  • prerequisites
  • build and run in release mode
    • Either:
      • have custom maps already generated (see Generating Custom Maps section)
      • cargo run --release --bin planner -- -p <problem_instance_name> (other program arguments...)
      • see prob_instances.rs for predefined problem domain list
    • Or:
      • cargo run --release --bin planner -- -o <file_obstacle> (other program arguments...)
      • sample obstacle file: obstacles/obs3.txt (randomly generated boxes)
    • Or:
      • have custom maps already generated (see Generating Custom Maps section)
      • cargo run --release --bin planner -- -e <.ele file path> -n <.node file path> (other program arguments...)
        • eg: cargo run --release --bin planner -- -e maps_custom/dragon_age/poly/ost100d.1.ele -n maps_custom/dragon_age/poly/ost100d.1.node -p orz000d -i 1000000 -b 300 -m dubins
      • would need to modify dynamics model file to change goal states, etc.
      • see custom maps section for .ele and .node details
  • optional arguments:
    • -w: show witness node and witness representative pairs
      • drawn as a line(red) with end points (purple: witness), (blue: witness representative)
    • -i <N>: max iterations
    • -m <model>: dynamical model selection (see src/dynamics_* files)
      • variants: dubins, airplane (defaults to dubins)
    • -b <N>: batch N iterations in between rendering calls
    • -h: help
  • optional compile-time features:
    • usage:
      • cargo run --release --bin planner --features nn_naive,disable_pruning,(other features...) -- -p <problem_instance_name> (other program arguments...)
    • variants: see [features] section of Cargo.toml for the list
  • sample program:
    • cargo run --release --bin planner --features nn_sample_log,state_propagate_sample,path_optimize -- -p obs3 -m dubins -i 1000000 -b 200

Generating Random Obstacles (a couple obstacles exists in obstacles/ folder)

  • build and run in release mode with: cargo run --release --bin gen_obs -- -f <output_file_path>
  • required arguments:
    • -f <output_file_path> (eg: cargo run --release --bin gen_obs -- -f obstacles/obs99.txt)
  • optional arguments:
    • -n <N>: number of obstacles to be generated (default: 30)
  • optional features:
    • gen_obs_3d: generate boxes for in 3D domain (defaults to planar domain)

Using Random Obstacles

  • cargo run --release --bin planner -- -o <file_obstacle>
    • -o <file_obstacle>: obstacle file path (eg: -o obstacles/obs2.txt)

Generating Custom Maps (need to run this once in order to use custom maps):

  • a set of maps that is mainly used for benchmarking purposes obtainable from https://www.movingai.com/benchmarks/grids.html can be used, these are located in the /maps_custom folder
  • character movable space within a map are triangulated for use in the planner as the configuration free space
  • triangulation is done using the awesome Triangle software from http://www.cs.cmu.edu/~quake/triangle.html
  • the maps are converted into a format for Triangle to process and output is loadable into our planner and further extruded as triangular prisms for use with a general purpose 3D obstacle detector, these intermediate files are stored at /maps_custom//poly
  • some maps might have bad triangulation not useable for the planner (I aimed for working with Dragon Age maps)
  • generating intermediate files and map assets for our planner
    • 1st, compile Triangle
      • cd Triangle_v1_6
      • make
    • 2nd, run ./script_map2poly.sh (generates formatted file for Triangle, may take a while)
    • 3rd, run ./script_triangulate_poly.sh (outputs 2D triangulation result as .ele and .node files)
    • all set for use...

Screenshots

Simple Environments

drawing drawing drawing drawing drawing

Hard Game Maps

drawing drawing drawing drawing drawing

sample_planning's People

Contributors

exbibyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gitwu12138

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.