BB.Estimator.Wiring (bb v0.20.0)

Copy Markdown View Source

Builds the supervisor child_spec for an estimator DSL entity.

Used by BB.LinkSupervisor for link-nested estimators and by BB.Sensor.Server for sensor-nested estimators. Centralises:

  • Output-path resolution (auto-derived :out plus explicit output overrides).
  • Input-spec resolution (sensor-nested: synthesised single implicit input pointing at the parent sensor's path; link-nested: passed through from the entity's declared input blocks).
  • sync_tolerance unit conversion to nanoseconds.
  • Construction of the BB.Estimator.Context delivered to the user module's init/1.
  • Construction of the BB.Process.via/2 registration tuple so each estimator is addressable in the robot's registry.

Summary

Types

Path components leading to the parent supervisor (link path).

Path identifying the parent publisher (sensor path) for sensor-nested estimators.

Functions

Builds a child spec for a link-nested estimator. link_path is the sequence of link names leading to the parent link (e.g. [:base_link, :arm]).

Builds a child spec for a sensor-nested estimator. parent_sensor_path is the parent sensor's full publish path including the leading :sensor atom (e.g. [:sensor, :base_link, :imu]).

Types

parent_path()

@type parent_path() :: [atom()]

Path components leading to the parent supervisor (link path).

parent_sensor_path()

@type parent_sensor_path() :: [atom()]

Path identifying the parent publisher (sensor path) for sensor-nested estimators.

Functions

sensor_nested_child_spec(robot_module, est, parent_sensor_path, target_frame, opts)

@spec sensor_nested_child_spec(
  module(),
  BB.Dsl.Estimator.t(),
  parent_sensor_path(),
  atom(),
  Keyword.t()
) :: map()

Builds a child spec for a sensor-nested estimator. parent_sensor_path is the parent sensor's full publish path including the leading :sensor atom (e.g. [:sensor, :base_link, :imu]).