openscvx 0.1.1__tar.gz → 0.1.2__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.
Potentially problematic release.
This version of openscvx might be problematic. Click here for more details.
- openscvx-0.1.2/.github/release-drafter.yml +55 -0
- openscvx-0.1.1/.github/workflows/main.yml → openscvx-0.1.2/.github/workflows/ci.yml +3 -3
- openscvx-0.1.2/.github/workflows/nightly.yml +45 -0
- openscvx-0.1.2/.github/workflows/release-drafter.yml +42 -0
- openscvx-0.1.2/.github/workflows/release.yml +41 -0
- {openscvx-0.1.1/openscvx.egg-info → openscvx-0.1.2}/PKG-INFO +60 -17
- {openscvx-0.1.1 → openscvx-0.1.2}/README.md +59 -16
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/params/cinema_vp.py +2 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/params/dr_vp.py +2 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/params/dr_vp_nodal.py +2 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/params/dr_vp_polytope.py +2 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/params/drone_racing.py +2 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/params/obstacle_avoidance.py +2 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/params/obstacle_avoidance_nodal.py +2 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/_version.py +2 -2
- openscvx-0.1.2/openscvx/augmentation/dynamics_augmentation.py +122 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/constraints/ctcs.py +27 -3
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/constraints/nodal.py +17 -11
- openscvx-0.1.2/openscvx/constraints/violation.py +67 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/discretization.py +5 -4
- openscvx-0.1.2/openscvx/dynamics.py +41 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/trajoptproblem.py +23 -22
- {openscvx-0.1.1 → openscvx-0.1.2/openscvx.egg-info}/PKG-INFO +60 -17
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx.egg-info/SOURCES.txt +10 -3
- openscvx-0.1.2/tests/__init__.py +0 -0
- openscvx-0.1.2/tests/test_constraints/__init__.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/tests/test_constraints/test_ctcs.py +60 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/tests/test_constraints/test_nodal.py +50 -15
- openscvx-0.1.1/tests/test_augmentation.py → openscvx-0.1.2/tests/test_ctcs_sorting.py +1 -1
- openscvx-0.1.2/tests/test_ctcs_violation.py +132 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/tests/test_discretization.py +14 -4
- openscvx-0.1.2/tests/test_dynamics_augmentation.py +254 -0
- openscvx-0.1.1/.github/workflows/nightly.yml +0 -78
- openscvx-0.1.1/.github/workflows/release.yml +0 -48
- openscvx-0.1.1/openscvx/constraints/violation.py +0 -26
- openscvx-0.1.1/openscvx/dynamics.py +0 -24
- {openscvx-0.1.1 → openscvx-0.1.2}/.gitignore +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/LICENSE +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/environment.yml +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/main.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/examples/plotting.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/figures/ctlos_cine.gif +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/figures/ctlos_dr.gif +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/figures/dtlos_cine.gif +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/figures/dtlos_dr.gif +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/figures/openscvx_logo.svg +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/figures/video_preview.png +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/__init__.py +0 -0
- {openscvx-0.1.1/tests → openscvx-0.1.2/openscvx/augmentation}/__init__.py +0 -0
- /openscvx-0.1.1/openscvx/augmentation.py → /openscvx-0.1.2/openscvx/augmentation/ctcs.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/config.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/constraints/__init__.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/constraints/boundary.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/integrators.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/io.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/ocp.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/plotting.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/post_processing.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/propagation.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/ptr.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx/utils.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx.egg-info/dependency_links.txt +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx.egg-info/requires.txt +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/openscvx.egg-info/top_level.txt +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/pyproject.toml +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/requirements.txt +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/setup.cfg +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/tests/test_constraints/test_boundary.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/tests/test_examples.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/tests/test_integrators.py +0 -0
- {openscvx-0.1.1 → openscvx-0.1.2}/tests/test_propagation.py +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION'
|
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
|
3
|
+
categories:
|
|
4
|
+
- title: '🚀 Features'
|
|
5
|
+
labels:
|
|
6
|
+
- 'feature'
|
|
7
|
+
- 'enhancement'
|
|
8
|
+
- title: '🐛 Bug Fixes'
|
|
9
|
+
labels:
|
|
10
|
+
- 'fix'
|
|
11
|
+
- 'bugfix'
|
|
12
|
+
- 'bug'
|
|
13
|
+
- title: '🧰 Maintenance'
|
|
14
|
+
labels:
|
|
15
|
+
- 'chore'
|
|
16
|
+
- 'refactor'
|
|
17
|
+
- 'documentation'
|
|
18
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
|
19
|
+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
|
20
|
+
version-resolver:
|
|
21
|
+
major:
|
|
22
|
+
labels:
|
|
23
|
+
- 'major'
|
|
24
|
+
minor:
|
|
25
|
+
labels:
|
|
26
|
+
- 'minor'
|
|
27
|
+
patch:
|
|
28
|
+
labels:
|
|
29
|
+
- 'patch'
|
|
30
|
+
default: patch
|
|
31
|
+
autolabeler:
|
|
32
|
+
- label: 'enhancement'
|
|
33
|
+
branch:
|
|
34
|
+
- '/^[Ff]eature\/.+/'
|
|
35
|
+
- label: 'bug'
|
|
36
|
+
branch:
|
|
37
|
+
- '/^[Ff]ix\/.+/'
|
|
38
|
+
- label: 'chore'
|
|
39
|
+
branch:
|
|
40
|
+
- '/^[Cc]hore\/.+/'
|
|
41
|
+
- label: 'refactor'
|
|
42
|
+
branch:
|
|
43
|
+
- '/^[Rr]efactor\/.+/'
|
|
44
|
+
- label: 'documentation'
|
|
45
|
+
branch:
|
|
46
|
+
- '/^[Dd]ocumentation\/.+/'
|
|
47
|
+
- '/^[Dd]oc\/.+/'
|
|
48
|
+
template: |
|
|
49
|
+
## What's Changed
|
|
50
|
+
|
|
51
|
+
$CHANGES
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
**Full Changelog:** [`$PREVIOUS_TAG...$NEXT_PATCH_VERSION`](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$NEXT_PATCH_VERSION)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name: CI
|
|
1
|
+
name: ⚙️ CI
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
@@ -12,8 +12,8 @@ jobs:
|
|
|
12
12
|
build:
|
|
13
13
|
strategy:
|
|
14
14
|
matrix:
|
|
15
|
-
os: [ubuntu-latest, macos-latest
|
|
16
|
-
python-version: ['3.
|
|
15
|
+
os: [ubuntu-latest, macos-latest]
|
|
16
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
17
17
|
|
|
18
18
|
runs-on: ${{ matrix.os }}
|
|
19
19
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: 🌙 Nightly
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
schedule:
|
|
11
|
+
- cron: '0 0 * * *' # daily at midnight UTC
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: nightly
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
nightly:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
with: { fetch-depth: 0 }
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-python@v4
|
|
25
|
+
with: { python-version: '3.x' }
|
|
26
|
+
|
|
27
|
+
- name: Install build tools
|
|
28
|
+
run: pip install --upgrade pip build twine setuptools-scm
|
|
29
|
+
|
|
30
|
+
- name: Build distributions
|
|
31
|
+
run: |
|
|
32
|
+
rm -rf dist
|
|
33
|
+
python -m build
|
|
34
|
+
|
|
35
|
+
- name: Publish to TestPyPI
|
|
36
|
+
env:
|
|
37
|
+
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
|
|
38
|
+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
|
|
39
|
+
run: |
|
|
40
|
+
twine upload \
|
|
41
|
+
--repository testpypi \
|
|
42
|
+
--non-interactive \
|
|
43
|
+
--verbose \
|
|
44
|
+
--skip-existing \
|
|
45
|
+
dist/*
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: 📝 Release Drafter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
# branches to consider in the event; optional, defaults to all
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
# pull_request event is required only for autolabeler
|
|
10
|
+
pull_request:
|
|
11
|
+
# Only following types are handled by the action, but one can default to all as well
|
|
12
|
+
types: [opened, reopened, synchronize]
|
|
13
|
+
# pull_request_target event is required for autolabeler to support PRs from forks
|
|
14
|
+
# pull_request_target:
|
|
15
|
+
# types: [opened, reopened, synchronize]
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
release-drafter:
|
|
22
|
+
permissions:
|
|
23
|
+
# write permission is required to create a github release
|
|
24
|
+
contents: write
|
|
25
|
+
# write permission is required for autolabeler
|
|
26
|
+
# otherwise, read permission is required at least
|
|
27
|
+
pull-requests: write
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
|
|
31
|
+
#- name: Set GHE_HOST
|
|
32
|
+
# run: |
|
|
33
|
+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
|
|
34
|
+
|
|
35
|
+
# Drafts your next Release notes as Pull Requests are merged into "main"
|
|
36
|
+
- uses: release-drafter/release-drafter@v6
|
|
37
|
+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
|
38
|
+
# with:
|
|
39
|
+
# config-name: my-config.yml
|
|
40
|
+
# disable-autolabeler: true
|
|
41
|
+
env:
|
|
42
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: 🚀 Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v3
|
|
12
|
+
|
|
13
|
+
- uses: actions/setup-python@v4
|
|
14
|
+
with:
|
|
15
|
+
python-version: '3.x'
|
|
16
|
+
|
|
17
|
+
- name: Install build tools
|
|
18
|
+
run: pip install --upgrade pip build twine setuptools-scm
|
|
19
|
+
|
|
20
|
+
- name: Build distributions
|
|
21
|
+
run: |
|
|
22
|
+
rm -rf dist
|
|
23
|
+
python -m build
|
|
24
|
+
|
|
25
|
+
- name: Publish to PyPI
|
|
26
|
+
env:
|
|
27
|
+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
28
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
29
|
+
run: |
|
|
30
|
+
twine upload \
|
|
31
|
+
--non-interactive \
|
|
32
|
+
--verbose \
|
|
33
|
+
--skip-existing \
|
|
34
|
+
dist/*
|
|
35
|
+
|
|
36
|
+
- name: Upload Release Assets
|
|
37
|
+
if: ${{ always() }}
|
|
38
|
+
run: |
|
|
39
|
+
gh release upload "${{ github.event.release.tag_name }}" dist/*
|
|
40
|
+
env:
|
|
41
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openscvx
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A general Python-based successive convexification implementation which uses a JAX backend.
|
|
5
5
|
Home-page: https://haynec.github.io/openscvx/
|
|
6
6
|
Author: Chris Hayner and Griffin Norris
|
|
@@ -26,10 +26,15 @@ Dynamic: license-file
|
|
|
26
26
|
|
|
27
27
|
<img src="figures/openscvx_logo.svg" width="1200"/>
|
|
28
28
|
<p align="center">
|
|
29
|
-
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/
|
|
29
|
+
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/website.yml/badge.svg"><img src="https://github.com//haynec/OpenSCvx/actions/workflows/website.yml/badge.svg"/></a>
|
|
30
30
|
<a href="https://arxiv.org/abs/2410.22596"><img src="http://img.shields.io/badge/arXiv-2410.22596-B31B1B.svg"/></a>
|
|
31
31
|
<a href="https://www.apache.org/licenses/LICENSE-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache 2.0"/></a>
|
|
32
32
|
</p>
|
|
33
|
+
<p align="center">
|
|
34
|
+
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/ci.yml/badge.svg"><img src="https://github.com//haynec/OpenSCvx/actions/workflows/ci.yml/badge.svg"/></a>
|
|
35
|
+
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/nightly.yml/badge.svg"><img src="https://github.com//haynec/OpenSCvx/actions/workflows/nightly.yml/badge.svg"/></a>
|
|
36
|
+
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/release.yml/badge.svg"><img src="https://github.com//haynec/OpenSCvx/actions/workflows/release.yml/badge.svg"/></a>
|
|
37
|
+
</p>
|
|
33
38
|
|
|
34
39
|
<!-- PROJECT LOGO -->
|
|
35
40
|
<br />
|
|
@@ -37,20 +42,50 @@ Dynamic: license-file
|
|
|
37
42
|
<!-- GETTING STARTED -->
|
|
38
43
|
## Getting Started
|
|
39
44
|
|
|
40
|
-
|
|
41
45
|
### Installation
|
|
46
|
+
|
|
47
|
+
To grab the latest stable release simply run
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
pip install openscvx
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
to install OpenSCVx in your python environment.
|
|
54
|
+
|
|
55
|
+
<details>
|
|
56
|
+
<summary>Install Development / Nightly Version</summary>
|
|
57
|
+
|
|
58
|
+
If you want the pre-release version, you can install the latest `nightly` build with:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --pre --upgrade openscvx
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
This command will also upgrade an existing `nightly` install to the latest version
|
|
65
|
+
Or if you want a specific pre-release version this can be installed with
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ openscvx==1.2.3.dev45
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
where `1.2.3.dev45 => <major>.<minor>.<patch>.dev<XY>` corresponds to your exact version
|
|
72
|
+
</details>
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
#### Dependencies
|
|
76
|
+
|
|
42
77
|
The main packages are:
|
|
43
|
-
- ```cvxpy``` - is used to formulate and solve the convex subproblems
|
|
44
|
-
- ```jax``` - is used for determining the Jacobians using automatic differentiation, vectorization, and ahead-of-time (AOT) compilation of the dynamics and their Jacobians
|
|
45
|
-
- ```numpy``` - is used for numerical operations
|
|
46
|
-
- ```diffrax``` - is used for the numerical integration of the dynamics
|
|
47
|
-
- ```termcolor``` - is used for pretty command line output
|
|
48
|
-
- ```plotly``` - is used for all visualizations
|
|
49
78
|
|
|
79
|
+
- `cvxpy` - is used to formulate and solve the convex subproblems
|
|
80
|
+
- `jax` - is used for determining the Jacobians using automatic differentiation, vectorization, and ahead-of-time (AOT) compilation of the dynamics and their Jacobians
|
|
81
|
+
- `numpy` - is used for numerical operations
|
|
82
|
+
- `diffrax` - is used for the numerical integration of the dynamics
|
|
83
|
+
- `termcolor` - is used for pretty command line output
|
|
84
|
+
- `plotly` - is used for all visualizations
|
|
50
85
|
|
|
51
|
-
These can be installed via conda or pip.
|
|
86
|
+
These will be installed automatically, but can be installed via conda or pip if you are building from source.
|
|
52
87
|
<details>
|
|
53
|
-
<summary>Via Conda
|
|
88
|
+
<summary>Via Conda</summary>
|
|
54
89
|
|
|
55
90
|
1. Clone the repo
|
|
56
91
|
```sh
|
|
@@ -87,11 +122,11 @@ These can be installed via conda or pip.
|
|
|
87
122
|
See `examples/` folder for several example trajectory optimization problems.
|
|
88
123
|
To run a problem simply run `examples/main.py` with:
|
|
89
124
|
|
|
90
|
-
```
|
|
91
|
-
python3
|
|
125
|
+
```sh
|
|
126
|
+
python3 examples/main.py
|
|
92
127
|
```
|
|
93
128
|
|
|
94
|
-
To change which example is run by `main` simply replace the `
|
|
129
|
+
To change which example is run by `main` simply replace the `problem` import line:
|
|
95
130
|
|
|
96
131
|
```python
|
|
97
132
|
# other imports
|
|
@@ -99,10 +134,11 @@ from examples.params.dr_vp import problem
|
|
|
99
134
|
# rest of code
|
|
100
135
|
```
|
|
101
136
|
|
|
137
|
+
and adjust the plotting as needed.
|
|
102
138
|
Check out the problem definitions inside `examples/params` to see how to define your own problems.
|
|
103
139
|
|
|
104
|
-
|
|
105
140
|
## ToDos
|
|
141
|
+
|
|
106
142
|
- [X] Standardized Vehicle and Constraint classes
|
|
107
143
|
- [X] Implement QOCOGen with CVPYGEN
|
|
108
144
|
- [X] Non-Dilated Time Propagation
|
|
@@ -110,8 +146,12 @@ Check out the problem definitions inside `examples/params` to see how to define
|
|
|
110
146
|
- [ ] Compiled at the subproblem level with JAX
|
|
111
147
|
- [ ] Save and reload the compiled JAX code
|
|
112
148
|
- [ ] Single Shot propagation
|
|
149
|
+
- [ ] Unified Mathematical Interface
|
|
150
|
+
|
|
113
151
|
## What is implemented
|
|
152
|
+
|
|
114
153
|
This repo has the following features:
|
|
154
|
+
|
|
115
155
|
1. Free Final Time
|
|
116
156
|
2. Fully adaptive time dilation (```s``` is appended to the control vector)
|
|
117
157
|
3. Continuous-Time Constraint Satisfaction
|
|
@@ -122,11 +162,14 @@ This repo has the following features:
|
|
|
122
162
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
123
163
|
|
|
124
164
|
## Acknowledgements
|
|
165
|
+
|
|
125
166
|
This work was supported by a NASA Space Technology Graduate Research Opportunity and the Office of Naval Research under grant N00014-17-1-2433. The authors would like to acknowledge Natalia Pavlasek, Samuel Buckner, Abhi Kamath, Govind Chari, and Purnanand Elango as well as the other Autonomous Controls Laboratory members, for their many helpful discussions and support throughout this work.
|
|
126
167
|
|
|
127
168
|
## Citation
|
|
169
|
+
|
|
128
170
|
Please cite the following works if you use the repository,
|
|
129
|
-
|
|
171
|
+
|
|
172
|
+
```tex
|
|
130
173
|
@ARTICLE{hayner2025los,
|
|
131
174
|
author={Hayner, Christopher R. and Carson III, John M. and Açıkmeşe, Behçet and Leung, Karen},
|
|
132
175
|
journal={IEEE Robotics and Automation Letters},
|
|
@@ -139,7 +182,7 @@ Please cite the following works if you use the repository,
|
|
|
139
182
|
doi={10.1109/LRA.2025.3545299}}
|
|
140
183
|
```
|
|
141
184
|
|
|
142
|
-
```
|
|
185
|
+
```tex
|
|
143
186
|
@misc{elango2024ctscvx,
|
|
144
187
|
title={Successive Convexification for Trajectory Optimization with Continuous-Time Constraint Satisfaction},
|
|
145
188
|
author={Purnanand Elango and Dayou Luo and Abhinav G. Kamath and Samet Uzun and Taewan Kim and Behçet Açıkmeşe},
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="figures/openscvx_logo.svg" width="1200"/>
|
|
4
4
|
<p align="center">
|
|
5
|
-
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/
|
|
5
|
+
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/website.yml/badge.svg"><img src="https://github.com//haynec/OpenSCvx/actions/workflows/website.yml/badge.svg"/></a>
|
|
6
6
|
<a href="https://arxiv.org/abs/2410.22596"><img src="http://img.shields.io/badge/arXiv-2410.22596-B31B1B.svg"/></a>
|
|
7
7
|
<a href="https://www.apache.org/licenses/LICENSE-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache 2.0"/></a>
|
|
8
8
|
</p>
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/ci.yml/badge.svg"><img src="https://github.com//haynec/OpenSCvx/actions/workflows/ci.yml/badge.svg"/></a>
|
|
11
|
+
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/nightly.yml/badge.svg"><img src="https://github.com//haynec/OpenSCvx/actions/workflows/nightly.yml/badge.svg"/></a>
|
|
12
|
+
<a href="https://github.com//haynec/OpenSCvx/actions/workflows/release.yml/badge.svg"><img src="https://github.com//haynec/OpenSCvx/actions/workflows/release.yml/badge.svg"/></a>
|
|
13
|
+
</p>
|
|
9
14
|
|
|
10
15
|
<!-- PROJECT LOGO -->
|
|
11
16
|
<br />
|
|
@@ -13,20 +18,50 @@
|
|
|
13
18
|
<!-- GETTING STARTED -->
|
|
14
19
|
## Getting Started
|
|
15
20
|
|
|
16
|
-
|
|
17
21
|
### Installation
|
|
22
|
+
|
|
23
|
+
To grab the latest stable release simply run
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
pip install openscvx
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
to install OpenSCVx in your python environment.
|
|
30
|
+
|
|
31
|
+
<details>
|
|
32
|
+
<summary>Install Development / Nightly Version</summary>
|
|
33
|
+
|
|
34
|
+
If you want the pre-release version, you can install the latest `nightly` build with:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --pre --upgrade openscvx
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This command will also upgrade an existing `nightly` install to the latest version
|
|
41
|
+
Or if you want a specific pre-release version this can be installed with
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ openscvx==1.2.3.dev45
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
where `1.2.3.dev45 => <major>.<minor>.<patch>.dev<XY>` corresponds to your exact version
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
#### Dependencies
|
|
52
|
+
|
|
18
53
|
The main packages are:
|
|
19
|
-
- ```cvxpy``` - is used to formulate and solve the convex subproblems
|
|
20
|
-
- ```jax``` - is used for determining the Jacobians using automatic differentiation, vectorization, and ahead-of-time (AOT) compilation of the dynamics and their Jacobians
|
|
21
|
-
- ```numpy``` - is used for numerical operations
|
|
22
|
-
- ```diffrax``` - is used for the numerical integration of the dynamics
|
|
23
|
-
- ```termcolor``` - is used for pretty command line output
|
|
24
|
-
- ```plotly``` - is used for all visualizations
|
|
25
54
|
|
|
55
|
+
- `cvxpy` - is used to formulate and solve the convex subproblems
|
|
56
|
+
- `jax` - is used for determining the Jacobians using automatic differentiation, vectorization, and ahead-of-time (AOT) compilation of the dynamics and their Jacobians
|
|
57
|
+
- `numpy` - is used for numerical operations
|
|
58
|
+
- `diffrax` - is used for the numerical integration of the dynamics
|
|
59
|
+
- `termcolor` - is used for pretty command line output
|
|
60
|
+
- `plotly` - is used for all visualizations
|
|
26
61
|
|
|
27
|
-
These can be installed via conda or pip.
|
|
62
|
+
These will be installed automatically, but can be installed via conda or pip if you are building from source.
|
|
28
63
|
<details>
|
|
29
|
-
<summary>Via Conda
|
|
64
|
+
<summary>Via Conda</summary>
|
|
30
65
|
|
|
31
66
|
1. Clone the repo
|
|
32
67
|
```sh
|
|
@@ -63,11 +98,11 @@ These can be installed via conda or pip.
|
|
|
63
98
|
See `examples/` folder for several example trajectory optimization problems.
|
|
64
99
|
To run a problem simply run `examples/main.py` with:
|
|
65
100
|
|
|
66
|
-
```
|
|
67
|
-
python3
|
|
101
|
+
```sh
|
|
102
|
+
python3 examples/main.py
|
|
68
103
|
```
|
|
69
104
|
|
|
70
|
-
To change which example is run by `main` simply replace the `
|
|
105
|
+
To change which example is run by `main` simply replace the `problem` import line:
|
|
71
106
|
|
|
72
107
|
```python
|
|
73
108
|
# other imports
|
|
@@ -75,10 +110,11 @@ from examples.params.dr_vp import problem
|
|
|
75
110
|
# rest of code
|
|
76
111
|
```
|
|
77
112
|
|
|
113
|
+
and adjust the plotting as needed.
|
|
78
114
|
Check out the problem definitions inside `examples/params` to see how to define your own problems.
|
|
79
115
|
|
|
80
|
-
|
|
81
116
|
## ToDos
|
|
117
|
+
|
|
82
118
|
- [X] Standardized Vehicle and Constraint classes
|
|
83
119
|
- [X] Implement QOCOGen with CVPYGEN
|
|
84
120
|
- [X] Non-Dilated Time Propagation
|
|
@@ -86,8 +122,12 @@ Check out the problem definitions inside `examples/params` to see how to define
|
|
|
86
122
|
- [ ] Compiled at the subproblem level with JAX
|
|
87
123
|
- [ ] Save and reload the compiled JAX code
|
|
88
124
|
- [ ] Single Shot propagation
|
|
125
|
+
- [ ] Unified Mathematical Interface
|
|
126
|
+
|
|
89
127
|
## What is implemented
|
|
128
|
+
|
|
90
129
|
This repo has the following features:
|
|
130
|
+
|
|
91
131
|
1. Free Final Time
|
|
92
132
|
2. Fully adaptive time dilation (```s``` is appended to the control vector)
|
|
93
133
|
3. Continuous-Time Constraint Satisfaction
|
|
@@ -98,11 +138,14 @@ This repo has the following features:
|
|
|
98
138
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
99
139
|
|
|
100
140
|
## Acknowledgements
|
|
141
|
+
|
|
101
142
|
This work was supported by a NASA Space Technology Graduate Research Opportunity and the Office of Naval Research under grant N00014-17-1-2433. The authors would like to acknowledge Natalia Pavlasek, Samuel Buckner, Abhi Kamath, Govind Chari, and Purnanand Elango as well as the other Autonomous Controls Laboratory members, for their many helpful discussions and support throughout this work.
|
|
102
143
|
|
|
103
144
|
## Citation
|
|
145
|
+
|
|
104
146
|
Please cite the following works if you use the repository,
|
|
105
|
-
|
|
147
|
+
|
|
148
|
+
```tex
|
|
106
149
|
@ARTICLE{hayner2025los,
|
|
107
150
|
author={Hayner, Christopher R. and Carson III, John M. and Açıkmeşe, Behçet and Leung, Karen},
|
|
108
151
|
journal={IEEE Robotics and Automation Letters},
|
|
@@ -115,7 +158,7 @@ Please cite the following works if you use the repository,
|
|
|
115
158
|
doi={10.1109/LRA.2025.3545299}}
|
|
116
159
|
```
|
|
117
160
|
|
|
118
|
-
```
|
|
161
|
+
```tex
|
|
119
162
|
@misc{elango2024ctscvx,
|
|
120
163
|
title={Successive Convexification for Trajectory Optimization with Continuous-Time Constraint Satisfaction},
|
|
121
164
|
author={Purnanand Elango and Dayou Luo and Abhinav G. Kamath and Samet Uzun and Taewan Kim and Behçet Açıkmeşe},
|
|
@@ -3,6 +3,7 @@ import numpy.linalg as la
|
|
|
3
3
|
import jax.numpy as jnp
|
|
4
4
|
|
|
5
5
|
from openscvx.trajoptproblem import TrajOptProblem
|
|
6
|
+
from openscvx.dynamics import dynamics
|
|
6
7
|
from openscvx.utils import qdcm, SSMP, SSM, get_kp_pose
|
|
7
8
|
from openscvx.constraints import boundary, ctcs
|
|
8
9
|
|
|
@@ -54,6 +55,7 @@ norm_type = np.inf # Norm Type
|
|
|
54
55
|
R_sb = jnp.array([[0, 1, 0], [0, 0, 1], [1, 0, 0]])
|
|
55
56
|
|
|
56
57
|
|
|
58
|
+
@dynamics
|
|
57
59
|
def dynamics(x, u):
|
|
58
60
|
m = 1.0 # Mass of the drone
|
|
59
61
|
g_const = -9.18
|
|
@@ -4,6 +4,7 @@ import cvxpy as cp
|
|
|
4
4
|
import jax.numpy as jnp
|
|
5
5
|
|
|
6
6
|
from openscvx.trajoptproblem import TrajOptProblem
|
|
7
|
+
from openscvx.dynamics import dynamics
|
|
7
8
|
from openscvx.utils import qdcm, SSMP, SSM, rot, gen_vertices
|
|
8
9
|
from openscvx.constraints import boundary, ctcs, nodal
|
|
9
10
|
|
|
@@ -107,6 +108,7 @@ for node, cen in zip(gate_nodes, A_gate_cen):
|
|
|
107
108
|
) # use local variables inside the lambda function
|
|
108
109
|
|
|
109
110
|
|
|
111
|
+
@dynamics
|
|
110
112
|
def dynamics(x, u):
|
|
111
113
|
m = 1.0 # Mass of the drone
|
|
112
114
|
g_const = -9.18
|
|
@@ -4,6 +4,7 @@ import cvxpy as cp
|
|
|
4
4
|
import jax.numpy as jnp
|
|
5
5
|
|
|
6
6
|
from openscvx.trajoptproblem import TrajOptProblem
|
|
7
|
+
from openscvx.dynamics import dynamics
|
|
7
8
|
from openscvx.utils import qdcm, SSMP, SSM, rot, gen_vertices
|
|
8
9
|
from openscvx.constraints import boundary, nodal
|
|
9
10
|
|
|
@@ -111,6 +112,7 @@ for node, cen in zip(gate_nodes, A_gate_cen):
|
|
|
111
112
|
) # use local variables inside the lambda function
|
|
112
113
|
|
|
113
114
|
|
|
115
|
+
@dynamics
|
|
114
116
|
def dynamics(x, u):
|
|
115
117
|
m = 1.0 # Mass of the drone
|
|
116
118
|
g_const = -9.81
|
|
@@ -4,6 +4,7 @@ import jax.numpy as jnp
|
|
|
4
4
|
import cvxpy as cp
|
|
5
5
|
|
|
6
6
|
from openscvx.trajoptproblem import TrajOptProblem
|
|
7
|
+
from openscvx.dynamics import dynamics
|
|
7
8
|
from openscvx.utils import qdcm, SSMP, SSM, rot, gen_vertices
|
|
8
9
|
from openscvx.constraints import boundary, ctcs, nodal
|
|
9
10
|
|
|
@@ -131,6 +132,7 @@ for node, cen in zip(gate_nodes, A_gate_cen):
|
|
|
131
132
|
) # use local variables inside the lambda function
|
|
132
133
|
|
|
133
134
|
|
|
135
|
+
@dynamics
|
|
134
136
|
def dynamics(x, u):
|
|
135
137
|
m = 1.0 # Mass of the drone
|
|
136
138
|
g_const = -9.18
|
|
@@ -3,6 +3,7 @@ import jax.numpy as jnp
|
|
|
3
3
|
import cvxpy as cp
|
|
4
4
|
|
|
5
5
|
from openscvx.trajoptproblem import TrajOptProblem
|
|
6
|
+
from openscvx.dynamics import dynamics
|
|
6
7
|
from openscvx.constraints import boundary, ctcs, nodal
|
|
7
8
|
from openscvx.utils import qdcm, SSMP, SSM, rot, gen_vertices
|
|
8
9
|
|
|
@@ -80,6 +81,7 @@ for node, cen in zip(gate_nodes, A_gate_cen):
|
|
|
80
81
|
) # use local variables inside the lambda function
|
|
81
82
|
|
|
82
83
|
|
|
84
|
+
@dynamics
|
|
83
85
|
def dynamics(x, u):
|
|
84
86
|
# Unpack the state and control vectors
|
|
85
87
|
v = x[3:6]
|
|
@@ -2,6 +2,7 @@ import numpy as np
|
|
|
2
2
|
import jax.numpy as jnp
|
|
3
3
|
|
|
4
4
|
from openscvx.trajoptproblem import TrajOptProblem
|
|
5
|
+
from openscvx.dynamics import dynamics
|
|
5
6
|
from openscvx.constraints import boundary, ctcs
|
|
6
7
|
from openscvx.utils import qdcm, SSMP, SSM, generate_orthogonal_unit_vectors
|
|
7
8
|
|
|
@@ -23,6 +24,7 @@ final_state.type[13] = "Minimize"
|
|
|
23
24
|
initial_control = np.array([0.0, 0, 50, 0, 0, 0])
|
|
24
25
|
|
|
25
26
|
|
|
27
|
+
@dynamics
|
|
26
28
|
def dynamics(x, u):
|
|
27
29
|
m = 1.0 # Mass of the drone
|
|
28
30
|
g_const = -9.18
|
|
@@ -2,6 +2,7 @@ import numpy as np
|
|
|
2
2
|
import jax.numpy as jnp
|
|
3
3
|
|
|
4
4
|
from openscvx.trajoptproblem import TrajOptProblem
|
|
5
|
+
from openscvx.dynamics import dynamics
|
|
5
6
|
from openscvx.constraints import boundary, ctcs, nodal
|
|
6
7
|
from openscvx.utils import qdcm, SSMP, SSM, generate_orthogonal_unit_vectors
|
|
7
8
|
|
|
@@ -23,6 +24,7 @@ final_state.type[13] = "Minimize"
|
|
|
23
24
|
initial_control = np.array([0., 0., 50., 0., 0., 0.])
|
|
24
25
|
|
|
25
26
|
|
|
27
|
+
@dynamics
|
|
26
28
|
def dynamics(x, u):
|
|
27
29
|
m = 1.0 # Mass of the drone
|
|
28
30
|
g_const = -9.18
|