Giter Club home page Giter Club logo

rvo2's Introduction

Optimal Reciprocal Collision Avoidance

Original site: http://gamma.cs.unc.edu/RVO2/ Original repo: https://github.com/snape/RVO2-CS

This is almost a line-for-line port of the C# version of RV02 to pure Python 3. It is not meant to be peformant but simple.

Example:

from rvo.simulator import Simulator

simulator = Simulator()
id0 = simulator.add_agent(Vector2(0, 0))
id1 = simulator.add_agent(Vector2(0, 1))
id2 = simulator.add_agent(Vector2(1, 1))

goal = Vector2(0, 0)
goal0 = goal - simulator.agents_[id0].position_
goal1 = goal - simulator.agents_[id1].position_
goal2 = goal - simulator.agents_[id2].position_

while True:
    simulator.set_agent_pref_velocity(id0, goal0)
    simulator.set_agent_pref_velocity(id1, goal1)
    simulator.set_agent_pref_velocity(id2, goal2)

    simulator.step()

See Circle and Blocks for more involved examples.

rvo2's People

Contributors

jimfleming 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

Watchers

 avatar  avatar  avatar  avatar

rvo2's Issues

Use a thread pool like in the original

This was omitted for simplicity but it would speed things up quite a bit with many agents. Some parts could probably be vectorized but that would be more work.

Example error

Example file (in description) does not work, because agent defaults are not set.
For example:
simulator.set_agent_defaults(2, 4, 1, 1, 1, 14, Vector2(0, 0))

Problem with static obstacles?

When I add extra static obstacles between the robot and the goal, it seems the robot can't figure out the correct V_pref ?

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.