Highlights
- Model construction moves from closed dispatch tables to open, module-level factories. Each of the camera, lidar and external distortion hierarchies gains a free
<kind>_model_from_parameters()that dispatches on the parameter type, together with aregister_<kind>_modelhook so models defined outside NCore can participate. These replace thefrom_parameters/maybe_from_parametersstatic methods, which held an if/elif table over every concrete subclass, had to be edited to add a model, could not build an out-of-tree model, and were inherited by every subclass. The static methods remain as deprecated forwarders. - The three model base classes are now generic in their parameter type and declare
get_parameters(), so aCameraModel,LidarModelorExternalDistortionModelstays useful without narrowing to a concrete model first. The parameter type is covariant; plain
unparameterized annotations and isinstance checks are unaffected. - The abstract parameter bases carry the JSON (de)serialization interface, so parameters can be serialized through the abstract type.
ExternalDistortionParametersis new: that hierarchy previously had an abstract model base but no abstract parameters base at all. CameraModelParameters.transformreturnsSelfconsistently across the hierarchy. Two concrete overrides previously returned their own class with an unannotatedself, which made them non-substitutable and collapsed the return type to the declaring class for generic callers.
v19.6.0 - 2026-09-09
➕ Added
- (sensors) add free external_distortion_model_from_parameters factory with open registry - (e0ac9ed) - Janick Martinez Esturo
- (sensors) add free lidar_model_from_parameters factory with open registry - (b2afc10) - Janick Martinez Esturo
- (sensors) add free camera_model_from_parameters factory with open registry - (3e0f6b2) - Janick Martinez Esturo
🪲 Fixed
- (data) search and compare closest_index_sorted exactly - (45602dc) - Janick Martinez Esturo
- (sensors) floor the angles-to-columns map index in integer arithmetic - (59c698d) - Janick Martinez Esturo
🔄 Changed
- (data) return Self from every CameraModelParameters.transform override - (f2bfbba) - Janick Martinez Esturo
- (data) declare serialization interface on CameraModelParameters base - (1b0dc1d) - Janick Martinez Esturo
- (data) pin relative_angle to the angles' float dtype - (7cf76e5) - Janick Martinez Esturo