Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint toml
pip install "pylint==3.2.7" toml
pip install .
- name: Analysing the code with pylint
run: |
pylint ./src/pyLineFollowerTrackGenerator
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage_report/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Andreas Merkle
Copyright (c) 2024 - 2025 Andreas Merkle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Example: A arena 2 x 2 m generated with splines through 30 points. The line widt
```bash
$ ./pyLineFollowerTrackGenerator Parameters: etrack -a "Andreas Merkle" -d "Line follower track along a 'E'." -e web@blue-andi.de -mg cardboard -mr rubber -mp dry etrack
```
![example_etrack](./doc/examples/etrack/example_etrack.png)
![example_etrack](./examples/etrack/example_etrack.png)
Files:
* [etrack.wbt](./doc/examples/etrack/etrack.wbt)
* [etrack.png](./doc/examples/etrack/etrack.png)
* [etrack.wbt](./examples/etrack/etrack.wbt)
* [etrack.png](./examples/etrack/etrack.png)

## Track: Grid
Geneate a line follower track in a fixed grid by coordinates in a JSON file.
Expand All @@ -49,11 +49,11 @@ Example: A arena 3 x 3 m generated with quarter circles. The line width is 1.5 c
```bash
$ .pyLineFollowerTrackGenerator grid -a "Andreas Merkle" -d "Line follower grid track." -e web@blue-andi.de -mg cardboard -mr rubber -mp dry -s 3 grid.wbt grid_points.json
```
![example_grid](./doc/examples/grid/example_grid.png)
![example_grid](./examples/grid/example_grid.png)
Files:
* [grid_points.json](./doc/examples/grid/grid_points.json)
* [grid.wbt](./doc/examples/grid/grid.wbt)
* [grid.png](./doc/examples/grid/grid.png)
* [grid_points.json](./examples/grid/grid_points.json)
* [grid.wbt](./examples/grid/grid.wbt)
* [grid.png](./examples/grid/grid.png)

## Track: Simple
Generate a simple line follower track with the "simple" command.
Expand All @@ -64,10 +64,10 @@ Example: A arena 2 x 2 m generated with splines through 12 points. The line widt
```bash
$ ./pyLineFollowerTrackGenerator simple simple.wbt -s=2 -np=12
```
![example_simple](./doc/examples/simple/example_simple.png)
![example_simple](./examples/simple/example_simple.png)
Files:
* [simple.wbt](./doc/examples/simple/simple.wbt)
* [simple.png](./doc/examples/simple/simple.png)
* [simple.wbt](./examples/simple/simple.wbt)
* [simple.png](./examples/simple/simple.png)

## Track: <...>
You are invited to extend it with more different kind of tracks. ;-)
Expand Down
Binary file removed doc/examples/etrack/etrack.png
Binary file not shown.
47 changes: 0 additions & 47 deletions doc/examples/etrack/etrack.wbt

This file was deleted.

Binary file removed doc/examples/simple/simple.png
Binary file not shown.
Binary file added examples/etrack/etrack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions examples/etrack/etrack.wbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#VRML_SIM R2025a utf8

EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/floors/protos/RectangleArena.proto"

WorldInfo {
title "my world"
info [ "Line follower track along a 'E'.", "Andreas Merkle <web@blue-andi.de>", "2025-02-06", "Parameters: -v etrack -a Andreas Merkle -d Line follower track along a 'E'. -e web@blue-andi.de -mg cardboard -mr rubber -mp dry examples/etrack/etrack" ]
window "<none>"
gravity 9.81
CFM 1e-05
ERP 0.2
physics "<none>"
basicTimeStep 8
FPS 60
optimalThreadCount 1
physicsDisableTime 1
physicsDisableLinearThreshold 0.01
physicsDisableAngularThreshold 0.01
defaultDamping NULL
inkEvaporation 0
coordinateSystem "ENU"
gpsCoordinateSystem "local"
gpsReference 0 0 0
lineScale 0.1
dragForceScale 30.0
dragTorqueScale 5.0
randomSeed 0
contactProperties [ ContactProperties {
material1 "cardboard"
material2 "rubber"
coulombFriction [ 0.6612954068122848 ]
frictionRotation 0 0
rollingFriction 0 0 0
bounce 0.5
bounceVelocity 0.01
forceDependentSlip [ 0 ]
softERP 0.2
softCFM 0.001
bumpSound "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/default/worlds/sounds/bump.wav"
rollSound "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/default/worlds/sounds/roll.wav"
slideSound "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/default/worlds/sounds/slide.wav"
maxContactJoints 10
}
]
}

Viewpoint {
fieldOfView 0.785398
orientation 0 1 0 0.7853981633974483
position -4 0 4
description ""
near 0.05
far 0.0
exposure 1.0
follow ""
followType "Tracking Shot"
followSmoothness 0.5
lensFlare NULL
ambientOcclusionRadius 2
bloomThreshold 21
}

TexturedBackground {
}

TexturedBackgroundLight {
}

RectangleArena {
floorSize 2 2
floorTileSize 2 2
floorAppearance PBRAppearance {
baseColor 1 1 1
baseColorMap ImageTexture {
url [ "examples/etrack/etrack.png" ]
repeatS TRUE
repeatT TRUE
filtering 4
}

transparency 0
roughness 1
roughnessMap NULL
metalness 0
metalnessMap NULL
IBLStrength 1
normalMap NULL
normalMapFactor 1
occlusionMap NULL
occlusionMapStrength 1
emissiveColor 0 0 0
emissiveColorMap NULL
emissiveIntensity 1
textureTransform NULL
name "PBRAppearance"
}

contactMaterial "cardboard"
}
5 changes: 5 additions & 0 deletions examples/etrack/generate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off

cd ../../
pyLineFollowerTrackGenerator etrack -a "Andreas Merkle" -d "Line follower track along a 'E'." -e web@blue-andi.de -mg cardboard -mr rubber -mp dry examples/etrack/etrack
cd examples/etrack
File renamed without changes
5 changes: 5 additions & 0 deletions examples/grid/generate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off

cd ../../
pyLineFollowerTrackGenerator grid -a "Andreas Merkle" -d "Line follower grid track." -e web@blue-andi.de -mg cardboard -mr rubber -mp dry -s 3 examples/grid/grid.wbt examples/grid/grid_points.json
cd examples/grid
File renamed without changes
20 changes: 10 additions & 10 deletions doc/examples/grid/grid.wbt → examples/grid/grid.wbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#VRML_SIM R2023b utf8
#VRML_SIM R2025a utf8

EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/floors/protos/RectangleArena.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/floors/protos/RectangleArena.proto"

WorldInfo {
title "my world"
info [ "Line follower grid track.", "Andreas Merkle <web@blue-andi.de>", "2024-04-02", "Parameters: grid -a Andreas Merkle -d Line follower grid track. -e web@blue-andi.de -mg cardboard -mr rubber -mp dry -s 3 grid.wbt grid_points.json" ]
info [ "Line follower grid track.", "Andreas Merkle <web@blue-andi.de>", "2025-02-06", "Parameters: grid -a Andreas Merkle -d Line follower grid track. -e web@blue-andi.de -mg cardboard -mr rubber -mp dry -s 3 examples/grid/grid.wbt examples/grid/grid_points.json" ]
window "<none>"
gravity 9.81
CFM 1e-05
Expand All @@ -30,17 +30,17 @@ WorldInfo {
contactProperties [ ContactProperties {
material1 "cardboard"
material2 "rubber"
coulombFriction [ 0.7462734870965546 ]
coulombFriction [ 0.6699351427316589 ]
frictionRotation 0 0
rollingFriction 0 0 0
bounce 0.5
bounceVelocity 0.01
forceDependentSlip [ 0 ]
softERP 0.2
softCFM 0.001
bumpSound "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/default/worlds/sounds/bump.wav"
rollSound "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/default/worlds/sounds/roll.wav"
slideSound "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/default/worlds/sounds/slide.wav"
bumpSound "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/default/worlds/sounds/bump.wav"
rollSound "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/default/worlds/sounds/roll.wav"
slideSound "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/default/worlds/sounds/slide.wav"
maxContactJoints 10
}
]
Expand Down Expand Up @@ -74,7 +74,7 @@ RectangleArena {
floorAppearance PBRAppearance {
baseColor 1 1 1
baseColorMap ImageTexture {
url [ "grid.png" ]
url [ "examples/grid/grid.png" ]
repeatS TRUE
repeatT TRUE
filtering 4
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions examples/simple/generate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off

cd ../../
pyLineFollowerTrackGenerator simple examples/simple/simple.wbt -s=2 -np=12
cd examples/simple
Binary file added examples/simple/simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions doc/examples/simple/simple.wbt → examples/simple/simple.wbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#VRML_SIM R2023b utf8
#VRML_SIM R2025a utf8

EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/floors/protos/RectangleArena.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2025a/projects/objects/floors/protos/RectangleArena.proto"

WorldInfo {
title "my world"
info [ "Line follower track generated by pyLineFollowerTrackGenerator.", "anonymous <>", "2024-02-28", "Parameters: simple simple.wbt -s=2 -np=12" ]
info [ "Line follower track generated by pyLineFollowerTrackGenerator.", "anonymous <>", "2025-02-06", "Parameters: simple examples/simple/simple.wbt -s=2 -np=12" ]
window "<none>"
gravity 9.81
CFM 1e-05
Expand Down Expand Up @@ -58,7 +58,7 @@ RectangleArena {
floorAppearance PBRAppearance {
baseColor 1 1 1
baseColorMap ImageTexture {
url [ "simple.png" ]
url [ "examples/simple/simple.png" ]
repeatS TRUE
repeatT TRUE
filtering 4
Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyLineFollowerTrackGenerator"
version = "0.1.0"
version = "1.0.0"
description = "A CLI tool to generate a Webots world with a random line follower track."
readme = "README.md"
requires-python = ">=3.9"
Expand All @@ -16,7 +16,10 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13"
]
dependencies = [
"matplotlib >= 3.8.3",
Expand All @@ -43,3 +46,6 @@ pyLineFollowerTrackGenerator = "pyLineFollowerTrackGenerator.__main__:main"
pythonpath = [
"src"
]

[tool.setuptools.package-data]
pyLineFollowerTrackGenerator = ["pyproject.toml"]
2 changes: 1 addition & 1 deletion scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import urllib.request
import re

WEBOTS_VERSION = "R2023b"
WEBOTS_VERSION = "R2025a"
WEBOTS_DOCS_REFERENCE_URL = "https://raw.githubusercontent.com/cyberbotics/webots/master/docs/reference" # pylint: disable=line-too-long

def get_file_from_url(url: str) -> str:
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
project_urls =
Documentation = https://github.com/BlueAndi/pyLineFollowerTrackGenerator
Source = https://github.com/BlueAndi/pyHepyLineFollowerTrackGeneratorxDump
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# MIT License
#
# Copyright (c) 2024 Andreas Merkle (web@blue-andi.de)
# Copyright (c) 2024 - 2025 Andreas Merkle (web@blue-andi.de)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/pyLineFollowerTrackGenerator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# MIT License
#
# Copyright (c) 2024 Andreas Merkle (web@blue-andi.de)
# Copyright (c) 2024 - 2025 Andreas Merkle (web@blue-andi.de)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/pyLineFollowerTrackGenerator/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# MIT License
#
# Copyright (c) 2024 Andreas Merkle (web@blue-andi.de)
# Copyright (c) 2024 - 2025 Andreas Merkle (web@blue-andi.de)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading