ostk.physics.coordinate.frame.Manager¶
- class Manager¶
Bases:
pybind11_objectReference frame manager (thread-safe).
Manages the lifecycle and caching of reference frames. This is a singleton class.
The following environment variable can be defined:
"OSTK_PHYSICS_FRAME_MANAGER_MAX_TRANSFORM_CACHE_SIZE" will override the default maximum transform cache size (default: 1000)
The same bound can be set at runtime with set_max_transform_cache_size.
Methods
Access a cached transform between two frames at a given instant.
Access a frame by name.
Add a transform to the cache.
Add a frame to the manager.
Clear all frames from the manager.
Get manager singleton.
Get all registered frame names.
Get the maximum number of cached transforms held per frame pair.
Check if a frame with the given name exists.
Remove a frame by name.
Set the maximum number of cached transforms held per frame pair.
- access_cached_transform(
- self: ostk.physics.coordinate.frame.Manager,
- from_frame: ostk.physics.coordinate.Frame,
- to_frame: ostk.physics.coordinate.Frame,
- instant: ostk.physics.time.Instant,
- from_frame: ostk.physics.coordinate.Frame,
Access a cached transform between two frames at a given instant.
- access_frame_with_name(
- self: ostk.physics.coordinate.frame.Manager,
- frame_name: ostk.core.type.String,
Access a frame by name.
- add_cached_transform(
- self: ostk.physics.coordinate.frame.Manager,
- from_frame: ostk.physics.coordinate.Frame,
- to_frame: ostk.physics.coordinate.Frame,
- instant: ostk.physics.time.Instant,
- transform: ostk::physics::coordinate::Transform,
- from_frame: ostk.physics.coordinate.Frame,
Add a transform to the cache.
- clear_all_frames(self: ostk.physics.coordinate.frame.Manager) None¶
Clear all frames from the manager.
This removes all registered frames and clears the transform cache.
- static get() ostk.physics.coordinate.frame.Manager¶
Get manager singleton.
- Returns:
Reference to the manager instance.
- Return type:
- get_all_frame_names( ) list[ostk.core.type.String]¶
Get all registered frame names.
- get_max_transform_cache_size(self: ostk.physics.coordinate.frame.Manager) int¶
Get the maximum number of cached transforms held per frame pair.
- Returns:
Maximum transform cache size.
- Return type:
- has_frame_with_name(
- self: ostk.physics.coordinate.frame.Manager,
- frame_name: ostk.core.type.String,
Check if a frame with the given name exists.
- remove_frame_with_name(
- self: ostk.physics.coordinate.frame.Manager,
- frame_name: ostk.core.type.String,
Remove a frame by name.
- Parameters:
frame_name (str) -- Name of the frame to remove.
- set_max_transform_cache_size(
- self: ostk.physics.coordinate.frame.Manager,
- max_transform_cache_size: int,
Set the maximum number of cached transforms held per frame pair.
- Parameters:
max_transform_cache_size (int) -- Maximum transform cache size. Must be strictly positive.