fbga-py 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fbga_py-0.1.0/.clang-format +32 -0
- fbga_py-0.1.0/.clang-tidy +24 -0
- fbga_py-0.1.0/.github/workflows/publish-pypi.yml +87 -0
- fbga_py-0.1.0/.gitignore +80 -0
- fbga_py-0.1.0/CMakeLists.txt +50 -0
- fbga_py-0.1.0/Dependencies.cmake +60 -0
- fbga_py-0.1.0/FBGAConfig.cmake.in +5 -0
- fbga_py-0.1.0/FBGA_Usage_Guide.md +466 -0
- fbga_py-0.1.0/LICENSE +21 -0
- fbga_py-0.1.0/PKG-INFO +107 -0
- fbga_py-0.1.0/ProjectOptions.cmake +36 -0
- fbga_py-0.1.0/README.md +93 -0
- fbga_py-0.1.0/bibtex.bib +22 -0
- fbga_py-0.1.0/data/INDY/Yas_Marina_raceline.csv +5215 -0
- fbga_py-0.1.0/data/INDY/ax_max.npy +0 -0
- fbga_py-0.1.0/data/INDY/ax_min.npy +0 -0
- fbga_py-0.1.0/data/INDY/ay_max.npy +0 -0
- fbga_py-0.1.0/data/INDY/g_list.npy +0 -0
- fbga_py-0.1.0/data/INDY/v_list.npy +0 -0
- fbga_py-0.1.0/data/paper/ard_2d_fwbw_moto_Catalunya.txt +4652 -0
- fbga_py-0.1.0/data/paper/ard_2d_moto_Catalunya.txt +4652 -0
- fbga_py-0.1.0/examples/CMakeLists.txt +4 -0
- fbga_py-0.1.0/examples/fbga/CMakeLists.txt +5 -0
- fbga_py-0.1.0/examples/fbga/basic.cc +114 -0
- fbga_py-0.1.0/examples/fbga/moto.cc +365 -0
- fbga_py-0.1.0/examples/fbga3d/CMakeLists.txt +9 -0
- fbga_py-0.1.0/examples/fbga3d/gggv_demo.cc +59 -0
- fbga_py-0.1.0/examples/fbga3d/yas_marina_indy.cc +201 -0
- fbga_py-0.1.0/pyproject.toml +37 -0
- fbga_py-0.1.0/python_bindings/README.md +110 -0
- fbga_py-0.1.0/python_bindings/examples/example_fb2d_plots.py +244 -0
- fbga_py-0.1.0/python_bindings/fbga_env.yaml +14 -0
- fbga_py-0.1.0/python_bindings/tests/test_fb2d.py +131 -0
- fbga_py-0.1.0/python_bindings/tests/test_fbga3d.py +89 -0
- fbga_py-0.1.0/src/CMakeLists.txt +9 -0
- fbga_py-0.1.0/src/fbga/CMakeLists.txt +27 -0
- fbga_py-0.1.0/src/fbga/fb2d.cc +606 -0
- fbga_py-0.1.0/src/fbga/include/fbga/fb2d.hh +124 -0
- fbga_py-0.1.0/src/fbga3d/CMakeLists.txt +36 -0
- fbga_py-0.1.0/src/fbga3d/fbga_indy.cc +8 -0
- fbga_py-0.1.0/src/fbga3d/fbga_moto.cc +8 -0
- fbga_py-0.1.0/src/fbga3d/gggv_indy.cc +194 -0
- fbga_py-0.1.0/src/fbga3d/gggv_moto.cc +192 -0
- fbga_py-0.1.0/src/fbga3d/include/fbga3d/fbga3d_solver.hh +1056 -0
- fbga_py-0.1.0/src/fbga3d/include/fbga3d/fbga_indy.hh +13 -0
- fbga_py-0.1.0/src/fbga3d/include/fbga3d/fbga_moto.hh +22 -0
- fbga_py-0.1.0/src/fbga3d/include/fbga3d/gggv_indy.hh +54 -0
- fbga_py-0.1.0/src/fbga3d/include/fbga3d/gggv_moto.hh +58 -0
- fbga_py-0.1.0/src/fbga3d/include/fbga3d/node3d.hh +70 -0
- fbga_py-0.1.0/src/fbga3d/include/fbga3d/types3d.hh +178 -0
- fbga_py-0.1.0/src/python/CMakeLists.txt +7 -0
- fbga_py-0.1.0/src/python/bindings.cc +304 -0
- fbga_py-0.1.0/src/solvers/CMakeLists.txt +27 -0
- fbga_py-0.1.0/src/solvers/brent_dekker.cc +19 -0
- fbga_py-0.1.0/src/solvers/include/solvers/brent_dekker.hh +142 -0
- fbga_py-0.1.0/src/utils/CMakeLists.txt +28 -0
- fbga_py-0.1.0/src/utils/gg_utils.cc +440 -0
- fbga_py-0.1.0/src/utils/include/utils/gg_utils.hh +96 -0
- fbga_py-0.1.0/src/utils/include/utils/segment.hh +110 -0
- fbga_py-0.1.0/src/utils/include/utils/types.hh +61 -0
- fbga_py-0.1.0/test/CMakeLists.txt +6 -0
- fbga_py-0.1.0/test/fbga/CMakeLists.txt +5 -0
- fbga_py-0.1.0/test/fbga/test_fb2d.cc +82 -0
- fbga_py-0.1.0/test/fbga3d/CMakeLists.txt +11 -0
- fbga_py-0.1.0/test/fbga3d/data/INDY/ax_max.npy +0 -0
- fbga_py-0.1.0/test/fbga3d/data/INDY/ax_min.npy +0 -0
- fbga_py-0.1.0/test/fbga3d/data/INDY/ay_max.npy +0 -0
- fbga_py-0.1.0/test/fbga3d/data/INDY/g_list.npy +0 -0
- fbga_py-0.1.0/test/fbga3d/data/INDY/v_list.npy +0 -0
- fbga_py-0.1.0/test/fbga3d/test_fbga_solver.cc +81 -0
- fbga_py-0.1.0/test/fbga3d/test_gggv_indy.cc +47 -0
- fbga_py-0.1.0/test/fbga3d/test_gggv_moto.cc +45 -0
- fbga_py-0.1.0/test/solvers/CMakeLists.txt +5 -0
- fbga_py-0.1.0/test/solvers/test_brent_dekker.cc +63 -0
- fbga_py-0.1.0/test/utils/CMakeLists.txt +9 -0
- fbga_py-0.1.0/test/utils/test_gg_utils.cc +114 -0
- fbga_py-0.1.0/test/utils/test_segment.cc +66 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Braces on a new line
|
|
2
|
+
BreakBeforeBraces: Allman
|
|
3
|
+
|
|
4
|
+
# Stop breaking strings
|
|
5
|
+
BreakStringLiterals: false
|
|
6
|
+
|
|
7
|
+
# Indentation
|
|
8
|
+
ColumnLimit: 100
|
|
9
|
+
AlignConsecutiveAssignments:
|
|
10
|
+
Enabled: true
|
|
11
|
+
AlignCompound: true
|
|
12
|
+
AlignAfterOpenBracket: BlockIndent
|
|
13
|
+
SeparateDefinitionBlocks: Always
|
|
14
|
+
BinPackArguments: false
|
|
15
|
+
BinPackParameters: false
|
|
16
|
+
ContinuationIndentWidth: 2
|
|
17
|
+
AlignOperands: Align
|
|
18
|
+
BreakBeforeBinaryOperators: NonAssignment
|
|
19
|
+
AlwaysBreakTemplateDeclarations: Yes
|
|
20
|
+
|
|
21
|
+
# Penalties
|
|
22
|
+
PenaltyBreakAssignment: 10000
|
|
23
|
+
PenaltyBreakBeforeFirstCallParameter: 0
|
|
24
|
+
PenaltyBreakComment: 0
|
|
25
|
+
PenaltyBreakFirstLessLess: 0
|
|
26
|
+
PenaltyBreakOpenParenthesis: 0
|
|
27
|
+
PenaltyBreakScopeResolution: 10000
|
|
28
|
+
# PenaltyBreakString: 10000
|
|
29
|
+
PenaltyBreakTemplateDeclaration: 0
|
|
30
|
+
PenaltyExcessCharacter: 10
|
|
31
|
+
PenaltyIndentedWhitespace: 100
|
|
32
|
+
PenaltyReturnTypeOnItsOwnLine: 100
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
Checks: "*,
|
|
3
|
+
-abseil-*,
|
|
4
|
+
-altera-*,
|
|
5
|
+
-android-*,
|
|
6
|
+
-fuchsia-*,
|
|
7
|
+
-google-*,
|
|
8
|
+
-llvm*,
|
|
9
|
+
-modernize-use-trailing-return-type,
|
|
10
|
+
-zircon-*,
|
|
11
|
+
-readability-else-after-return,
|
|
12
|
+
-readability-static-accessed-through-instance,
|
|
13
|
+
-readability-avoid-const-params-in-decls,
|
|
14
|
+
-cppcoreguidelines-non-private-member-variables-in-classes,
|
|
15
|
+
-misc-non-private-member-variables-in-classes"
|
|
16
|
+
WarningsAsErrors: ""
|
|
17
|
+
HeaderFilterRegex: ""
|
|
18
|
+
FormatStyle: none
|
|
19
|
+
|
|
20
|
+
CheckOptions:
|
|
21
|
+
- key: readability-identifier-length.MinimumVariableNameLength
|
|
22
|
+
value: 0
|
|
23
|
+
- key: readability-identifier-length.MinimumParameterNameLength
|
|
24
|
+
value: 0
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: Publish fbga_py to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
target:
|
|
10
|
+
description: "Where to publish"
|
|
11
|
+
type: choice
|
|
12
|
+
options: [testpypi, pypi]
|
|
13
|
+
default: testpypi
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build_wheels:
|
|
17
|
+
name: Build wheels on ${{ matrix.os }}
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Build wheels
|
|
27
|
+
uses: pypa/cibuildwheel@v2.21
|
|
28
|
+
env:
|
|
29
|
+
CIBW_SKIP: "pp* *-musllinux*"
|
|
30
|
+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
|
|
31
|
+
CIBW_BUILD_VERBOSITY: 1
|
|
32
|
+
|
|
33
|
+
- uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: wheels-${{ matrix.os }}
|
|
36
|
+
path: ./wheelhouse/*.whl
|
|
37
|
+
|
|
38
|
+
build_sdist:
|
|
39
|
+
name: Build sdist
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
|
|
44
|
+
- name: Build sdist
|
|
45
|
+
run: pipx run build --sdist
|
|
46
|
+
|
|
47
|
+
- uses: actions/upload-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: sdist
|
|
50
|
+
path: dist/*.tar.gz
|
|
51
|
+
|
|
52
|
+
publish_testpypi:
|
|
53
|
+
name: Publish to TestPyPI
|
|
54
|
+
if: github.event_name == 'workflow_dispatch' && inputs.target == 'testpypi'
|
|
55
|
+
needs: [build_wheels, build_sdist]
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
environment: testpypi
|
|
58
|
+
permissions:
|
|
59
|
+
id-token: write
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/download-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
path: dist
|
|
64
|
+
merge-multiple: true
|
|
65
|
+
|
|
66
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
67
|
+
with:
|
|
68
|
+
repository-url: https://test.pypi.org/legacy/
|
|
69
|
+
packages-dir: dist/
|
|
70
|
+
|
|
71
|
+
publish_pypi:
|
|
72
|
+
name: Publish to PyPI
|
|
73
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
74
|
+
needs: [build_wheels, build_sdist]
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
environment: pypi
|
|
77
|
+
permissions:
|
|
78
|
+
id-token: write
|
|
79
|
+
steps:
|
|
80
|
+
- uses: actions/download-artifact@v4
|
|
81
|
+
with:
|
|
82
|
+
path: dist
|
|
83
|
+
merge-multiple: true
|
|
84
|
+
|
|
85
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
86
|
+
with:
|
|
87
|
+
packages-dir: dist/
|
fbga_py-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
*.mexmaci64
|
|
2
|
+
*.aux
|
|
3
|
+
*.bbl
|
|
4
|
+
*.log
|
|
5
|
+
*.gz
|
|
6
|
+
*.mexa64
|
|
7
|
+
*.blg
|
|
8
|
+
*.spl
|
|
9
|
+
*.o
|
|
10
|
+
/vs_20*
|
|
11
|
+
/lib/*
|
|
12
|
+
build
|
|
13
|
+
bin
|
|
14
|
+
.vscode
|
|
15
|
+
lib3rd
|
|
16
|
+
/docs
|
|
17
|
+
latex
|
|
18
|
+
|
|
19
|
+
/fig/*
|
|
20
|
+
|
|
21
|
+
/third_parties/
|
|
22
|
+
/third_party/
|
|
23
|
+
/lib/
|
|
24
|
+
/lib3rd/
|
|
25
|
+
|
|
26
|
+
/rerun_blueprint/*.rrd
|
|
27
|
+
|
|
28
|
+
build/
|
|
29
|
+
buildX/
|
|
30
|
+
compile_commands.json
|
|
31
|
+
|
|
32
|
+
profileRerun.json
|
|
33
|
+
|
|
34
|
+
dati.csv
|
|
35
|
+
|
|
36
|
+
out.txt
|
|
37
|
+
|
|
38
|
+
.cache/
|
|
39
|
+
.idea/
|
|
40
|
+
cmake-build-debug/
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
data/envelope/
|
|
44
|
+
|
|
45
|
+
text.txt
|
|
46
|
+
test.txt
|
|
47
|
+
|
|
48
|
+
vehicle_objects/
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
xcode/
|
|
52
|
+
|
|
53
|
+
data/ard
|
|
54
|
+
data/FWBW
|
|
55
|
+
# data/circuit
|
|
56
|
+
|
|
57
|
+
src_tests/Z*
|
|
58
|
+
|
|
59
|
+
data/output_*.txt
|
|
60
|
+
|
|
61
|
+
# Python bindings build artifacts
|
|
62
|
+
python_bindings/build/
|
|
63
|
+
python_bindings/*.so
|
|
64
|
+
python_bindings/*.egg-info/
|
|
65
|
+
python_bindings/*.png
|
|
66
|
+
python_bindings/*.png
|
|
67
|
+
__pycache__/
|
|
68
|
+
*.pyc
|
|
69
|
+
.pytest_cache/
|
|
70
|
+
|
|
71
|
+
# scikit-build-core / pip build artifacts (repo root is the packaging root)
|
|
72
|
+
*.egg-info/
|
|
73
|
+
dist/
|
|
74
|
+
wheelhouse/
|
|
75
|
+
_skbuild/
|
|
76
|
+
*.so
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
.claude/
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.24)
|
|
2
|
+
|
|
3
|
+
project(
|
|
4
|
+
fbga
|
|
5
|
+
LANGUAGES CXX
|
|
6
|
+
VERSION 0.1.0
|
|
7
|
+
HOMEPAGE_URL "https://github.com/DriveWise/FBGA"
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
include(ProjectOptions.cmake)
|
|
11
|
+
include(Dependencies.cmake)
|
|
12
|
+
|
|
13
|
+
add_subdirectory(src)
|
|
14
|
+
|
|
15
|
+
if(FBGA_BUILD_TESTS)
|
|
16
|
+
enable_testing()
|
|
17
|
+
add_subdirectory(test)
|
|
18
|
+
endif()
|
|
19
|
+
|
|
20
|
+
if(FBGA_BUILD_EXAMPLES)
|
|
21
|
+
add_subdirectory(examples)
|
|
22
|
+
endif()
|
|
23
|
+
|
|
24
|
+
include(CMakePackageConfigHelpers)
|
|
25
|
+
|
|
26
|
+
configure_package_config_file(
|
|
27
|
+
${CMAKE_CURRENT_SOURCE_DIR}/FBGAConfig.cmake.in
|
|
28
|
+
${CMAKE_CURRENT_BINARY_DIR}/FBGAConfig.cmake
|
|
29
|
+
INSTALL_DESTINATION lib/cmake/FBGA
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
write_basic_package_version_file(
|
|
33
|
+
${CMAKE_CURRENT_BINARY_DIR}/FBGAConfigVersion.cmake
|
|
34
|
+
VERSION ${PROJECT_VERSION}
|
|
35
|
+
COMPATIBILITY SameMajorVersion
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
install(
|
|
39
|
+
EXPORT FBGATargets
|
|
40
|
+
FILE FBGATargets.cmake
|
|
41
|
+
NAMESPACE fbga::
|
|
42
|
+
DESTINATION lib/cmake/FBGA
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
install(
|
|
46
|
+
FILES
|
|
47
|
+
${CMAKE_CURRENT_BINARY_DIR}/FBGAConfig.cmake
|
|
48
|
+
${CMAKE_CURRENT_BINARY_DIR}/FBGAConfigVersion.cmake
|
|
49
|
+
DESTINATION lib/cmake/FBGA
|
|
50
|
+
)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
include(FetchContent)
|
|
2
|
+
|
|
3
|
+
# Catch2 - unit testing framework, needed by test/ when FBGA_BUILD_TESTS is ON.
|
|
4
|
+
if(FBGA_BUILD_TESTS)
|
|
5
|
+
FetchContent_Declare(
|
|
6
|
+
Catch2
|
|
7
|
+
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
|
8
|
+
GIT_TAG v3.15.3
|
|
9
|
+
)
|
|
10
|
+
FetchContent_MakeAvailable(Catch2)
|
|
11
|
+
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
|
|
12
|
+
endif()
|
|
13
|
+
|
|
14
|
+
# cxxopts / rapidcsv - needed by examples/fbga (moto example) when FBGA_BUILD_EXAMPLES is ON.
|
|
15
|
+
if(FBGA_BUILD_EXAMPLES)
|
|
16
|
+
FetchContent_Declare(
|
|
17
|
+
cxxopts
|
|
18
|
+
GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git
|
|
19
|
+
GIT_TAG v3.3.1
|
|
20
|
+
)
|
|
21
|
+
FetchContent_MakeAvailable(cxxopts)
|
|
22
|
+
|
|
23
|
+
FetchContent_Declare(
|
|
24
|
+
rapidcsv
|
|
25
|
+
GIT_REPOSITORY https://github.com/d99kris/rapidcsv.git
|
|
26
|
+
GIT_TAG v8.99
|
|
27
|
+
)
|
|
28
|
+
FetchContent_MakeAvailable(rapidcsv)
|
|
29
|
+
endif()
|
|
30
|
+
|
|
31
|
+
# libnpy - header-only .npy reader, needed by fbga3d's GggvIndy (loads spline data
|
|
32
|
+
# from .npy files) when FBGA_BUILD_3D is ON. Upstream ships no CMakeLists.txt (meson
|
|
33
|
+
# only), so FetchContent_MakeAvailable() just populates the source; wrap the header in
|
|
34
|
+
# an INTERFACE target ourselves.
|
|
35
|
+
if(FBGA_BUILD_3D OR FBGA_BUILD_PYTHON)
|
|
36
|
+
FetchContent_Declare(
|
|
37
|
+
libnpy
|
|
38
|
+
GIT_REPOSITORY https://github.com/llohse/libnpy.git
|
|
39
|
+
GIT_TAG v1.0.1
|
|
40
|
+
)
|
|
41
|
+
FetchContent_MakeAvailable(libnpy)
|
|
42
|
+
|
|
43
|
+
add_library(libnpy INTERFACE)
|
|
44
|
+
target_include_directories(libnpy INTERFACE ${libnpy_SOURCE_DIR}/include)
|
|
45
|
+
endif()
|
|
46
|
+
|
|
47
|
+
# pybind11 - needed by src/python when FBGA_BUILD_PYTHON is ON. find_package first
|
|
48
|
+
# (scikit-build-core sets pybind11_DIR via its pybind11 build dependency), FetchContent
|
|
49
|
+
# fallback for a plain CMake configure.
|
|
50
|
+
if(FBGA_BUILD_PYTHON)
|
|
51
|
+
find_package(pybind11 CONFIG QUIET)
|
|
52
|
+
if(NOT pybind11_FOUND)
|
|
53
|
+
FetchContent_Declare(
|
|
54
|
+
pybind11
|
|
55
|
+
GIT_REPOSITORY https://github.com/pybind/pybind11.git
|
|
56
|
+
GIT_TAG v2.13.6
|
|
57
|
+
)
|
|
58
|
+
FetchContent_MakeAvailable(pybind11)
|
|
59
|
+
endif()
|
|
60
|
+
endif()
|