CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

SLAM.Mapping.RGBDCatalogPoseMapping.ValidView

Public declarations

Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.

RoleNameTypeDimensions / attributes / defaultDescription
inputcatalogRGBDKeyframes.Catalog
inputposesPoseView
inputsourceRevisionInteger
outputvalidBoolean

Modelica declarations and implementation

Show parameters, interfaces and source

Parameters, inputs, outputs, defaults and equations from the source file.

function ValidView
    input RGBDKeyframes.Catalog catalog; input PoseView poses; input Integer sourceRevision; output Boolean valid;
  algorithm
    valid := RGBDKeyframes.ValidHeader(catalog) and poses.generation == catalog.generation
      and sourceRevision > 0 and sourceRevision <= RGBDKeyframes.identifierLimit and poses.sourceRevision == sourceRevision
      and poses.revision >= 0 and poses.revision < RGBDKeyframes.identifierLimit-1 and poses.catalogNextId == catalog.nextId;
    for slot in 1:nodeCapacity loop
      valid := valid and poses.enabled[slot] == catalog.occupied[slot];
      if poses.enabled[slot] then
        valid := valid and poses.ids[slot] == catalog.ids[slot] and RGBDUncertaintyProper(poses.rotations[slot,:,:]);
        for axis in 1:dimension loop valid := valid and abs(poses.positions[slot,axis]) <= 1e6; end for;
      end if;
    end for;
  end ValidView;