CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

SLAM.Mapping.RGBDMapAnchors.ValidNodes

Public declarations

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

RoleNameTypeDimensions / attributes / defaultDescription
inputenabledBoolean[:]
inputidsInteger[size(enabled,1)]
inputpositionReal[size(enabled,1),dimension]
inputrotationReal[size(enabled,1),dimension,dimension]
inputcoordinateLimitReal
outputvalidBoolean

Modelica declarations and implementation

Show parameters, interfaces and source

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

function ValidNodes
    input Boolean enabled[:];
    input Integer ids[size(enabled,1)];
    input Real position[size(enabled,1),dimension];
    input Real rotation[size(enabled,1),dimension,dimension];
    input Real coordinateLimit;
    output Boolean valid;
  algorithm
    valid := true;
    for node in 1:size(enabled,1) loop
      if enabled[node] then
        valid := valid and ids[node] >= 1 and ids[node] <= identifierLimit
          and ProperRotation(rotation[node,:,:]);
        for axis in 1:dimension loop
          valid := valid and abs(position[node,axis]) <= coordinateLimit;
        end for;
        for other in 1:node-1 loop
          if enabled[other] then valid := valid and ids[node] <> ids[other]; end if;
        end for;
      end if;
    end for;
  end ValidNodes;