openscvx 0.3.2.dev170__py3-none-any.whl
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/__init__.py +123 -0
- openscvx/_version.py +34 -0
- openscvx/algorithms/__init__.py +92 -0
- openscvx/algorithms/autotuning.py +24 -0
- openscvx/algorithms/base.py +351 -0
- openscvx/algorithms/optimization_results.py +215 -0
- openscvx/algorithms/penalized_trust_region.py +384 -0
- openscvx/config.py +437 -0
- openscvx/discretization/__init__.py +47 -0
- openscvx/discretization/discretization.py +236 -0
- openscvx/expert/__init__.py +23 -0
- openscvx/expert/byof.py +326 -0
- openscvx/expert/lowering.py +419 -0
- openscvx/expert/validation.py +357 -0
- openscvx/integrators/__init__.py +48 -0
- openscvx/integrators/runge_kutta.py +281 -0
- openscvx/lowered/__init__.py +30 -0
- openscvx/lowered/cvxpy_constraints.py +23 -0
- openscvx/lowered/cvxpy_variables.py +124 -0
- openscvx/lowered/dynamics.py +34 -0
- openscvx/lowered/jax_constraints.py +133 -0
- openscvx/lowered/parameters.py +54 -0
- openscvx/lowered/problem.py +70 -0
- openscvx/lowered/unified.py +718 -0
- openscvx/plotting/__init__.py +63 -0
- openscvx/plotting/plotting.py +756 -0
- openscvx/plotting/scp_iteration.py +299 -0
- openscvx/plotting/viser/__init__.py +126 -0
- openscvx/plotting/viser/animated.py +605 -0
- openscvx/plotting/viser/plotly_integration.py +333 -0
- openscvx/plotting/viser/primitives.py +355 -0
- openscvx/plotting/viser/scp.py +459 -0
- openscvx/plotting/viser/server.py +112 -0
- openscvx/problem.py +734 -0
- openscvx/propagation/__init__.py +60 -0
- openscvx/propagation/post_processing.py +104 -0
- openscvx/propagation/propagation.py +248 -0
- openscvx/solvers/__init__.py +51 -0
- openscvx/solvers/cvxpy.py +226 -0
- openscvx/symbolic/__init__.py +9 -0
- openscvx/symbolic/augmentation.py +630 -0
- openscvx/symbolic/builder.py +492 -0
- openscvx/symbolic/constraint_set.py +92 -0
- openscvx/symbolic/expr/__init__.py +222 -0
- openscvx/symbolic/expr/arithmetic.py +517 -0
- openscvx/symbolic/expr/array.py +632 -0
- openscvx/symbolic/expr/constraint.py +796 -0
- openscvx/symbolic/expr/control.py +135 -0
- openscvx/symbolic/expr/expr.py +720 -0
- openscvx/symbolic/expr/lie/__init__.py +87 -0
- openscvx/symbolic/expr/lie/adjoint.py +357 -0
- openscvx/symbolic/expr/lie/se3.py +172 -0
- openscvx/symbolic/expr/lie/so3.py +138 -0
- openscvx/symbolic/expr/linalg.py +279 -0
- openscvx/symbolic/expr/math.py +699 -0
- openscvx/symbolic/expr/spatial.py +209 -0
- openscvx/symbolic/expr/state.py +607 -0
- openscvx/symbolic/expr/stl.py +136 -0
- openscvx/symbolic/expr/variable.py +321 -0
- openscvx/symbolic/hashing.py +112 -0
- openscvx/symbolic/lower.py +760 -0
- openscvx/symbolic/lowerers/__init__.py +106 -0
- openscvx/symbolic/lowerers/cvxpy.py +1302 -0
- openscvx/symbolic/lowerers/jax.py +1382 -0
- openscvx/symbolic/preprocessing.py +757 -0
- openscvx/symbolic/problem.py +110 -0
- openscvx/symbolic/time.py +116 -0
- openscvx/symbolic/unified.py +420 -0
- openscvx/utils/__init__.py +20 -0
- openscvx/utils/cache.py +131 -0
- openscvx/utils/caching.py +210 -0
- openscvx/utils/printing.py +301 -0
- openscvx/utils/profiling.py +37 -0
- openscvx/utils/utils.py +100 -0
- openscvx-0.3.2.dev170.dist-info/METADATA +350 -0
- openscvx-0.3.2.dev170.dist-info/RECORD +79 -0
- openscvx-0.3.2.dev170.dist-info/WHEEL +5 -0
- openscvx-0.3.2.dev170.dist-info/licenses/LICENSE +201 -0
- openscvx-0.3.2.dev170.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Trajectory visualization and plotting utilities.
|
|
2
|
+
|
|
3
|
+
This module provides reusable building blocks for visualizing trajectory
|
|
4
|
+
optimization results. It is intentionally minimal - we provide common utilities
|
|
5
|
+
that can be composed together, not a complete solution that tries to do
|
|
6
|
+
everything for you.
|
|
7
|
+
|
|
8
|
+
**2D Plots** (plotly-based):
|
|
9
|
+
Two-layer API for time series visualization::
|
|
10
|
+
|
|
11
|
+
from openscvx.plotting import plot_states, plot_controls, plot_vector_norm
|
|
12
|
+
|
|
13
|
+
# High-level: subplot grid with individual scaling per component
|
|
14
|
+
plot_states(results, ["position", "velocity"]).show()
|
|
15
|
+
plot_controls(results, ["thrust"]).show()
|
|
16
|
+
|
|
17
|
+
# Low-level: single component
|
|
18
|
+
plot_state_component(results, "position", component=2).show() # z only
|
|
19
|
+
|
|
20
|
+
# Specialized plots
|
|
21
|
+
plot_vector_norm(results, "thrust", bounds=(rho_min, rho_max)).show()
|
|
22
|
+
plot_projections_2d(results, velocity_var_name="velocity").show()
|
|
23
|
+
|
|
24
|
+
**3D Visualization** (viser-based):
|
|
25
|
+
The ``viser`` submodule provides composable primitives for building
|
|
26
|
+
interactive 3D visualizations. See ``openscvx.plotting.viser`` for details::
|
|
27
|
+
|
|
28
|
+
from openscvx.plotting import viser
|
|
29
|
+
server = viser.create_server(positions)
|
|
30
|
+
viser.add_gates(server, gate_vertices)
|
|
31
|
+
server.sleep_forever()
|
|
32
|
+
|
|
33
|
+
For problem-specific visualization examples (drones, rockets, etc.), see
|
|
34
|
+
``examples/plotting_viser.py``.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
from . import viser
|
|
38
|
+
from .plotting import (
|
|
39
|
+
plot_control_component,
|
|
40
|
+
plot_controls,
|
|
41
|
+
plot_projections_2d,
|
|
42
|
+
plot_state_component,
|
|
43
|
+
plot_states,
|
|
44
|
+
plot_trust_region_heatmap,
|
|
45
|
+
plot_vector_norm,
|
|
46
|
+
plot_virtual_control_heatmap,
|
|
47
|
+
)
|
|
48
|
+
from .scp_iteration import plot_scp_iterations
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
# 2D plotting functions (plotly)
|
|
52
|
+
"plot_state_component",
|
|
53
|
+
"plot_states",
|
|
54
|
+
"plot_control_component",
|
|
55
|
+
"plot_controls",
|
|
56
|
+
"plot_projections_2d",
|
|
57
|
+
"plot_vector_norm",
|
|
58
|
+
"plot_trust_region_heatmap",
|
|
59
|
+
"plot_virtual_control_heatmap",
|
|
60
|
+
"plot_scp_iterations",
|
|
61
|
+
# 3D visualization submodule (viser)
|
|
62
|
+
"viser",
|
|
63
|
+
]
|