Giter Site home page Giter Site logo

quentin18 / line-track-designer Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 2.04 MB

A library to design line following tracks for robots

Home Page: https://line-track-designer.readthedocs.io/en/latest/

License: MIT License

Python 100.00%
robotics track following python

line-track-designer's Introduction

Line Track Designer

Documentation Status Build Status PyPI PyPI - Python Version License: MIT

Line Track Designer is a library to design line following tracks for robots. With this tool, you can easily edit, save, share and print your tracks with a printer.

Tracks can be created in two different ways:

  • with the command line interface (CLI)
  • with the application programming interface in Python (API)

It uses a PDF file containing tiles to build tracks: PDF

Installation

Line Track Designer can be installed using pip:

pip3 install line-track-designer

Quickstart

For example, we consider a file named track.txt:

3;1 2;1 3;0
2;0 11;0 2;0
3;2 2;1 3;3

This file represents the following track: Track Image

This picture can be obtained with the following command:

linetrack show track.txt

You can also generate documentation for your track using this command:

linetrack savemd track.txt

It generates a markdown file with informations about the track. You can see an example here.

You can also use the API to create tracks:

import numpy as np
from line_track_designer.track import Track


# Arrays for the track
tiles = np.array([
    [3, 2, 3],
    [2, 11, 2],
    [3, 2, 3]
])
orient = np.array([
    [1, 1, 0],
    [0, 0, 0],
    [2, 1, 3]
])

# Creation of the track
track = Track(tiles, orient, 'Test track')

# Save the track
track.save_txt('track.txt')
# Make png file
track.save_img('track.png')
# Make markdown file
track.save_md('track.md', 'Easy track')

For more details, see the documentation here.

Links

Author

Quentin Deschamps: [email protected]

License

MIT

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.