Cobra Config

These are all the objects that can be directly imported from pntos.cobra.config.

class pntos.cobra.config.BaseConfig(group)

Bases: ABC

A basic config that all other configs should inherit from.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

class pntos.cobra.config.ClockBiasStateBlockConfig(*, group, label, estimate_with_covariance=None, h_0, h_neg2, q3=None)

Bases: StateBlockConfig

Configuration for the ClockBiasStateBlock, provided by StandardStateModelingPlugin.

Variables:
  • group (str) – Inherited from StateBlockConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from StateBlockConfig. The identifier associated with the type of state block to use. This field is set to a constant value of clock_bias, the identifier used to select the ClockBiasStateBlock in the StandardStateModelingPlugin.

  • label (str) – Inherited from StateBlockConfig. The unique label to associate with the instance of ClockBiasStateBlock added to the fusion engine.

  • estimate_with_covariance (EstimateWithCovariance | None) – Inherited from StateBlockConfig. The initial estimate and covariance of the clock bias states.

  • aux_channels (tuple[str, ...] | None) – Optional channels to map to this state block’s receive_aux_data method. This field is set to a constant value of None, since the ClockBiasStateBlock does not require aux data.

  • h_0 (float) – White noise coefficient of allan deviation.

  • h_neg2 (float) – Random walk coefficient of allan deviation.

  • q3 (float | None) – Optional q3 value for the third state. If None, will use a 2-state model.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'clock_bias'

An identifier that determines the type of state block to use.

This field will be matched against the block_identifiers field on the state model provider.

label

The name used to identify and track this state block through its lifecycle.

This value should be unique from all other pntos.cobra.config.StateBlockConfig.label and pntos.cobra.config.VirtualStateBlockConfig.target values.

aux_channels = None

Optional channels to map to this state block’s receive_aux_data method.

class pntos.cobra.config.ConstantStateBlockConfig(*, group, label, estimate_with_covariance=None, Q=None)

Bases: StateBlockConfig

Configuration for the ConstantStateBlock, provided by StandardStateModelingPlugin.

Variables:
  • group (str) – Inherited from StateBlockConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from StateBlockConfig. The identifier associated with the type of state block to use. This field is set to a constant value of constant, the identifier used to select the ConstantStateBlock in the StandardStateModelingPlugin.

  • label (str) – Inherited from StateBlockConfig. The unique label to associate with the instance of ClockBiasStateBlock added to the fusion engine.

  • estimate_with_covariance (EstimateWithCovariance | None) – Inherited from StateBlockConfig. The initial estimate and covariance of the clock bias states.

  • aux_channels (tuple[str, ...] | None) – Optional channels to map to this state block’s receive_aux_data method. This field is set to a constant value of None, since the ConstantStateBlock does not require aux data.

  • Q (NDArray[float64] | None) – Optional continuous time propagation noise covariance matrix. If None, no noise will be added during propagation.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'constant'

An identifier that determines the type of state block to use.

This field will be matched against the block_identifiers field on the state model provider.

label

The name used to identify and track this state block through its lifecycle.

This value should be unique from all other pntos.cobra.config.StateBlockConfig.label and pntos.cobra.config.VirtualStateBlockConfig.target values.

aux_channels = None

Optional channels to map to this state block’s receive_aux_data method.

class pntos.cobra.config.BuscatConfig(output_transports)

Bases: BaseConfig

Config for BuscatControllerPlugin.

Variables:
  • group (str) – Inherited from BaseConfig. Registry group in which to store this config.

  • output_transport (tuple[str, ...]) – Identifiers of transport plugins through which to route output messages.

group = 'config/buscat'

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

output_transports

Identifiers of transport plugins through which to route output messages.

class pntos.cobra.config.ControllerConfig(buffer_length_sec=2.0, publish_interval=1.0)

Bases: BaseConfig

Config for StandardControllerPlugin.

Variables:
  • group (str) – Inherited from BaseConfig. Registry group in which to store this config.

  • buffer_length_sec (float) – Length of measurement buffer (in seconds). Any measurements that are sequenced-streamed and not immediate-streamed will be buffered for this amount of time before being passed to the orchestration plugin.

  • publish_interval (float) – Minimum time (in seconds) between requesting solutions from orchestration. If None, will not request any solution.

group = 'config/controller'

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

class pntos.cobra.config.FogmConfig(group, sigma, tau)

Bases: BaseConfig

First-Order Gauss-Markov (FOGM) error model.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

sigma

The steady-state sigma(s) in application-specific units.

tau

The time constant(s) in seconds.

class pntos.cobra.config.FusionEngineConfig(*, save_x_and_p_after_prop=False, save_x_and_p_after_update=False)

Bases: BaseConfig

Configuration for StandardFusionEngine.

Variables:
  • save_x_and_p_after_prop (bool) – Whether to save state estimate and sigma to registry right after each propagate.

  • save_x_and_p_after_update (bool) – Whether to save state estimate and sigma to registry right after each update.

group = 'config/fusion_engine'

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

save_x_and_p_after_prop = False

Whether to save state estimate and sigma to registry right after each propagate.

The following key-value pairs will be recorded to the diagnostics registry group:
  • state_labels: An array of labels associated with each state in the form “{state_block_label}_state{state_index}”.

  • time: Current time in nanoseconds

  • estimate: Current estimate vector

  • sigma: Current 1-sigma estimate uncertainty

Enabling this feature could allow another plugin (such as a UI plugin or utility plugin) to grab this information and display or record it in some manner.

save_x_and_p_after_update = False

Whether to save state estimate and sigma to registry right after each update.

The following key-value pairs will be recorded to the diagnostics registry group:
  • state_labels: An array of labels associated with each state in the form “{state_block_label}_state{state_index}”.

  • time: Current time in nanoseconds

  • estimate: Current estimate vector

  • sigma: Current 1-sigma estimate uncertainty

Enabling this feature could allow another plugin (such as a UI plugin or utility plugin) to grab this information and display or record it in some manner.

class pntos.cobra.config.ImuConfig(group, accel_bias_sigma, accel_bias_tau, accel_random_walk_sigma, gyro_bias_sigma, gyro_bias_tau, gyro_random_walk_sigma, accel_bias_initial_sigma=(0.0, 0.0, 0.0), gyro_bias_initial_sigma=(0.0, 0.0, 0.0))

Bases: BaseConfig

The error model of an inertial unit, including white noise (random walk) and a bias modeled as a First-Order Gauss-Markov (FOGM) process for each sensor.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

accel_bias_sigma

The steady-state sigma of the bias state in m/s^2.

accel_bias_tau

The time constant for the accelerometer’s FOGM process in seconds.

accel_random_walk_sigma

The sigma for the accelerometer random walk process in m/s^(3/2)

gyro_bias_sigma

The steady-state sigma of the bias state in rad/s

gyro_bias_tau

The time constant for the gyro’s FOGM process in seconds

gyro_random_walk_sigma

The sigma for the gyro random walk process in rad/s^(1/2)

accel_bias_initial_sigma = (0.0, 0.0, 0.0)

The one-sigma used to initialize a state covariance associated with accelerometer biases in m/s^2

This field is necessary when used with an initialization plugin. This field is unused when used with a state modeling plugin.

gyro_bias_initial_sigma = (0.0, 0.0, 0.0)

The one-sigma used to initialize a state covariance associated with gyroscope biases in rad/s

This field is necessary when used with an initialization plugin. This field is unused when used with a state modeling plugin.

class pntos.cobra.config.InertialConfig(group, expected_dt, inertial_buffer_length, channels, C_imu_to_platform)

Bases: BaseConfig

Configuration for the inertial mechanization and buffering.

expected_dt

The expected delta-time between inertial messages, in seconds.

inertial_buffer_length

The length of the inertial buffer in seconds.

channels

Channel(s) containing inertial measurements to process.

C_imu_to_platform

DCM used to rotate measurements from IMU sensor frame to platform frame.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

class pntos.cobra.config.LcmLogTransportConfig(input_file, output_file, channels_to_process=None, record_input_channels=True)

Bases: BaseConfig

Configuration for LcmLogTransportPlugin, which processes messages from an LCM log.

group = 'config/lcm_log_transport'

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

input_file

The path of the LCM log to be processed.

output_file

The path of the LCM log to which the transport should record messages.

NOTE: If output_file already exists, it will be overwritten. Thus, it must be different from input_file.

channels_to_process = None

List of channels to process. If None, will process all channels.

record_input_channels = True

Flag to control whether input channels are written to the output log.

NOTE: The default is set to True. When enabled, the output log will contain any sensor or truth channels from the input log that may be required for postprocessing.

class pntos.cobra.config.LcmTransportConfig(url='tcpq://', subscribe_to='^((?!pntos).)*$')

Bases: BaseConfig

Configuration for LcmTransportPlugin.

Variables:
  • group (str) – Inherited from BaseConfig. The registry group in which to store this config.

  • url (str) – LCM URL to which the transport should connect. Will subscribe and publish to this address.

  • subscribe_to (str) – A regex string indicating which channels to which the transport should subscribe.

group = 'config/lcm_transport'

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

class pntos.cobra.config.ManualAlignmentConfig(group, initial_pos, initial_vel, initial_rpy, initial_accel_bias, initial_gyro_bias, initial_accel_scale_factor, initial_gyro_scale_factor, initial_time, initial_pos_var, initial_vel_var, initial_tilt_var, initial_accel_bias_var, initial_gyro_bias_var, initial_accel_scale_factor_var, initial_gyro_scale_factor_var)

Bases: BaseConfig

Configuration to manually align an inertial unit to the platform frame.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

initial_pos

Initial latitude, longitude, and altitude of the sensor. (rad, rad, m HAE)

initial_vel

Initial velocity in the navigation frame (NED) in m/s.

initial_rpy

Initial attitude expressed as Euler angles (roll, pitch, yaw, in radians). The corresponding quaternion is in the same frame as an ASPN PVA’s quaternion. The corresponding DCM would be C_platform_to_navigation.

initial_accel_bias

Initial bias of the accelerometers, in the sensor frame (m/s^2).

initial_gyro_bias

Initial bias of the gyroscopes, in the sensor frame (rad/s).

initial_accel_scale_factor

Initial scale factor error of the accelerometers, in the sensor frame in Parts-Per-Million (PPM).

initial_gyro_scale_factor

Initial scale factor error of the gyroscopes, in the sensor frame in Parts-Per-Million (PPM).

initial_time

The time at which this alignment is valid for, in nanoseconds.

initial_pos_var

The variance of the error in the initial position in the NED frame (m^2, m^2, m^2).

initial_vel_var

The variance of the error in the initial velocity (m^2/s^2).

initial_tilt_var

The variance of the tilt errors associated with the initial attitude (rad^2).

initial_accel_bias_var

The variance of the intial accelerometer bias (m^2/s^4).

initial_gyro_bias_var

The variance of the initial gyroscope biases (rad^2/s^2).

initial_accel_scale_factor_var

The variance of the initial accelerometer scale factors (PPM^2).

initial_gyro_scale_factor_var

The variance of the initial gyroscope scale factors (PPM^2).

class pntos.cobra.config.ManualHeadingAlignmentConfig(group, static_time, imu_model, heading, heading_sigma)

Bases: BaseConfig

Configuration specifically for a manual heading alignment which is used in the ‘ManualHeadingAlignInitializationPlugin.py’ plugin.

static_time

The amount of IMU data that must be collected before calculating an alignment. (s)

imu_model

A nested config that contains IMU model info.

For more information, see ImuConfig.py.

heading

Heading of the platform. (rad, right handed rotation from north, about the down axis)

heading_sigma

The one-sigma, standard deviation of the tilt error about the down axis associated with the initial heading.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

class pntos.cobra.config.MountingConfig(group, lever_arm, orientation)

Bases: BaseConfig

Rotation and lever arm from frame A to frame B.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

lever_arm

The lever arm from frame A to B, measured in frame A (m).

orientation

A quaternion representing the rotation from frame A to B. The corresponding DCM would be C_A_to_B.

class pntos.cobra.config.AltitudeMPConfig(*, group, label, state_block_labels, channel)

Bases: MeasurementProcessorConfig

Configuration for a AltitudeMeasurementProcessor.

This MP relates altitude measurements to a PinsonStateBlock modeling inertial error-states and a 1-state FogmStateBlock modeling time-correlated altitude measurement errors.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of pinson_altitude, the identifier used to select the AltitudeMeasurementProcessor in the StandardStateModelingPlugin.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of AltitudeMeasurementProcessor added to the fusion engine.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the altitude measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. The first should refer to a PinsonStateBlock and the second should refer to a 1-state FogmStateBlock estimating altitude measurement errors.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of (‘INERTIAL_PVA’,), since this MP requires inertial PVA aux data.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson_altitude'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = ('INERTIAL_PVA',)

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.Direction3dToPointsMPConfig(*, group, label, state_block_labels, channel, lever_arm, orientation)

Bases: MeasurementProcessorConfig

Configuration for a Direction3DToPointsMeasurementProcessor.

This MP relates direction3d-to-points measurements to a PinsonStateBlock modeling inertial error-states.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of direction3D_to_points, the identifier used to select the Direction3DToPointsMeasurementProcessor in the StandardStateModelingPlugin.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of Direction3DToPointsMeasurementProcessor added to the fusion engine.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the direction3d-to-points measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. This should be a single PinsonStateBlock.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of (‘INERTIAL_PVA’,), since this MP requires inertial PVA aux data.

  • lever_arm (tuple[float, float, float]) – The 3-D vector from the platform frame to the sensor frame, in the platform frame (m).

  • orientation (tuple[float, float, float, float]) – A quaternion representing the rotational difference from the platform frame to the sensor frame. The corresponding DCM would be C_platform_to_sensor.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'direction3D_to_points'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = ('INERTIAL_PVA',)

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.FeedbackConfig(group, time_threshold=0.0, pos_error_threshold=0.0)

Bases: BaseConfig

Configuration specifying when to perform inertial resets.

Variables:
  • group (str) – Inherited from BaseConfig. Registry group in which to store this config.

  • time_trigger (float) – Minimum time b/w inertial resets, in seconds. If set to 0, will perform a reset after every measurement update, provided pos_error_threshold has also been surpassed.

  • pos_error_threshold (float) – Minimum estimate, in meters, of any of the inertial position error states required to trigger a reset. If set to 0, will perform a reset after every measurement update, provided time_threshold has also been surpassed.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

class pntos.cobra.config.FogmStateBlockConfig(*, group, label, estimate_with_covariance=None, fogm_model)

Bases: StateBlockConfig

Configuration used to generate a new FOGM state block.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'fogm'

An identifier that determines the type of state block to use.

This field will be matched against the block_identifiers field on the state model provider.

label

The name used to identify and track this state block through its lifecycle.

This value should be unique from all other pntos.cobra.config.StateBlockConfig.label and pntos.cobra.config.VirtualStateBlockConfig.target values.

aux_channels = None

Optional channels to map to this state block’s receive_aux_data method.

fogm_model

A nested config that contains information about the FOGM model.

See FogmConfig.py for more information.

class pntos.cobra.config.MeasurementProcessorConfig(group, identifier, label, state_block_labels, channel, aux_channels=None)

Bases: BaseConfig

Configuration used to generate a new measurement processor.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

state_block_labels

The labels of the state blocks this measurement processor will use.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

aux_channels = None

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.PinsonBodyVelocityMPConfig(*, group, label, state_block_labels, channel, lever_arm, orientation)

Bases: MeasurementProcessorConfig

Configuration for a PinsonBodyVelocityMeasurementProcessor.

This MP relates sensor-frame velocity measurements to a PinsonStateBlock modeling inertial error-states.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of PinsonPositionMeasurementProcessor added to the fusion engine.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of pinson_body_velocity, the identifier used to select the PinsonBodyVelocityMeasurementProcessor in the StandardStateModelingPlugin.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the velocity measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. This should be a single PinsonStateBlock.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of (‘INERTIAL_PVA’, ‘INERTIAL_FORCES_AND_RATES’), since this MP requires inertial PVA and rate aux data.

  • lever_arm (tuple[float, float, float]) – The 3-D vector from the platform frame to the sensor frame, in the platform frame (m).

  • orientation (tuple[float, float, float, float]) – A quaternion representing the rotational difference from the platform frame to the sensor frame. The corresponding DCM would be C_platform_to_sensor.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson_body_velocity'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = ('INERTIAL_PVA', 'INERTIAL_FORCES_AND_RATES')

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.PinsonPositionMPConfig(*, group, label, state_block_labels, channel, lever_arm)

Bases: MeasurementProcessorConfig

Configuration for a PinsonPositionMeasurementProcessor.

This MP relates 3-D position measurements to a PinsonStateBlock modeling inertial error-states.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of pinson_position, the identifier used to select the PinsonPositionMeasurementProcessor in the StandardStateModelingPlugin.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of PinsonPositionMeasurementProcessor added to the fusion engine.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the position measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. This should be a single PinsonStateBlock.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of (‘INERTIAL_PVA’,), since this MP requires inertial PVA aux data.

  • lever_arm (tuple[float, float, float]) – The 3-D vector from the platform frame to the sensor frame, in the platform frame (m).

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson_position'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = ('INERTIAL_PVA',)

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.PinsonStateBlockConfig(*, group, label, estimate_with_covariance=None, imu_model)

Bases: StateBlockConfig

Configuration used to generate a new pinson state block.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson15'

An identifier that determines the type of state block to use.

This field will be matched against the block_identifiers field on the state model provider.

label

The name used to identify and track this state block through its lifecycle.

This value should be unique from all other pntos.cobra.config.StateBlockConfig.label and pntos.cobra.config.VirtualStateBlockConfig.target values.

estimate_with_covariance = None

An optional field that allows an initial estimate and covariance to be associated with the state block.

aux_channels = None

Optional channels to map to this state block’s receive_aux_data method.

imu_model

A nested config that contains information about the IMU model.

See ImuConfig.py for more information.

class pntos.cobra.config.PinsonVelocityMPConfig(*, group, label, state_block_labels, channel)

Bases: MeasurementProcessorConfig

Configuration for a PinsonVelocityMeasurementProcessor.

This MP relates NED velocity measurements to a PinsonStateBlock modeling inertial error-states.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of pinson_velocity, the identifier used to select the PinsonVelocityMeasurementProcessor in the StandardStateModelingPlugin.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of PinsonPositionMeasurementProcessor added to the fusion engine.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the velocity measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. This should be a single PinsonStateBlock.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of (‘INERTIAL_PVA’,), since this MP requires inertial PVA aux data.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson_velocity'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = ('INERTIAL_PVA',)

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.PinsonWithLeverArmPositionMPConfig(*, group, label, state_block_labels, channel, lever_arm)

Bases: MeasurementProcessorConfig

Configuration for a PinsonWithLeverArmPositionMeasurementProcessor.

This MP relates 3-D position measurements to a PinsonStateBlock modeling inertial error-states, a 3-state FogmStateBlock modeling time-correlated NED position measurement errors, and an additional 3-state FogmStateBlock modeling error in the nominal lever arm.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of pinson_with_lever_arm_position, the identifier used to select the PinsonWithLeverArmPositionMeasurementProcessor in the StandardStateModelingPlugin.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of PinsonPositionMeasurementProcessor added to the fusion engine.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the position measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. The first should refer to a PinsonStateBlock, the second to a 3-state FogmStateBlock estimating NED position measurement errors, and the third to an additional 3-state FogmStateBlock estimating error in the nominal lever arm.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of (‘INERTIAL_PVA’,), since this MP requires inertial PVA aux data.

  • lever_arm (tuple[float, float, float]) – The 3-D vector from the platform frame to the sensor frame, in the platform frame (m).

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson_with_lever_arm_position'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = ('INERTIAL_PVA',)

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.PinsonWithNedFogmPositionMPConfig(*, group, label, state_block_labels, channel, lever_arm)

Bases: MeasurementProcessorConfig

Configuration for a PinsonWithNedFogmPositionMeasurementProcessor.

This MP relates 3-D position measurements to a PinsonStateBlock modeling inertial error-states and a 3-state FogmStateBlock modeling time-correlated NED position measurement errors.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of pinson_with_ned_fogm_position, the identifier used to select the PinsonWithNedFogmPositionMeasurementProcessor in the StandardStateModelingPlugin.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of PinsonWithNedFogmPositionMeasurementProcessor added to the fusion engine.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the position measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. The first should refer to a PinsonStateBlock and the second should refer to a 3-state FogmStateBlock estimating NED position measurement errors.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of (‘INERTIAL_PVA’,), since this MP requires inertial PVA aux data.

  • lever_arm (tuple[float, float, float]) – The 3-D vector from the platform frame to the sensor frame, in the platform frame (m).

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson_with_ned_fogm_position'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = ('INERTIAL_PVA',)

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.PositionMPConfig(*, group, label, state_block_labels, channel, lever_arm)

Bases: MeasurementProcessorConfig

Configuration for a PositionMeasurementProcessor.

This MP relates 3-D position measurements to a state block that estimates position and a 3-state FogmStateBlock modeling time-correlated NED position measurement errors.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of position, the identifier used to select the PositionMeasurementProcessor in the StandardStateModelingPlugin.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of PositionMeasurementProcessor added to the fusion engine.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the position measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. The first should refer to a state block where the first 3 states model LLH position and the second should refer to a 3-state FogmStateBlock estimating NED position measurement errors.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of None, since this MP requires no aux data.

  • lever_arm (tuple[float, float, float]) – The 3-D vector from the platform frame to the sensor frame, in the platform frame (m).

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'position'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = None

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.PosVelMPConfig(*, group, label, state_block_labels, channel, lever_arm)

Bases: MeasurementProcessorConfig

Configuration for a PosVelMeasurementProcessor.

This MP relates PVA measurements containing 3-D LLH position and 3-D NED velocity to a PinsonStateBlock modeling inertial error-states.

Variables:
  • group (str) – Inherited from MeasurementProcessorConfig. The registry group in which to store this config.

  • identifier (str) – Inherited from MeasurementProcessorConfig. The identifier associated with the type of measurement processor to use. This field is set to a constant value of pinson_posvel, the identifier used to select the PosVelMeasurementProcessor in the StandardStateModelingPlugin.

  • label (str) – Inherited from MeasurementProcessorConfig. The unique label to associate with the instance of PinsonPositionMeasurementProcessor added to the fusion engine.

  • channel (str) – Inherited from MeasurementProcessorConfig. The name of the channel from which the PVA measurements originate. This corresponds to the source_identifier field on the pntos.api.Message class.

  • state_block_labels (tuple[str, ...]) – Inherited from MeasurementProcessorConfig. The labels of the state blocks this measurement processor will use. This should be a single PinsonStateBlock.

  • aux_channels (tuple[str, ...] | None) – Inherited from MeasurementProcessorConfig. Optional channels to map to this measurement processor’s receive_aux_data method. This field is set to a constant value of (‘INERTIAL_PVA’,), since this MP requires inertial PVA aux data.

  • lever_arm (tuple[float, float, float]) – The 3-D vector from the platform frame to the sensor frame, in the platform frame (m).

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson_posvel'

An identifier that determines the type of measurement processor to use.

This field will be matched against the processor_identifiers field on the state model provider.

label

The name used to identify and track this processor through its lifecycle.

channel

The name of the channel from which the measurements originate.

This corresponds to the source_identifier field on the pntos.api.Message class.

state_block_labels

The labels of the state blocks this measurement processor will use.

aux_channels = ('INERTIAL_PVA',)

Optional channels to map to this measurement processor’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this measurement processor needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this measurement processor needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.StandardOrchestrationConfig(*, best_sol_channel, imu_sol_channel, alignment_channels, pinson_sb_config, additional_sb_configs=None, vsb_configs=None, mp_configs=None, inertial_config, feedback_config=None, alignment_config, preprocessor_configs=None, max_prop_interval=2.0, publish_before_update=False, publish_after_update=False)

Bases: BaseConfig

Configuration for the orchestration plugin.

Includes additional config groups for data that assists with instantiating core orchestration components such as the measurement processor and state block.

group = 'config/orchestration'

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

best_sol_channel

The channel on which to output the best solution of the filter.

imu_sol_channel

The channel on which to output the imu solution of the filter.

alignment_channels

A series of channels whose messages are to be used during initialization.

pinson_sb_config

The pinson state block config that will be used to create the primary state block representing the error model of the inertial navigation system.

additional_sb_configs = None

A series of state block configs to use in addition to the core pinson state block.

vsb_configs = None

A series of virtual state block configs to use in the fusion engine.

mp_configs = None

A series of measurement processor configs to use in the fusion engine.

inertial_config

An inertial config that contains inertial buffering and mechanization information.

feedback_config = None

Optional config specifying when to perform inertial resets. If None, will apply feedback after every measurement update.

alignment_config

A config that contains information used to set up the initialization strategy.

preprocessor_configs = None

A series of preprocessor configs to use. (optional)

max_prop_interval = 2.0

Maximum interval in seconds over which to propagate states. Intervals longer than this will be broken up into segments.

publish_before_update = False

Whether to publish filter and inertial solution right before each update.

If True, will publish to registry and through transport.

NOTE: It is recommended when enabling this feature that you disable publish_interval in ControllerConfig, otherwise filter solutions may be published out of order.

publish_after_update = False

Whether to publish filter and inertial solution right after each update.

If True, will publish to registry and through transport. If inertial feedback is enabled, it will be applied after the filter update, but before publishing the solution.

NOTE: It is recommended when enabling this feature that you disable publish_interval in ControllerConfig, otherwise filter solutions may be published out of order.

class pntos.cobra.config.StateBlockConfig(*, group, identifier, label, estimate_with_covariance=None, aux_channels=None)

Bases: BaseConfig

Configuration used to generate a new state block.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier

An identifier that determines the type of state block to use.

This field will be matched against the block_identifiers field on the state model provider.

label

The name used to identify and track this state block through its lifecycle.

This value should be unique from all other pntos.cobra.config.StateBlockConfig.label and pntos.cobra.config.VirtualStateBlockConfig.target values.

estimate_with_covariance = None

An optional field that allows an initial estimate and covariance to be associated with the state block.

aux_channels = None

Optional channels to map to this state block’s receive_aux_data method.

class pntos.cobra.config.TutorialOrchestrationConfig(position_channel, velocity_channel='unused')

Bases: BaseConfig

Configuration that dictates what channels will be used by the orchestration plugin.

position_channel

The name of the position channel whose messages will be used for alignment and the fusion engine.

velocity_channel = 'unused'

The name of the velocity channel whose messages will be used for measurement updates in the fusion engine.

group = 'config/orchestration'

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

class pntos.cobra.config.BarometerToAltitudeConfig(group, channel, alt_sigma=None)

Bases: PreprocessorConfig

Configuration for the barometer to altitude preprocessor.

Variables:
  • group (str) – Inherited from PreprocessorConfig. Registry group in which to store this config.

  • identifier (str) – Inherited from PreprocessorConfig. Identifier associated with the desired type of preprocessor.

  • channel (str) – Name of the barometric pressure channel to convert to altitude. Assumed to end in baro_pressure. Altitude measurements will be output on this channel, with baro_pressure replaced with altitude.

  • alt_sigma (float | None) – Optional value used to override altitude measurement variance. If not specified baro pressure variance will be converted to altitude variance using the scale factor necessary to convert the pressure measurement to altitude.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'baro_converter'

A string that specifies which preprocessor this config should be used in.

This field will be matched against the preprocessor_identifiers field on the preprocessor plugin.

class pntos.cobra.config.DownsamplerConfig(group, channels_to_downsample, downsampling_factors)

Bases: PreprocessorConfig

Configuration for the downsampler preprocessor.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'downsampler'

A string that specifies which preprocessor this config should be used in.

This field will be matched against the preprocessor_identifiers field on the preprocessor plugin.

channels_to_downsample

A series of channels to downsample

downsampling_factors

A series of downsampling factors to apply to the channels

class pntos.cobra.config.ImuRotatorConfig(group, channel, C_imu_to_platform)

Bases: PreprocessorConfig

Configuration for the IMU rotator preprocessor

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'imu_rotator'

A string that specifies which preprocessor this config should be used in.

This field will be matched against the preprocessor_identifiers field on the preprocessor plugin.

channel

The name of the channel to rotate.

C_imu_to_platform

DCM used to rotate measurements from IMU sensor frame to platform frame.

class pntos.cobra.config.OutageConfig(group, channel, start_time, end_time)

Bases: PreprocessorConfig

Configuration for OutagePreprocessor.

Specifies a time period in which to discard messages on a given channel to simulate a measurement outage. All measurements in the range [start_time, end_time) will be discarded.

Variables:
  • group (str) – Inherited from PreprocessorConfig. Registry group in which to store this config.

  • identifier (str) – Inherited from PreprocessorConfig. A string that specifies which preprocessor this config should be used in.

  • channel (str) – Channel on which to induce an outage.

  • start_time (float) – Time in seconds at which to begin the outage. This time is relative to the timestamp of the first message received on the given channel.

  • end_time (float) – Time in seconds at which to end the outage. This time is relative to the timestamp of the first message received on the given channel.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'outage'

A string that specifies which preprocessor this config should be used in.

This field will be matched against the preprocessor_identifiers field on the preprocessor plugin.

class pntos.cobra.config.PreprocessorConfig(group, identifier)

Bases: BaseConfig

The base preprocessor config all preprocessor configs should inherit from.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier

A string that specifies which preprocessor this config should be used in.

This field will be matched against the preprocessor_identifiers field on the preprocessor plugin.

class pntos.cobra.config.TimeAdjusterConfig(group, channel_to_correct, expected_dt_nsec)

Bases: PreprocessorConfig

Configuration for the time adjuster preprocessor.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'time_adjuster'

A string that specifies which preprocessor this config should be used in.

This field will be matched against the preprocessor_identifiers field on the preprocessor plugin.

channel_to_correct

The name of the channel to correct.

expected_dt_nsec

The expected time between messages in nanoseconds.

For example, a 100 Hz sensor sends 100 messages per second which is 0.01 seconds per message (interval in seconds). Convert that to nanoseconds like so int(0.01 * 1e9).

class pntos.cobra.config.TimeBiasConfig(group, channels_to_correct, time_bias)

Bases: PreprocessorConfig

Configuration for the time bias preprocessor.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'time_bias'

A string that specifies which preprocessor this config should be used in.

This field will be matched against the preprocessor_identifiers field on the preprocessor plugin.

channels_to_correct

The names of the channels to correct.

time_bias

The amount the timestamps are biased by in nanoseconds.

For example, if a given channel has timestamps which are 0.1s in the future then this should be set to 100’000’000 and the preprocessor will return messages with a timestamp of original - 100’000’000.

class pntos.cobra.config.StaticAlignmentConfig(group, static_time, imu_model)

Bases: BaseConfig

Configuration specifically for a manual heading alignment which is used in the ‘StaticAlignInitializationPlugin.py’ plugin.

static_time

The amount of IMU data that must be collected before calculating an alignment. (s)

imu_model

A nested config that contains IMU model info.

For more information, see ImuConfig.py.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

class pntos.cobra.config.ExperimentalCobraUiConfig(group, cors_allowed_origins=('http://localhost:5001', 'http://127.0.0.1:5001'), host='localhost', port=5001, send_throttle=30, static_folder=None)

Bases: BaseConfig

Configuration for CobraUiPlugin.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

cors_allowed_origins = ('http://localhost:5001', 'http://127.0.0.1:5001')

CORS allowed origins for WebSocket connections. Examples: [’http://localhost:3000’, ‘https://example.com’]

host = 'localhost'

Host address to bind the web server to.

port = 5001

Port to run the web server on.

send_throttle = 30

Maximum number of registry updates to send to the front-end every second.

static_folder = None

Path to static folder to serve. Any uploaded files will be saved in {static_folder}/uploads/. Additionally, any files in this directory will be available to the web interface - do not put sensitive data here. This field is optional because the UI plugin has a default path it checks for the assets. Providing this path will overload the default path.

class pntos.cobra.config.UiLogPlottingConfig(logfile, solution_channel, truth_channel)

Bases: BaseConfig

Defines the LCM or ROS log file for plotting and the solution and truth PVA channels.

group = 'config/ui_logfile_plotting'

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

logfile

The name of the LCM or ROS log file to be plotted.

solution_channel

The PVA solution channel.

truth_channel

The PVA truth channel.

pntos.cobra.config.config_from_registry(config_type, mediator, config_group)

A utility function that extracts the requested config from the registry.

This function is used to extract requested configs loaded into the registry by config_to_registry. Since that function converts objects into registry compliant types, this function attempts to convert them back to their original type specified within the config_type parameter. If it is unable to do so, it will log the error and continue. If the function is unable to grab a field from the registry, (e.g. the accel_bias_sigma in an ImuConfig) the error is considered fatal and the function will return None.

Parameters:
  • config_type (ConfigType) – The parameter that specifies which config the user wants to receive.

  • mediator (Mediator) – A pntos.api.Mediator instance.

  • config_group (str) – The registry group which contains the config being extracted.

Returns:

ConfigType | None

pntos.cobra.config.config_to_registry(config, mediator)

A utility function that inserts a config into the registry.

This function verifies that all series of data are within tuples and converts them to a registry equivalent. It will convert an int to a float if the field is type hinted as a float. It also supports storing nested config objects and the API defined pntos.api.EstimateWithCovariance.

Parameters:
pntos.cobra.config.imu_model_from_config(config)

Grabs the ImuModel object nested within the provided ImuConfig object.

Parameters:

config (ImuConfig) – The ImuConfig object to grab an ImuModel object from.

Returns:

ImuModel

pntos.cobra.config.imu_model_to_config(model, group)

Stores a provided IMU model inside an ImuConfig object.

Parameters:
  • model (ImuModel) – The IMU model to store.

  • group (str) – The config group the ImuConfig object should be stored under in the registry.

Returns:

ImuConfig

class pntos.cobra.config.PinsonErrorToStandardVSBConfig(*, group, source, target)

Bases: VirtualStateBlockConfig

Configuration used to generate a new PinsonErrorToStandard virtual state block.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'pinson_error_to_standard'

An identifier that determines the type of virtual state block to use.

This field will be matched against the virtual_block_identifiers field on the state model provider.

source

The label associated with state representation this virtual state block can transform from.

target

The label that describes the state representation this virtual state block can transform to.

This label should be unique from all other pntos.cobra.config.VirtualStateBlockConfig.target and pntos.cobra.config.StateBlockConfig.label values.

aux_channels = ('INERTIAL_PVA',)

Optional channels to map to this block’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this virtual state block needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this virtual state block needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.StateExtractorConfig(*, group, source, target, incoming_state_size, indices_to_extract)

Bases: VirtualStateBlockConfig

Configuration used to generate a new StateExtractor Virtual State Block.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier = 'state_extractor'

An identifier that determines the type of virtual state block to use.

This field will be matched against the virtual_block_identifiers field on the state model provider.

source

The label associated with state representation this virtual state block can transform from.

target

The label that describes the state representation this virtual state block can transform to.

This label should be unique from all other pntos.cobra.config.VirtualStateBlockConfig.target and pntos.cobra.config.StateBlockConfig.label values.

aux_channels = None

Optional channels to map to this block’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this virtual state block needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this virtual state block needs the inertial forces and/or rates as aux data.

incoming_state_size

The number of states in the state block source refers to

indices_to_extract

The series of indices that correspond to the states to extract from source and comprise target

class pntos.cobra.config.VirtualStateBlockConfig(*, group, identifier, source, target, aux_channels=None)

Bases: BaseConfig

Configuration used to generate a new virtual state block.

group

A user-defined config group name, corresponding to a group in the registry.

When a config object is stored in the registry, this field determines which group in the registry the object’s fields will be stored in.

identifier

An identifier that determines the type of virtual state block to use.

This field will be matched against the virtual_block_identifiers field on the state model provider.

source

The label associated with state representation this virtual state block can transform from.

target

The label that describes the state representation this virtual state block can transform to.

This label should be unique from all other pntos.cobra.config.VirtualStateBlockConfig.target and pntos.cobra.config.StateBlockConfig.label values.

aux_channels = None

Optional channels to map to this block’s receive_aux_data method.

The following channel strings are reserved:
  • INERTIAL_PVA: Should be added to aux_channels if this virtual state block needs the inertial PVA as aux data.

  • INERTIAL_FORCES_AND_RATES: Should be added to aux_channels if this virtual state block needs the inertial forces and/or rates as aux data.

class pntos.cobra.config.ConfigType

The type of any class which inherits from BaseConfig.

Used to tell config_from_registry() which type of config class to attempt to get from the registry.