[PATCH 0/6] Add CommonRoad

  • Done
  • quality assurance status badge
Details
2 participants
  • Liliana Marie Prikler
  • Ludovic Courtès
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:50
(address . guix-patches@gnu.org)
844eb869ce6d4bf984242268b254eeba522d2f9d.camel@gmail.com
Self-driving car go vroom vroom.

Liliana Marie Prikler (6):
gnu: Add java-antlr4-runtime-python.
gnu: Add python-omegaconf.
gnu: python-iso3166: Update to 2.1.1.
gnu: Add python-commonroad-vehicle-models.
gnu: Add python-commonroad-io.
gnu: Add python-commonroad-route-planner.

gnu/packages/iso-codes.scm | 4 +-
gnu/packages/java.scm | 21 ++++++++
gnu/packages/python-xyz.scm | 41 ++++++++++++++
gnu/packages/simulation.scm | 104 ++++++++++++++++++++++++++++++++++++
4 files changed, 168 insertions(+), 2 deletions(-)


base-commit: 9e9204958d3e0ecfe8fd024d8f06068b84f52ba1
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:31
[PATCH 2/6] gnu: Add python-omegaconf.
(address . 59798@debbugs.gnu.org)
f5101eb60cf923d6be583b3adde23d4a825cd73e.camel@gmail.com
* gnu/packages/python-xyz.scm (python-omegaconf): New variable.
---
gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 40c3f9c99c..49f551e35a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -193,6 +193,7 @@ (define-module (gnu packages python-xyz)
#:use-module (gnu packages image)
#:use-module (gnu packages image-processing)
#:use-module (gnu packages imagemagick)
+ #:use-module (gnu packages java)
#:use-module (gnu packages jupyter)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages libevent)
@@ -14353,6 +14354,46 @@ (define-public python-configobj
(home-page "https://github.com/DiffSK/configobj")
(license license:bsd-3)))
+(define-public python-omegaconf
+ (package
+ (name "python-omegaconf")
+ (version "2.2.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/omry/omegaconf")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet #~(begin
+ (delete-file-recursively "build_helpers/bin")
+ (substitute* "build_helpers/build_helpers.py"
+ (("java") "antlr4")
+ (("\"-jar\",") "")
+ (("str\\(build_dir / \"bin\" / \"antlr.*\"\\),") ""))))
+ (sha256
+ (base32
+ "00rw1rkjycn0jdg3jmar6jdxb1pcb21jclm5g1921s9z8f5ii5dh"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'loosen-requirements
+ (lambda _
+ (substitute* "requirements/base.txt"
+ (("antlr4-python3-runtime==")
+ "antlr4-python3-runtime>=")))))))
+ (propagated-inputs (list java-antlr4-runtime-python
+ python-pydevd
+ python-pyyaml))
+ (native-inputs (list icedtea antlr4 python-pytest python-pytest-mock))
+ (home-page "https://github.com/omry/omegaconf")
+ (synopsis "Flexible configuration system")
+ (description "OmegaConf is a hierarchical configuration system and
+supports merging configurations from multiple sources. It provides a
+consistent API regardless of how the configuration was created.")
+ (license license:bsd-3)))
+
(define-public python-configargparse
(package
(name "python-configargparse")
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:29
[PATCH 1/6] gnu: Add java-antlr4-runtime-python.
(address . 59798@debbugs.gnu.org)
40114e332a3f4398d0bb08cf6db3d17090d79839.camel@gmail.com
* gnu/packages/java.scm (java-antlr4-runtime-python): New variable.
---
gnu/packages/java.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f80406cab9..bc6e7057cb 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -49,6 +49,7 @@ (define-module (gnu packages java)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system maven)
+ #:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages attr)
@@ -8694,6 +8695,26 @@ (define-public java-antlr4-runtime-cpp
(description "This package contains the C++ runtime library used with C++
generated sources by ANTLR.")))
+(define-public java-antlr4-runtime-python
+ (package
+ (inherit java-antlr4-runtime)
+ (name "java-antlr4-runtime-python")
+ (outputs '("out"))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:tests? #f ; tests require antlr
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "runtime/Python3"))))))
+ (native-inputs (list pkg-config))
+ (inputs (list `(,util-linux "lib"))) ; libuuid
+ (synopsis "ANTLR Python runtime library")
+ (description "This package contains the Python runtime library used with
+Python generated sources by ANTLR.")))
+
(define-public antlr4
(package
(inherit java-antlr4-runtime)
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:40
[PATCH 4/6] gnu: Add python-commonroad-vehicle-models.
(address . 59798@debbugs.gnu.org)
33a0b9ce359e80fd45eb4a6d35f6455e4f04f2ee.camel@gmail.com
* gnu/packages/simulation.scm (%commonroad-dont-install-license-at-root)
(python-commonroad-vehicle-models): New variables.
---
gnu/packages/simulation.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 256e404970..07f1f879f9 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -936,6 +936,36 @@ (define-public python-dolfin-adjoint
@url{https://firedrakeproject.org,firedrake}.")
(license license:lgpl3)))
+(define %commonroad-dont-install-license-at-root
+ #~(substitute* "setup.py"
+ (("data_files=\\[\\('.', \\['LICENSE.txt'\\]\\)\\],")
+ "")))
+
+(define-public python-commonroad-vehicle-models
+ (package
+ (name "python-commonroad-vehicle-models")
+ (version "3.0.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "commonroad-vehicle-models" version))
+ (sha256
+ (base32
+ "13jg0cys7y4n7rg548w6mxk9g10gd5qxmj4ynrlriczpffqy6kc7"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-setup.py
+ (lambda _
+ #$%commonroad-dont-install-license-at-root)))))
+ (propagated-inputs (list python-numpy python-omegaconf))
+ (home-page "https://commonroad.in.tum.de/")
+ (synopsis "CommonRoad vehicle models")
+ (description "This package provides vehicle models used in CommonRoad
+benchmarks. Varying abstraction levels are used ranging from kinematic single
+track models to multi-body models.")
+ (license license:bsd-3)))
+
(define-public sumo
(package
(name "sumo")
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:36
[PATCH 3/6] gnu: python-iso3166: Update to 2.1.1.
(address . 59798@debbugs.gnu.org)
374e36f2945cdcaf9c4ba1d7d0afc3fac33e92d2.camel@gmail.com
* gnu/packages/iso-codes.scm (python-iso3166): Update to 2.1.1.
---
gnu/packages/iso-codes.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/iso-codes.scm b/gnu/packages/iso-codes.scm
index 95ab9ca44f..d2bace6a3c 100644
--- a/gnu/packages/iso-codes.scm
+++ b/gnu/packages/iso-codes.scm
@@ -109,14 +109,14 @@ (define-public python-iso639
(define-public python-iso3166
(package
(name "python-iso3166")
- (version "0.9")
+ (version "2.1.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "iso3166" version))
(sha256
(base32
- "0hm0xm30sprk1jssmn4cqks0x3nx5fp8r5ypvahcysmmayzrsnjl"))))
+ "068p94gavc8gbmp5a2kw8hi5l551wfzbpmp6z7ll8sx6vnw53mgw"))))
(build-system python-build-system)
(home-page "https://github.com/deactivated/python-iso3166")
(synopsis "Self-contained ISO 3166-1 country definitions")
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:43
[PATCH 6/6] gnu: Add python-commonroad-route-planner.
(address . 59798@debbugs.gnu.org)
11be62f160fc0150579c571e512c80a08433ba85.camel@gmail.com
* gnu/packages/simulation.scm (python-commonroad-route-planner): New variable.
---
gnu/packages/simulation.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 7659cf224a..762cfc2b84 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -1007,6 +1007,39 @@ (define-public python-commonroad-io
and is the basis for other tools of the CommonRoad Framework")
(license license:bsd-3)))
+(define-public python-commonroad-route-planner
+ (package
+ (name "python-commonroad-route-planner")
+ (version "2022.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.lrz.de/tum-cps/commonroad-route-planner")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0xn0l7bzmj56d4mlqacvbl8mdvsffkg2fn2lzfmis5jl4vp99ipf"))))
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-setup.py
+ (lambda _
+ #$%commonroad-dont-install-license-at-root)))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-commonroad-io
+ python-matplotlib
+ python-networkx
+ python-numpy
+ python-setuptools
+ python-shapely))
+ (home-page "https://gitlab.lrz.de/tum-cps/commonroad-route-planner")
+ (synopsis "Route planner for CommonRoad scenarios")
+ (description "This package provides functions for route planning, that is
+finding sequences that lead from a given start lanelet to some goal
+lanelet(s).")
+ (license license:bsd-3)))
+
(define-public sumo
(package
(name "sumo")
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:43
[PATCH 5/6] gnu: Add python-commonroad-io.
(address . 59798@debbugs.gnu.org)
3ca0ed5fc56c6708cb764f1d48e1291738d6052c.camel@gmail.com
* gnu/packages/simulation.scm (python-commonroad-io): New variable.
---
gnu/packages/simulation.scm | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (68 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 07f1f879f9..7659cf224a 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -40,6 +40,7 @@ (define-module (gnu packages simulation)
#:use-module (gnu packages graphics)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
+ #:use-module (gnu packages iso-codes)
#:use-module (gnu packages linux)
#:use-module (gnu packages m4)
#:use-module (gnu packages maths)
@@ -47,6 +48,7 @@ (define-module (gnu packages simulation)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-science)
@@ -966,6 +968,45 @@ (define-public python-commonroad-vehicle-models
track models to multi-body models.")
(license license:bsd-3)))
+(define-public python-commonroad-io
+ (package
+ (name "python-commonroad-io")
+ (version "2022.3")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "commonroad-io" version))
+ (sha256
+ (base32
+ "1cj9zj567mca8xb8sx9h3nnl2cccv6vh8h73imgpq61cimk9mvas"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-setup.py
+ (lambda _
+ #$%commonroad-dont-install-license-at-root)))))
+ (propagated-inputs (list python-commonroad-vehicle-models
+ python-iso3166
+ python-lxml
+ python-matplotlib
+ python-networkx
+ python-numpy
+ python-omegaconf
+ python-pillow
+ python-protobuf
+ python-rtree
+ python-scipy
+ python-shapely
+ python-tqdm))
+ (native-inputs (list python-lxml python-pytest))
+ (home-page "https://commonroad.in.tum.de/")
+ (synopsis "Read, write, and visualize CommonRoad scenarios.")
+ (description "This package provides methods to read, write, and visualize
+CommonRoad scenarios and planning problems. It can be used as a framework for
+implementing motion planning algorithms to solve CommonRoad Benchmarks
+and is the basis for other tools of the CommonRoad Framework")
+ (license license:bsd-3)))
+
(define-public sumo
(package
(name "sumo")
--
2.38.1
L
L
Ludovic Courtès wrote on 8 Jan 15:31 +0100
Re: bug#59798: [PATCH 0/6] Add CommonRoad
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 59798@debbugs.gnu.org)
878ridw112.fsf@gnu.org
Hi Liliana,

Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:

Toggle quote (7 lines)
> gnu: Add java-antlr4-runtime-python.
> gnu: Add python-omegaconf.
> gnu: python-iso3166: Update to 2.1.1.
> gnu: Add python-commonroad-vehicle-models.
> gnu: Add python-commonroad-io.
> gnu: Add python-commonroad-route-planner.

Qa.guix is happy and it LGTM as well. Go for it!

Ludo’.
L
L
Ludovic Courtès wrote on 8 Jan 15:32 +0100
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 59798@debbugs.gnu.org)
874jt1w10a.fsf_-_@gnu.org
Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:

Toggle quote (6 lines)
> + (synopsis "Read, write, and visualize CommonRoad scenarios.")
> + (description "This package provides methods to read, write, and visualize
> +CommonRoad scenarios and planning problems. It can be used as a framework for
> +implementing motion planning algorithms to solve CommonRoad Benchmarks
> +and is the basis for other tools of the CommonRoad Framework")
^
Missing period here. :-)
L
L
Liliana Marie Prikler wrote on 8 Jan 17:09 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 59798-done@debbugs.gnu.org)
2aede167ca9f8dd4c8592f7ad49abaaf6bd014d2.camel@gmail.com
Am Sonntag, dem 08.01.2023 um 15:32 +0100 schrieb Ludovic Courtès:
Toggle quote (13 lines)
> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
>
> > +    (home-page "https://commonroad.in.tum.de/")
> > +    (synopsis "Read, write, and visualize CommonRoad scenarios.")
> > +    (description "This package provides methods to read, write,
> > and visualize
> > +CommonRoad scenarios and planning problems.  It can be used as a
> > framework for
> > +implementing motion planning algorithms to solve CommonRoad
> > Benchmarks
> > +and is the basis for other tools of the CommonRoad Framework")
>                                                                ^
> Missing period here.  :-)
Pushed with the missing period inserted.

Thanks
Closed
?