function
SLAM.Mapping.RGBDMapAnchors.ValidNodes
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | enabled | Boolean | [:] | |
| input | ids | Integer | [size(enabled,1)] | |
| input | position | Real | [size(enabled,1),dimension] | |
| input | rotation | Real | [size(enabled,1),dimension,dimension] | |
| input | coordinateLimit | Real | | |
| output | valid | Boolean | |
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;