🟧 Generic List Length Calculation

Function Description

This operator is used to calculate the total sum or length (i.e., number of elements) of elements in the input list.

Usage Scenarios

  • Count quantities: In any part of the workflow that needs to know the list size, for example, determine how many objects were detected, or how many data points were received.

  • Logical judgment: Use the output "List Length" as input for subsequent "Generic Conditional Judgment" operators to implement flow control based on quantities (for example, only execute grasping when detection count is greater than 0).

  • Calculate data: When list elements are numbers or lists, can quickly sum them up.

Input Output

Input

Input List: Any type of list.

Output

List Length: An integer representing the total number of elements in the input list.

List Data Sum: An integer or empty output.

Parameter Description

List data sum calculation rules:

  • If list elements are numbers, directly sum all numbers.

  • If list elements are lists or arrays, calculate the length of each sub-list/array, then add these lengths together.

  • If list elements are image or point cloud types, or other unsupported types, output is empty.

  • If the input list itself is empty, list length is 0, list data sum is empty.