openscvx 0.4.1.dev147__tar.gz → 0.4.1.dev149__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.
- {openscvx-0.4.1.dev147/openscvx.egg-info → openscvx-0.4.1.dev149}/PKG-INFO +1 -1
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UsersGuide/06_logic.md +2 -3
- openscvx-0.4.1.dev149/examples/abstract/stl_integer_variable.py +102 -0
- openscvx-0.4.1.dev149/examples/abstract/stl_or.py +108 -0
- openscvx-0.4.1.dev149/examples/car/dubins_car_obstacle_stl.py +154 -0
- openscvx-0.4.1.dev147/examples/car/dubins_car_stljax.py → openscvx-0.4.1.dev149/examples/car/dubins_car_stl_or.py +4 -3
- openscvx-0.4.1.dev149/examples/car/dubins_car_waypoint_stl.py +163 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/plotting.py +130 -3
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/__init__.py +2 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/_version.py +3 -3
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/propagation/post_processing.py +4 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/propagation/propagation.py +12 -6
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/__init__.py +2 -7
- openscvx-0.4.1.dev149/openscvx/symbolic/expr/stl.py +382 -0
- openscvx-0.4.1.dev147/openscvx/symbolic/expr/stl.py → openscvx-0.4.1.dev149/openscvx/symbolic/expr/stljax.py +15 -15
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/__init__.py +1 -0
- openscvx-0.4.1.dev149/openscvx/symbolic/lowerers/jax/stl.py +228 -0
- openscvx-0.4.1.dev147/openscvx/symbolic/lowerers/jax/stl.py → openscvx-0.4.1.dev149/openscvx/symbolic/lowerers/jax/stljax.py +6 -6
- openscvx-0.4.1.dev149/openscvx/symbolic/parser/stl.py +40 -0
- openscvx-0.4.1.dev147/openscvx/symbolic/parser/stl.py → openscvx-0.4.1.dev149/openscvx/symbolic/parser/stljax.py +4 -4
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149/openscvx.egg-info}/PKG-INFO +1 -1
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx.egg-info/SOURCES.txt +12 -2
- openscvx-0.4.1.dev149/tests/expr/test_gmsr.py +346 -0
- openscvx-0.4.1.dev149/tests/symbolic/expr/test_stl.py +579 -0
- openscvx-0.4.1.dev149/tests/symbolic/parser/__init__.py +0 -0
- openscvx-0.4.1.dev149/tests/symbolic/parser/test_stl.py +126 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_examples.py +4 -0
- openscvx-0.4.1.dev147/tests/symbolic/parser/test_stl.py +0 -44
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/assets/logo.svg +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/release-drafter.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/_docs.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/branch-name.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/docs.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/lint.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/nightly.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/release-drafter.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/release.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/tests-integration.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.github/workflows/tests-unit.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/.gitignore +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/CONTRIBUTING.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/LICENSE +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/README.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/Foundations/constraint_reformulation.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/Foundations/control_parameterization.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/Foundations/discretization.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/Foundations/ocp.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/Foundations/scvx.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/Foundations/time_dilation.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UnderTheHood/lowering_architecture.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UnderTheHood/vectorization_and_vmapping.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UsersGuide/00_introduction.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UsersGuide/01_hello_world_brachistochrone.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UsersGuide/02_drone_racing_constraints.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UsersGuide/03_obstacle_avoidance_vmap.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UsersGuide/04_viewpoint_constraints.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UsersGuide/05_visualization.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/UsersGuide/07_lie.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/assets/favicon.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/assets/images/ct-scvx_dark.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/assets/images/ct-scvx_light.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/assets/images/ctcs_dark.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/assets/images/ctcs_light.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/assets/images/problem_class_dark.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/assets/images/problem_class_light.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/assets/logo.svg +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/citation.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/examples.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/getting-started.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/index.md +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/docs/javascripts/mathjax.js +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/abstract/brachistochrone.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/abstract/impulsive.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/arm/three_link_arm.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/car/dubins_car.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/car/dubins_car_disjoint.py +0 -0
- /openscvx-0.4.1.dev147/examples/car/dubins_car_conditional.py → /openscvx-0.4.1.dev149/examples/car/dubins_car_obstacle_conditional.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/cinema_vp.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/dr_double_integrator.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/dr_vp.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/dr_vp_nodal.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/dr_vp_polytope.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/drone_racing.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/logo.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/logo_utils/acl_logo.svg +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/logo_utils/svg_path_utils.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/obstacle_avoidance.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/obstacle_avoidance_nodal.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/drone/obstacle_avoidance_vmap.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/plotting_viser.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/realtime/base_problems/cinema_vp_realtime_base.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/realtime/base_problems/drone_racing_realtime_base.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/realtime/base_problems/obstacle_avoidance_realtime_base.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/realtime/cinema_vp_realtime.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/realtime/drone_racing_realtime.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/realtime/dubins_car_realtime.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/realtime/obstacle_avoidance_realtime.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/rocket/3DoF_pdg.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/spacecraft/hohmann_transfer.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/examples/spacecraft/proxops_cw.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/figures/ctlos_cine.gif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/figures/ctlos_dr.gif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/figures/dtlos_cine.gif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/figures/dtlos_dr.gif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/figures/openscvx_logo.svg +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/figures/openscvx_logo_square.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/figures/oscvx_structure_full_dark.svg +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/figures/video_preview.png +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/1-background.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/1-background@1x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/1-background@2x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/1-background@3x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/1-background@4x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/2-mars.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/2-mars@1x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/2-mars@2x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/2-mars@3x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/2-mars@4x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/3-moon.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/3-moon@1x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/3-moon@2x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/3-moon@3x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/3-moon@4x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/4-sat1.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/4-sat1@1x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/4-sat1@2x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/4-sat1@3x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/4-sat1@4x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/5-space.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/5-space@1x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/5-space@2x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/5-space@3x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/5-space@4x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/6-earth.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/6-earth@1x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/6-earth@2x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/6-earth@3x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/images/layers/6-earth@4x.avif +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/javascripts/parallax.js +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/logo.svg +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/stylesheets/custom.css +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/assets/stylesheets/parallax.css +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/home.html +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/main.html +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/partials/parallax/hero.html +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/material/overrides/partials/parallax.html +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/mkdocs.yml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/__main__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/algorithms/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/algorithms/augmented_lagrangian.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/algorithms/base.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/algorithms/constant_proximal_weight.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/algorithms/optimization_results.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/algorithms/penalized_trust_region.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/algorithms/ramp_proximal_weight.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/config.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/discretization/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/discretization/base.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/discretization/linearize_discretize.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/expert/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/expert/byof.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/expert/lowering.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/expert/validation.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/init/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/init/interpolation.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/integrators/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/integrators/runge_kutta.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/loader.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/lowered/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/lowered/cvxpy_constraints.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/lowered/cvxpy_variables.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/lowered/dynamics.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/lowered/jax_constraints.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/lowered/parameters.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/lowered/problem.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/lowered/unified.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/plotting.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/scp_iteration.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/viser/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/viser/animated.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/viser/orbits.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/viser/plotly_integration.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/viser/primitives.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/viser/scp.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/plotting/viser/server.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/problem.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/propagation/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/solvers/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/solvers/base.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/solvers/ptr_solver.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/augmentation.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/builder.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/constraint_set.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/arithmetic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/array.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/constraint.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/control.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/expr.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/lie/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/lie/adjoint.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/lie/se3.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/lie/so3.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/linalg.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/logic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/math.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/spatial.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/state.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/time.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/variable.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/expr/vmap.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/hashing.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lower.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/_lowerer.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/_registry.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/arithmetic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/array.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/constraint.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/control.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/expr.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/linalg.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/logic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/math.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/cvxpy/state.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/_lowerer.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/_registry.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/arithmetic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/array.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/constraint.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/control.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/expr.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/lie.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/linalg.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/logic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/math.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/spatial.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/state.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/lowerers/jax/vmap.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/_registry.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/array.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/constraint.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/lie.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/linalg.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/logic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/math.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/parser.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/spatial.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/parser/tokenizer.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/preprocessing.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/problem.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/sparsity.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/symbolic/unified.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/utils/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/utils/cache.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/utils/caching.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/utils/printing.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/utils/profiling.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx/utils/utils.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx.egg-info/dependency_links.txt +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx.egg-info/entry_points.txt +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx.egg-info/requires.txt +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/openscvx.egg-info/top_level.txt +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/pyproject.toml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/scripts/gen_example_pages.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/scripts/gen_ref_pages.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/setup.cfg +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/brachistochrone_analytical.py +0 -0
- {openscvx-0.4.1.dev147/tests/symbolic → openscvx-0.4.1.dev149/tests/expr}/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/fixtures/brachistochrone.json +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/fixtures/brachistochrone.yaml +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/hohmann_analytical.py +0 -0
- {openscvx-0.4.1.dev147/tests/symbolic/expr → openscvx-0.4.1.dev149/tests/symbolic}/__init__.py +0 -0
- {openscvx-0.4.1.dev147/tests/symbolic/parser → openscvx-0.4.1.dev149/tests/symbolic/expr}/__init__.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_arithmetic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_array.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_constraint.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_expr.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_lie.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_linalg.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_logic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_math.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_node_reference.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_parameters.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_scaling.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_spatial.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_variable.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/expr/test_vmap.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_array.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_constraint.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_lie.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_linalg.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_load.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_logic.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_math.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_parser.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_spatial.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_tokenizer.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/parser/test_vmap.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/test_augmentation.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/test_hashing.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/test_lower_cvxpy.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/test_lower_jax.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/test_preprocessing.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/test_sparsity.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/symbolic/test_unified.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_autotuning.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_brachistochrone.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_cvxpygen_optional.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_discretization.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_expert.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_impulsive.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_init.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_integrators.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_loader.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_optimization_results.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_plotting.py +0 -0
- {openscvx-0.4.1.dev147 → openscvx-0.4.1.dev149}/tests/test_propagation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openscvx
|
|
3
|
-
Version: 0.4.1.
|
|
3
|
+
Version: 0.4.1.dev149
|
|
4
4
|
Summary: A general Python-based successive convexification implementation which uses a JAX backend.
|
|
5
5
|
Author-email: Chris Hayner and Griffin Norris <haynec@uw.edu>
|
|
6
6
|
License: Apache Software License
|
|
@@ -7,6 +7,5 @@
|
|
|
7
7
|
|
|
8
8
|
- [API Reference: Logic operators](../Reference/symbolic/expr/logic.md)
|
|
9
9
|
- [API Reference: STL operators](../Reference/symbolic/expr/stl.md)
|
|
10
|
-
- [Dubin's Car with conditional
|
|
11
|
-
- [Dubin's Car with direct STL implementation Example](../Examples/car/dubins_car_disjoint.md)
|
|
12
|
-
- [Dubin's Car with STLJAX Example](../Examples/car/dubins_car_stljax.md)
|
|
10
|
+
- [Dubin's Car with obstacle avoidance (conditional) Example](../Examples/car/dubins_car_obstacle_conditional.md)
|
|
11
|
+
- [Dubin's Car with direct STL implementation Example](../Examples/car/dubins_car_disjoint.md)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""Simple example using `ox.stl.IntegerVariable` to enforce discrete-valued states.
|
|
2
|
+
|
|
3
|
+
This example sets up a 1D integrator where a second "gear" state must always
|
|
4
|
+
take one of three discrete values {-1, 0, 1}. The control drives the position
|
|
5
|
+
state `x`, while the gear state `g` is itself a continuous variable that is
|
|
6
|
+
penalized whenever it deviates from the allowed discrete set.
|
|
7
|
+
|
|
8
|
+
- State `x`: position, driven by control `u`
|
|
9
|
+
- State `g`: gear-like variable constrained to {-1, 0, 1} at every node
|
|
10
|
+
- `u` also acts as the rate of change for `g` (both share the same control)
|
|
11
|
+
- The IntegerVariable STL constraint is enforced over the full horizon
|
|
12
|
+
|
|
13
|
+
Run it directly to solve and print the resulting trajectory.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
import os
|
|
17
|
+
import sys
|
|
18
|
+
|
|
19
|
+
import numpy as np
|
|
20
|
+
|
|
21
|
+
import openscvx as ox
|
|
22
|
+
from openscvx import Problem
|
|
23
|
+
|
|
24
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
25
|
+
project_root = os.path.dirname(os.path.dirname(current_dir))
|
|
26
|
+
if project_root not in sys.path:
|
|
27
|
+
sys.path.append(project_root)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Discretization parameters
|
|
31
|
+
N = 10
|
|
32
|
+
total_time = 10.0
|
|
33
|
+
|
|
34
|
+
# Scalar position state
|
|
35
|
+
x = ox.State("x", shape=(1,))
|
|
36
|
+
x.min = np.array([0.0])
|
|
37
|
+
x.max = np.array([5.0])
|
|
38
|
+
x.initial = np.array([0.0])
|
|
39
|
+
x.final = [5.0]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# Control: drives position; gear integrates toward chosen discrete level
|
|
43
|
+
u = ox.Control("u", shape=(1,))
|
|
44
|
+
u.min = np.array([0.0])
|
|
45
|
+
u.max = np.array([10.0])
|
|
46
|
+
u.guess = np.ones((N, 1)) * 8.0
|
|
47
|
+
|
|
48
|
+
states = [x]
|
|
49
|
+
controls = [u]
|
|
50
|
+
|
|
51
|
+
# Dynamics: x_dot = u, g_dot = v
|
|
52
|
+
dynamics = {
|
|
53
|
+
"x": u,
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
# Box constraints on states and controls
|
|
57
|
+
constraints = []
|
|
58
|
+
for state in states:
|
|
59
|
+
constraints.extend(
|
|
60
|
+
[
|
|
61
|
+
ox.ctcs(state <= state.max),
|
|
62
|
+
ox.ctcs(state.min <= state),
|
|
63
|
+
]
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# IntegerVariable: g must equal one of the allowed levels at every node
|
|
67
|
+
allowed_levels = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
|
|
68
|
+
levels = ox.stl.IntegerVariable(u, allowed_levels, c=1e-8)
|
|
69
|
+
constraints.append(levels.over((0, N - 1)))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# Time configuration
|
|
73
|
+
time = ox.Time(
|
|
74
|
+
initial=0.0,
|
|
75
|
+
final=ox.Minimize(total_time),
|
|
76
|
+
min=0.0,
|
|
77
|
+
max=total_time,
|
|
78
|
+
uniform_time_grid=True,
|
|
79
|
+
time_dilation_min=0.2,
|
|
80
|
+
time_dilation_max=2.0,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
problem = Problem(
|
|
84
|
+
dynamics=dynamics,
|
|
85
|
+
constraints=constraints,
|
|
86
|
+
states=states,
|
|
87
|
+
controls=controls,
|
|
88
|
+
N=N,
|
|
89
|
+
time=time,
|
|
90
|
+
algorithm={"autotuner": ox.ConstantProximalWeight(), "ep_vc": 1e-3, "lam_cost": 1e1},
|
|
91
|
+
discretizer={"dis_type": "ZOH"},
|
|
92
|
+
float_dtype="float64",
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
problem.settings.prp.dt = 0.001
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
if __name__ == "__main__":
|
|
100
|
+
problem.initialize()
|
|
101
|
+
results = problem.solve()
|
|
102
|
+
results = problem.post_process()
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""Very simple example using the GMSR-based STL `Or` operator (`ox.stl.Or`).
|
|
2
|
+
|
|
3
|
+
This example sets up a 1D integrator with a single STL reachability specification:
|
|
4
|
+
|
|
5
|
+
- State `x` must reach either goal position `x_a` OR `x_b` by the final node.
|
|
6
|
+
- The STL formula is built with `ox.stl.Or` and enforced via `.at(N - 1)`.
|
|
7
|
+
|
|
8
|
+
The example is intentionally minimal and does not use any plotting utilities.
|
|
9
|
+
Run it directly to solve and print the resulting trajectory statistics.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import os
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
import numpy as np
|
|
16
|
+
import matplotlib.pyplot as plt
|
|
17
|
+
|
|
18
|
+
import openscvx as ox
|
|
19
|
+
from openscvx import Problem
|
|
20
|
+
from openscvx.plotting import plot_states, plot_controls, plot_virtual_control_heatmap
|
|
21
|
+
|
|
22
|
+
# Ensure examples can be run directly by adding project root to path
|
|
23
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
24
|
+
project_root = os.path.dirname(os.path.dirname(current_dir))
|
|
25
|
+
if project_root not in sys.path:
|
|
26
|
+
sys.path.append(project_root)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Discretization parameters
|
|
30
|
+
N = 20
|
|
31
|
+
total_time = 2.0
|
|
32
|
+
|
|
33
|
+
# Scalar state: position x
|
|
34
|
+
x = ox.State("x", shape=(1,))
|
|
35
|
+
x.min = np.array([-2.0])
|
|
36
|
+
x.max = np.array([2.0])
|
|
37
|
+
x.initial = np.array([0.0])
|
|
38
|
+
x.final = [ox.Free(0.1)]
|
|
39
|
+
|
|
40
|
+
# Scalar control: acceleration u
|
|
41
|
+
u = ox.Control("u", shape=(1,))
|
|
42
|
+
u.min = np.array([-1.0])
|
|
43
|
+
u.max = np.array([1.0])
|
|
44
|
+
u.guess = np.zeros((N, 1))
|
|
45
|
+
|
|
46
|
+
states = [x]
|
|
47
|
+
controls = [u]
|
|
48
|
+
|
|
49
|
+
# Simple integrator dynamics: x_dot = u
|
|
50
|
+
dynamics = {
|
|
51
|
+
"x": u,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
# Box constraints for state bounds
|
|
55
|
+
constraints = []
|
|
56
|
+
for state in states:
|
|
57
|
+
constraints.extend(
|
|
58
|
+
[
|
|
59
|
+
ox.ctcs(state <= state.max),
|
|
60
|
+
ox.ctcs(state.min <= state),
|
|
61
|
+
]
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# STL reachability specification: at the final node, be near either
|
|
65
|
+
# goal position x_a OR goal position x_b.
|
|
66
|
+
x_a = np.array([-1.0])
|
|
67
|
+
x_b = np.array([1.0])
|
|
68
|
+
radius = np.array([0.1])
|
|
69
|
+
|
|
70
|
+
reach_a = ox.linalg.Norm(x - x_a) <= radius
|
|
71
|
+
reach_b = ox.linalg.Norm(x - x_b) <= radius
|
|
72
|
+
|
|
73
|
+
reach_either = ox.stl.Or(reach_a, reach_b)
|
|
74
|
+
# Enforce the STL Or condition over the whole horizon
|
|
75
|
+
constraints.append(reach_either.over((N - 2, N - 1), penalty="squared_relu"))
|
|
76
|
+
|
|
77
|
+
# Time configuration (auto-created "time" trajectory)
|
|
78
|
+
time = ox.Time(
|
|
79
|
+
initial=0.0,
|
|
80
|
+
final=("minimize", total_time),
|
|
81
|
+
min=0.0,
|
|
82
|
+
max=total_time,
|
|
83
|
+
uniform_time_grid=True,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
problem = Problem(
|
|
87
|
+
dynamics=dynamics,
|
|
88
|
+
constraints=constraints,
|
|
89
|
+
states=states,
|
|
90
|
+
controls=controls,
|
|
91
|
+
N=N,
|
|
92
|
+
time=time,
|
|
93
|
+
algorithm={"autotuner": ox.ConstantProximalWeight()},
|
|
94
|
+
float_dtype="float64",
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
problem.algorithm.lam_vb = 1e2
|
|
98
|
+
|
|
99
|
+
problem.algorithm.lam_vc = 1e1
|
|
100
|
+
|
|
101
|
+
if __name__ == "__main__":
|
|
102
|
+
problem.initialize()
|
|
103
|
+
results = problem.solve()
|
|
104
|
+
results = problem.post_process()
|
|
105
|
+
|
|
106
|
+
plot_states(results).show()
|
|
107
|
+
plot_controls(results).show()
|
|
108
|
+
plot_virtual_control_heatmap(results).show()
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"""Dubins car path planning with conditional velocity constraint using Cond operator.
|
|
2
|
+
|
|
3
|
+
This example demonstrates the use of the Cond operator for conditional logic
|
|
4
|
+
in constraints. The car has different maximum velocity limits based on proximity
|
|
5
|
+
to the obstacle:
|
|
6
|
+
|
|
7
|
+
- When far from obstacle: higher maximum velocity (10.0)
|
|
8
|
+
- When near obstacle: lower maximum velocity (5.0) for safer navigation
|
|
9
|
+
|
|
10
|
+
This showcases how to use ox.Cond for JAX-traceable conditional branching
|
|
11
|
+
in constraint expressions.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import os
|
|
15
|
+
import sys
|
|
16
|
+
|
|
17
|
+
import jax.numpy as jnp
|
|
18
|
+
import numpy as np
|
|
19
|
+
|
|
20
|
+
# Add grandparent directory to path to import examples.plotting
|
|
21
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
22
|
+
grandparent_dir = os.path.dirname(os.path.dirname(current_dir))
|
|
23
|
+
sys.path.append(grandparent_dir)
|
|
24
|
+
|
|
25
|
+
import openscvx as ox
|
|
26
|
+
from examples.plotting import plot_dubins_car, plot_velocity_vs_distance
|
|
27
|
+
from openscvx.plotting import plot_states, plot_controls
|
|
28
|
+
from openscvx import Problem
|
|
29
|
+
|
|
30
|
+
n = 8
|
|
31
|
+
total_time = 0.8 # Total simulation time
|
|
32
|
+
|
|
33
|
+
# Define state components
|
|
34
|
+
position = ox.State("position", shape=(2,)) # 2D position [x, y]
|
|
35
|
+
position.min = np.array([-5.0, -5.0])
|
|
36
|
+
position.max = np.array([5.0, 5.0])
|
|
37
|
+
position.initial = np.array([0, -2])
|
|
38
|
+
position.final = np.array([0, 2])
|
|
39
|
+
|
|
40
|
+
theta = ox.State("theta", shape=(1,)) # Heading angle
|
|
41
|
+
theta.min = np.array([-2 * jnp.pi])
|
|
42
|
+
theta.max = np.array([2 * jnp.pi])
|
|
43
|
+
theta.initial = np.array([0])
|
|
44
|
+
theta.final = [ox.Free(0)]
|
|
45
|
+
|
|
46
|
+
speed = ox.State("speed", shape=(1,)) # Forward speed
|
|
47
|
+
speed.min = np.array([0])
|
|
48
|
+
speed.max = np.array([10])
|
|
49
|
+
speed.initial = [ox.Free(10)]
|
|
50
|
+
speed.final = [ox.Free(10)]
|
|
51
|
+
speed.guess = np.ones((n, 1)) * 10.0
|
|
52
|
+
|
|
53
|
+
# Define control components
|
|
54
|
+
acceleration = ox.Control("acceleration", shape=(1,)) # Acceleration
|
|
55
|
+
acceleration.min = np.array([-10])
|
|
56
|
+
acceleration.max = np.array([10])
|
|
57
|
+
acceleration.guess = np.zeros((n, 1))
|
|
58
|
+
|
|
59
|
+
angular_rate = ox.Control("angular_rate", shape=(1,)) # Angular velocity
|
|
60
|
+
angular_rate.min = np.array([-5])
|
|
61
|
+
angular_rate.max = np.array([5])
|
|
62
|
+
angular_rate.guess = np.zeros((n, 1))
|
|
63
|
+
|
|
64
|
+
# Define list of all states and controls
|
|
65
|
+
states = [position, speed, theta]
|
|
66
|
+
controls = [acceleration, angular_rate]
|
|
67
|
+
|
|
68
|
+
# Define Parameters with initial values for obstacle radius and center
|
|
69
|
+
obs_center = ox.Parameter("obs_center", shape=(2,), value=np.array([-0.25, 0.0]))
|
|
70
|
+
obs_radius = ox.Parameter("obs_radius", shape=(), value=1.0)
|
|
71
|
+
|
|
72
|
+
# Safety distance threshold for conditional velocity constraint
|
|
73
|
+
safety_threshold = 1.1 # Distance from obstacle where we reduce max velocity
|
|
74
|
+
|
|
75
|
+
# Generate box constraints for all states
|
|
76
|
+
constraints = []
|
|
77
|
+
for state in states:
|
|
78
|
+
constraints.extend([ox.ctcs(state <= state.max), ox.ctcs(state.min <= state)])
|
|
79
|
+
|
|
80
|
+
# Add obstacle avoidance constraint
|
|
81
|
+
constraints.append(ox.ctcs(obs_radius <= ox.linalg.Norm(position - obs_center)))
|
|
82
|
+
|
|
83
|
+
# Add the conditional velocity constraint as an STL specification:
|
|
84
|
+
# - If the car is within safety_threshold of the obstacle, then speed <= 5.0
|
|
85
|
+
# - If the car is farther than safety_threshold, then speed <= 10.0
|
|
86
|
+
distance_to_obstacle = ox.linalg.Norm(position - obs_center)
|
|
87
|
+
|
|
88
|
+
near_obstacle = distance_to_obstacle <= safety_threshold
|
|
89
|
+
|
|
90
|
+
# Use the scalar speed magnitude so the IfThen residuals are 0-D scalars
|
|
91
|
+
slow_speed = ox.linalg.Norm(speed) <= 5.0
|
|
92
|
+
|
|
93
|
+
velocity_rule = ox.stl.IfThen(near_obstacle, slow_speed, c = 1e-12)
|
|
94
|
+
|
|
95
|
+
constraints.append(
|
|
96
|
+
velocity_rule.over(
|
|
97
|
+
(0, n - 1),
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Define normal dynamics (no conditional logic here)
|
|
103
|
+
dynamics = {
|
|
104
|
+
"position": ox.Concat(
|
|
105
|
+
speed * ox.Sin(theta), # x_dot
|
|
106
|
+
speed * ox.Cos(theta), # y_dot
|
|
107
|
+
),
|
|
108
|
+
"speed": acceleration,
|
|
109
|
+
"theta": angular_rate,
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
# Build the problem (parameters auto-collected from Parameter objects)
|
|
114
|
+
time = ox.Time(
|
|
115
|
+
initial=0.0,
|
|
116
|
+
final=ox.Minimize(total_time),
|
|
117
|
+
min=0.0,
|
|
118
|
+
max=5.0,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
problem = Problem(
|
|
122
|
+
dynamics=dynamics,
|
|
123
|
+
states=states,
|
|
124
|
+
controls=controls,
|
|
125
|
+
time=time,
|
|
126
|
+
constraints=constraints,
|
|
127
|
+
N=n,
|
|
128
|
+
float_dtype="float64",
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
plotting_dict = {
|
|
132
|
+
"obs_radius": problem.parameters["obs_radius"],
|
|
133
|
+
"obs_center": problem.parameters["obs_center"],
|
|
134
|
+
"safety_threshold": safety_threshold,
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if __name__ == "__main__":
|
|
138
|
+
print("Dubins Car with Conditional Velocity Constraint (using Cond operator)")
|
|
139
|
+
print("=" * 70)
|
|
140
|
+
print("Max velocity is 5.0 when within 2.0 units of obstacle, else 10.0")
|
|
141
|
+
print("=" * 70)
|
|
142
|
+
|
|
143
|
+
problem.initialize()
|
|
144
|
+
results = problem.solve()
|
|
145
|
+
results = problem.post_process()
|
|
146
|
+
results.update(plotting_dict)
|
|
147
|
+
|
|
148
|
+
# Plot trajectory
|
|
149
|
+
plot_dubins_car(results, problem.settings).show()
|
|
150
|
+
plot_states(results).show()
|
|
151
|
+
plot_controls(results).show()
|
|
152
|
+
|
|
153
|
+
# Plot velocity vs distance to obstacle
|
|
154
|
+
plot_velocity_vs_distance(results, problem.settings).show()
|
|
@@ -93,7 +93,7 @@ wp2_pred = ox.linalg.Norm(position - wp2_center) <= wp2_radius
|
|
|
93
93
|
|
|
94
94
|
# Visit waypoint constraints using symbolic Or
|
|
95
95
|
# Note: visit_wp_or_expr is already a constraint, so we can use .over() directly
|
|
96
|
-
constraints.append(ox.stl.Or(wp1_pred, wp2_pred).over((3, 5)))
|
|
96
|
+
constraints.append(ox.stl.Or(wp1_pred, wp2_pred).over((3, 5), penalty="squared_relu"))
|
|
97
97
|
|
|
98
98
|
# Build the problem
|
|
99
99
|
constraints.append((time.at(5) - time.at(3) == 1.23).convex())
|
|
@@ -105,7 +105,7 @@ problem = Problem(
|
|
|
105
105
|
time=time, # Time is already defined above as ox.Time
|
|
106
106
|
constraints=constraints,
|
|
107
107
|
N=n,
|
|
108
|
-
|
|
108
|
+
float_dtype="float64",
|
|
109
109
|
)
|
|
110
110
|
|
|
111
111
|
# Extract parameter values from problem.parameters (not Parameter objects)
|
|
@@ -122,4 +122,5 @@ if __name__ == "__main__":
|
|
|
122
122
|
results = problem.solve()
|
|
123
123
|
results = problem.post_process()
|
|
124
124
|
results.update(plotting_dict)
|
|
125
|
-
|
|
125
|
+
|
|
126
|
+
plot_dubins_car_disjoint(results, problem.settings).show()
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"""Dubins car path planning with STL waypoint inside a 2-norm ball.
|
|
2
|
+
|
|
3
|
+
This example demonstrates the use of GMSR-based STL operators to encode a
|
|
4
|
+
waypoint specified as a 2-norm ball, together with a time-windowed speed
|
|
5
|
+
restriction:
|
|
6
|
+
|
|
7
|
+
- At nodes 10–14, the position must stay inside a 2-norm ball (the waypoint)
|
|
8
|
+
- While in this waypoint window, the speed is restricted to a lower value
|
|
9
|
+
(here, from the global max 10.0 down to 1.0)
|
|
10
|
+
|
|
11
|
+
This showcases how to use `ox.stl` operators over a specific node interval to
|
|
12
|
+
impose waypoint and speed-profile constraints.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
import sys
|
|
17
|
+
|
|
18
|
+
import jax.numpy as jnp
|
|
19
|
+
import numpy as np
|
|
20
|
+
|
|
21
|
+
# Add grandparent directory to path to import examples.plotting
|
|
22
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
23
|
+
grandparent_dir = os.path.dirname(os.path.dirname(current_dir))
|
|
24
|
+
sys.path.append(grandparent_dir)
|
|
25
|
+
|
|
26
|
+
import openscvx as ox
|
|
27
|
+
from examples.plotting import plot_dubins_car, plot_velocity_vs_waypoint
|
|
28
|
+
from openscvx.plotting import plot_states, plot_controls
|
|
29
|
+
from openscvx import Problem
|
|
30
|
+
|
|
31
|
+
n = 20
|
|
32
|
+
total_time = 3.0 # Total simulation time
|
|
33
|
+
|
|
34
|
+
# Define state components
|
|
35
|
+
position = ox.State("position", shape=(2,)) # 2D position [x, y]
|
|
36
|
+
position.min = np.array([-5.0, -5.0])
|
|
37
|
+
position.max = np.array([5.0, 5.0])
|
|
38
|
+
position.initial = np.array([0, -2])
|
|
39
|
+
position.final = np.array([0, 2])
|
|
40
|
+
|
|
41
|
+
theta = ox.State("theta", shape=(1,)) # Heading angle
|
|
42
|
+
theta.min = np.array([-2 * jnp.pi])
|
|
43
|
+
theta.max = np.array([2 * jnp.pi])
|
|
44
|
+
theta.initial = np.array([0])
|
|
45
|
+
theta.final = [ox.Free(0)]
|
|
46
|
+
|
|
47
|
+
speed = ox.State("speed", shape=(1,)) # Forward speed
|
|
48
|
+
speed.min = np.array([0])
|
|
49
|
+
speed.max = np.array([10])
|
|
50
|
+
speed.initial = [ox.Free(10)]
|
|
51
|
+
speed.final = [ox.Free(10)]
|
|
52
|
+
|
|
53
|
+
# Define control components
|
|
54
|
+
acceleration = ox.Control("acceleration", shape=(1,)) # Acceleration
|
|
55
|
+
acceleration.min = np.array([-10])
|
|
56
|
+
acceleration.max = np.array([10])
|
|
57
|
+
acceleration.guess = np.zeros((n, 1))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
angular_rate = ox.Control("angular_rate", shape=(1,)) # Angular velocity
|
|
61
|
+
angular_rate.min = np.array([-5])
|
|
62
|
+
angular_rate.max = np.array([5])
|
|
63
|
+
angular_rate.guess = np.zeros((n, 1))
|
|
64
|
+
|
|
65
|
+
# Define list of all states and controls
|
|
66
|
+
states = [position, speed, theta]
|
|
67
|
+
controls = [acceleration, angular_rate]
|
|
68
|
+
|
|
69
|
+
# Define Parameters with initial values for obstacle radius and center
|
|
70
|
+
obs_center = ox.Parameter("obs_center", shape=(2,), value=np.array([-2.0, 0.0]))
|
|
71
|
+
obs_radius = ox.Parameter("obs_radius", shape=(), value=1.0)
|
|
72
|
+
|
|
73
|
+
# Generate box constraints for all states
|
|
74
|
+
constraints = []
|
|
75
|
+
for state in states:
|
|
76
|
+
constraints.extend([ox.ctcs(state <= state.max), ox.ctcs(state.min <= state)])
|
|
77
|
+
|
|
78
|
+
# Define a waypoint as a 2-norm ball and enforce it only over nodes 10–14,
|
|
79
|
+
# together with a stronger speed restriction in that same window.
|
|
80
|
+
waypoint_region = ox.linalg.Norm(position - obs_center) <= obs_radius
|
|
81
|
+
|
|
82
|
+
safety_region = ox.linalg.Norm(position - obs_center) <= 1.6
|
|
83
|
+
|
|
84
|
+
# Use the scalar speed magnitude so the STL residuals are 0-D scalars.
|
|
85
|
+
# Globally the control bound is 10.0; inside the waypoint window we restrict to 1.0.
|
|
86
|
+
slow_speed_in_waypoint = ox.linalg.Norm(speed) <= 1.0
|
|
87
|
+
|
|
88
|
+
speed_constraint = ox.stl.IfThen(safety_region, slow_speed_in_waypoint, c = 1e-18)
|
|
89
|
+
|
|
90
|
+
constraints.append(
|
|
91
|
+
speed_constraint.over(
|
|
92
|
+
(0, n-1),
|
|
93
|
+
)
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
constraints.append(
|
|
97
|
+
ox.ctcs(waypoint_region).over(
|
|
98
|
+
(8, 12),
|
|
99
|
+
)
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# Define normal dynamics (no conditional logic here)
|
|
104
|
+
dynamics = {
|
|
105
|
+
"position": ox.Concat(
|
|
106
|
+
speed * ox.Sin(theta), # x_dot
|
|
107
|
+
speed * ox.Cos(theta), # y_dot
|
|
108
|
+
),
|
|
109
|
+
"speed": acceleration,
|
|
110
|
+
"theta": angular_rate,
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
# Build the problem (parameters auto-collected from Parameter objects)
|
|
115
|
+
time = ox.Time(
|
|
116
|
+
initial=0.0,
|
|
117
|
+
final=ox.Minimize(total_time),
|
|
118
|
+
min=0.0,
|
|
119
|
+
max=5.0,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
problem = Problem(
|
|
123
|
+
dynamics=dynamics,
|
|
124
|
+
states=states,
|
|
125
|
+
controls=controls,
|
|
126
|
+
time=time,
|
|
127
|
+
constraints=constraints,
|
|
128
|
+
N=n,
|
|
129
|
+
algorithm={"autotuner": ox.RampProximalWeight()},
|
|
130
|
+
float_dtype="float64",
|
|
131
|
+
licq_max=1e-8,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
problem.algorithm.ep_vc = 1e-6
|
|
135
|
+
problem.algorithm.ep_tr = 5e-4
|
|
136
|
+
problem.algorithm.lam_vc = 1e3
|
|
137
|
+
|
|
138
|
+
plotting_dict = {
|
|
139
|
+
"obs_radius": problem.parameters["obs_radius"],
|
|
140
|
+
"obs_center": problem.parameters["obs_center"],
|
|
141
|
+
"safety_threshold": 1.6,
|
|
142
|
+
"reduced_speed": 1.0,
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if __name__ == "__main__":
|
|
146
|
+
print("Dubins Car with STL Waypoint and Time-Windowed Speed Constraint")
|
|
147
|
+
print("=" * 70)
|
|
148
|
+
print("Max velocity is 10.0 globally, but at nodes 10–14 the car must")
|
|
149
|
+
print("be inside the 2-norm waypoint ball and its speed is restricted to 1.0.")
|
|
150
|
+
print("=" * 70)
|
|
151
|
+
|
|
152
|
+
problem.initialize()
|
|
153
|
+
results = problem.solve()
|
|
154
|
+
results = problem.post_process()
|
|
155
|
+
results.update(plotting_dict)
|
|
156
|
+
|
|
157
|
+
# Plot trajectory
|
|
158
|
+
plot_dubins_car(results, problem.settings).show()
|
|
159
|
+
plot_states(results).show()
|
|
160
|
+
plot_controls(results).show()
|
|
161
|
+
|
|
162
|
+
# Plot velocity vs distance to waypoint, using safety radius and reduced speed
|
|
163
|
+
plot_velocity_vs_waypoint(results, problem.settings).show()
|