Giter VIP home page Giter VIP logo

h-obca's Introduction

H-OBCA

Hierarchical Optimization-Based Collision Avoidance - An algorithm for generating dynamically feasible parking trajectories

Paper describing the theory can be found here.

Short Description

H-OBCA is an optimization-based approach for autonomous parking. It builds on OBCA, which is a recent method for generating obstacle-free trajectories using optimal control.

H-OBCA is able to generate high-quality kino-dynamically feasible obstacle-free trajectories. These trajectories are smooth, and can be accurately tracked by simple low-level path following controllers. A Julia-based implementation is provided.

Examples

H-OBCA for Reverse Parking

H-OBCA for Parallel Parking

How to run the Parking code:

First steps

  1. Change to the directory

  2. Install Julia from https://julialang.org/downloads/ (code tested on version 0.5.1 and 0.6.0)

  3. Open Julia in terminal

  4. Install Julia package JuMP using Pkg.add("JuMP")

  5. Install Julia package Ipopt using Pkg.add("Ipopt")

  6. Install Julia package PyPlot using Pkg.add("PyPlot")

  7. Install Julia package NearestNeighbors using Pkg.add("NearestNeighbors")

  8. Install Julia package ControlSystems using Pkg.add("ControlSystems")

Running the parking example

  1. Start Julia in terminal

  2. Type in terminal: include("setup.jl")

  3. Type in terminal: include("main.jl")

modifying the code

  1. To play with start points, change x0 in main.jl and run the code by: include("main.jl")

  2. If you change anything in one of the collision avoidance problems, you need to activate the changes by running: include("setup.jl")

  3. If you change the size of the car in main.jl, the change also need to be made in collision_check.jl

Note

  1. this code has been tested on Julia 0.5.1 and 0.6.0, and might not run on any other Julia versions

  2. For best results, run code in Julia terminal

h-obca's People

Contributors

xiaojinggeorgezhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

h-obca's Issues

What if there are some dynamic obstacles?

Hi, I think your method is brilliant! However, I think it will work only in a static environment. It calculates the parking trajectory after the driver finds a parking spot and stops the car nearly. So what would happen if there are some dynamic obstacles? If the planning is quickly enough, maybe we can update the map and environment with dynamic obstacles' new pose, but this planning method usually runs for several seconds.
Hope for your help! Thanks!

fail to avoid collision

Hello, Mr. Zhang,

Nice to communicate with you. I'm an software engineer, focused on APA and other autonumous driving technics. and recently, I wanna use h-obca to optimize the parking trajectory which is planned by hybrid a star algorithm.

after computing, the optimized path may have collision with obstacles. I have no idea how to avoid the collision by tunning the parameter of constrains. could you give me some advices on this question? thanks in advance.

btw, the apollo team implement the tdr-obca algorithm base on h-obca, and their source code is written in C++. it seems h-obca is one of the potential and powerful algorithm in path optimization.

have a nice day.

Julia0.6 Pkg doesn't work

Julia's 0.6 version of Pkg.add is not available, and there is no way on the Internet to change the source of julia0.6. I can try running this program with julia 1.2, but there are a lot of bugs in the code. Is there a way to replace the source of julia 0.6 Pkg.add or fix the bug with code below 1.2?
the bug under julia 1.2 is follow
"
ERROR: LoadError: MethodError: no method matching -(::Matrix{Int64}, ::Int64)
For element-wise subtraction, use broadcasting with dot syntax: array .- scalar
Closest candidates are:
-(::T, ::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} at int.jl:86
-(::Union{MathOptInterface.ScalarAffineFunction{T}, MathOptInterface.ScalarQuadraticFunction{T}}, ::T) where T at /home/autolab/.julia/packages/MathOptInterface/GzkIy/src/Utilities/functions.jl:1804
-(::VectorizationBase.VecUnroll{N, W, T, VectorizationBase.MM{W, X, T}}, ::Union{Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}) where {N, W, T<:Union{Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, X} at /home/autolab/.julia/packages/VectorizationBase/e4FnQ/src/base_defs.jl:103
...
Stacktrace:
[1] top-level scope
@ ~/parking/H-OBCA/main.jl:85
[2] include(fname::String)
@ Base.MainInclude ./client.jl:444
[3] top-level scope
@ REPL[13]:1
in expression starting at /home/autolab/parking/H-OBCA/main.jl:85
"
""

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.