Coder Social home page Coder Social logo

bcluzel / pypath Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.26 MB

Pathfinding algorithm wrote in C++ for python

License: GNU General Public License v3.0

Python 0.79% Makefile 0.20% C++ 98.97% Objective-C 0.02% Shell 0.02%
pathfinding astar-algorithm

pypath's Introduction

pypath : A* pathfinding algorithm wrote in C++ for python

Build status

The goal of this project is to provide a fast and efficient python library that can find a path given a list of obstacle.

This module was originally developed for EIRBOT the robotic club of the engineer school Enseirb-Matmeca(French school).

REQUIREMENTS

You will need g++ in order to install pypath-fpa!

Avaliables constructors

  • Coordinates(x,y)
  • Size(width,height)
  • Rectangle(Coordinates,Size)
  • Castar()
  • Field()
  • Field(int robot_diameter)
  • Field(int width, int height, int robot_diameter)

Documentation

Click HERE!

How to use

Here is a simple example :

    field = Field(20)
    castar = Castar()
    field.add_obstacle(Rectangle(Coordinates(60,20), Size(2,40)))
    field.add_obstacle(Rectangle(Coordinates(150,40), Size(10,40)))
    field.add_obstacle(Rectangle(Coordinates(80,80), Size(200,2)))
    err, path = castar.find_path_simplified(Coordinates(10,10), Coordinates(10,100), field)
    if err == 0:
        foo(path)
    field.delete_obstacle(Coordinates(10,40))

Author

CLUZEL Baptiste

pypath's People

Contributors

bcluzel avatar

Stargazers

Martin Aucher avatar

Watchers

 avatar

pypath's Issues

No path output

Hi,
Unfortunately I don't get any path data back when I run this code. What am I doing wrong?

thank you

Petop

`
from pypath import*

field = Field(width_mm=300,height_mm=300,robot_diameter_mm=30)

castar = Castar()

err, path = castar.find_path_simplified(start_coordinates=Coordinates(200,200), end_coordinates=Coordinates(50,50), field=field)

print (path)
print (err)
`

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.