General Data Operation

Description

Performs corresponding operations based on the input data type, supporting data types such as numeric values, booleans, matrices, strings, and dictionaries.

Overview

Performs operations on data of numeric, boolean, matrix, or string types.

Scenarios

  • Numerical Calculation: Calculate coordinate offsets, adjust score weights, etc.

  • Logical Combination: Combine multiple condition judgment results (e.g., output True only when "object detected" AND "score > 0.8").

  • Matrix Transformation: Perform matrix multiplication or inversion during robot hand-eye calibration or Pose transformation.

  • Data Merging: Concatenate two strings into a file path, or merge two dictionaries into a single configuration item.

Inputs and Outputs

Inputs

Data 1: Instantiate different data types, supporting integer, float, boolean, string, Matrix, etc.

Data 2: Data type is the same as Data-1; for unary operations, this port can be left unconnected.

Outputs

Output: Result data after operation.

Parameters

Operation

Description

Provides different options based on the instantiated data type.

Tuning Instructions

Numeric types (Integer/Float):

  • +, -, *, /: Basic arithmetic operations.

Boolean type (Bool):

  • AND: Outputs true when both operands are true.

  • OR: Outputs true when at least one operand is true.

  • NOT: Negates "Data-1" and outputs the inverted result (Data-2 is ignored).

  • XOR: Outputs true when the two operands differ, and false when they are the same.

Matrix type (Matrix):

  • Dot product: Matrix multiplication. Requires the number of columns in Data-1 to equal the number of rows in Data-2.

  • Inverse: Computes the matrix inverse. Requires Data-1 to be a square matrix (equal number of rows and columns); Data-2 is ignored.

  • Transpose: Swaps rows and columns; Data-2 is ignored.

  • +, -, *: Element-wise addition, subtraction, and multiplication. Requires both matrices to have identical shapes.

Other types (String/Dict/List):

  • Concatenation: String concatenation, list merging, or dictionary merging.