CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

Vision.Matching.RGBDPredictedPoint

Public declarations

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

RoleNameTypeDimensions / attributes / defaultDescription
inputpointReal[3]
inputrotationReal[3,3]
inputtranslationReal[3]
inputenabledBoolean
outputpredictedReal[3]

Modelica declarations and implementation

Show parameters, interfaces and source

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

function RGBDPredictedPoint
  input Real point[3];
  input Real rotation[3,3];
  input Real translation[3];
  input Boolean enabled;
  output Real predicted[3];
algorithm
  predicted := zeros(3);
  for a in 1:3 loop
    predicted[a] := if enabled then translation[a] else 0.0;
    for b in 1:3 loop
      predicted[a] := predicted[a]+(if enabled then rotation[a,b]*point[b] else 0.0);
    end for;
  end for;
end RGBDPredictedPoint;