Skip to content

A CLI tool to generate a Webots world with a random line follower track.

License

Notifications You must be signed in to change notification settings

BlueAndi/pyLineFollowerTrackGenerator

Repository files navigation

pyLineFollowerTrackGenerator

A CLI tool to generate a Webots world with a random line follower track.

License Repo Status CI Status

Installation

$ git clone https://github.com/BlueAndi/pyLineFollowerTrackGenerator.git
$ cd pyLineFollowerTrackGenerator
$ pip install .

Usage

Track: ETrack

Generate a line follower track like a 'E' with the "etrack" command.

Use ./pyLineFollowerTrackGenerator etrack --help to see all possible parameters.

Example: A arena 2 x 2 m generated with splines through 30 points. The line width is 1.5 cm by default.

$ ./pyLineFollowerTrackGenerator Parameters: etrack -a "Andreas Merkle" -d "Line follower track along a 'E'." -e [email protected] -mg cardboard -mr rubber -mp dry etrack

example_etrack Files:

Track: Grid

Geneate a line follower track in a fixed grid by coordinates in a JSON file.

Use ./pyLineFollowerTrackGenerator grid --help to see all possible parameters.

Example: A arena 3 x 3 m generated with quarter circles. The line width is 1.5 cm by default.

$ .pyLineFollowerTrackGenerator grid -a "Andreas Merkle" -d "Line follower grid track." -e [email protected] -mg cardboard -mr rubber -mp dry -s 3 grid.wbt grid_points.json

example_grid Files:

Track: Simple

Generate a simple line follower track with the "simple" command.

Use ./pyLineFollowerTrackGenerator simple --help to see all possible parameters.

Example: A arena 2 x 2 m generated with splines through 12 points. The line width is 1.5 cm by default.

$ ./pyLineFollowerTrackGenerator simple simple.wbt -s=2 -np=12

example_simple Files:

Track: <...>

You are invited to extend it with more different kind of tracks. ;-)

Friction

Get a list of available material pairs with their friction parameters by using

$ ./pyLineFollowerTrackGenerator friction

or get a filtered list e.g. for steel:

$ ./pyLineFollowerTrackGenerator friction steel

Specify the material for the ground and for the robot contact material, as well as the material property:

$ ./pyLineFollowerTrackGenerator simple simple.wbt -s=2 -np=12 -mg cardboard -mr rubber -mp dry

Notes:

  • Static and dynamic friction are supported.
  • Only symmetric friction is supported.
  • If the friction has a range, the friction will be determined random (min <= friction <= max).
  • Find the source for the friction parameters in friction database.
  • In the Webots contact properties the friction parameters are configured.
  • Details about the physical simulation are explained in the Open Physics Engine manual, which is used by Webots.

Used Libraries

Used 3rd party libraries which are not part of the standard Python package:

Library Description License
matplotlib Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Mixed
numpy NumPy is the fundamental package for scientific computing with Python. Mixed
scipy SciPy is an open-source software for mathematics, science, and engineering. BSD-3
toml Parsing TOML MIT License

Issues, Ideas And Bugs

If you have further ideas or you found some bugs, great! Create a issue or if you are able and willing to fix it by yourself, clone the repository and create a pull request.

License

The whole source code is published under the MIT license. Consider the different licenses of the used third party libraries too!

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.