Skip to main content

Build status GitHub latest commit PyPI download month PyPi version Documentation Status

Track Generator

Simple generator to create tracks (ground textures for vehicle simulations) from a parametric description (XML).

For example, the following track was generated based on the parametric description that follows:

Output (SVG, optional PNG):

track definition example

Track definition file (XML):

    <TrackDefinition version="0.0.1">
        <Size width="5.0" height="6.0"/>
        <Origin x="0" y="0"/>
        <Background color="#545454" opacity="1.0"/>
        <Segments>
            <Start x="0.500" y="1.300" direction_angle="90.0"/>
            <Straight length="1.000"/>
            <ParkingArea length="2.200">
                <RightLots>
                    <ParkingLot start="0.0" depth="0.3" opening_ending_angle="60">
                        <Spot type="free" length="0.4"/>
                        <Spot type="blocked" length="0.4"/>
                        <Spot type="occupied" length="0.4"/>
                    </ParkingLot>
                </RightLots>
                <LeftLots>
                </LeftLots>
            </ParkingArea>
            <Turn direction="right" radius="0.750" radian="90.0"/>
            <Straight length="1.000"/>
            <Crosswalk length="0.500"/>
            <Straight length="1.000"/>
            <Turn direction="right" radius="0.75" radian="135.0"/>
            <Straight length="0.500"/>
            <Intersection length="1.600" direction="straight"/>
            <Turn direction="left" radius="0.800" radian="270.0"/>
            <Gap length="1.600" direction="straight"/>
            <Straight length="0.500"/>
        </Segments>
    </TrackDefinition>

Installation

pip install track-generator

Usage

Generate track

track_generator generate_track <TRACK_DEFINITION_FILE>

Generate track live

track_generator generate_track_live <TRACK_DEFINITION_FILE>

Examples

Examples that demonstrate the usage of the tool can be found in the examples/ directory.

Documentation

Check the readthedocs site for more details:

https://track-generator.readthedocs.io/en/latest/

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

track_generator-0.6.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

track_generator-0.6.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file track_generator-0.6.0.tar.gz.

File metadata

  • Download URL: track_generator-0.6.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for track_generator-0.6.0.tar.gz
Algorithm Hash digest
SHA256 bd214b35bdc5b49f4c39427ac31785c972be8a0a0b52e5af76d53d385f1d7bfd
MD5 34b168268a45f91853864cd87c477596
BLAKE2b-256 a7a5a50aceeabcb0110bb046f98b75eb1fcab5243a9808bf77e31ce1ef6497a3

See more details on using hashes here.

File details

Details for the file track_generator-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for track_generator-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54244e1b897903d784cbbef8ef992faf0c99a7feafed2be709edb7d19e8ec9d0
MD5 9d01d368f2e6184f257b39e95e23984c
BLAKE2b-256 a467ed3d2d8822c11c1a60051809d46f12b632f0e7775aafabe43a741f33fc0c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.4

2 files

0.5.3

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page