Expression Field
In an Expression Field, you can not just enter a number, but rather a mathematical Expression. The RobFlow convention for these Expressions matches the Python programming language.
Basic mathematical operations:
- Plus: +
- Minus: -
- Multiply: *
- Divide: /
Logical Operators:
- AND: and
- OR: or
- Equal: ==
- Not Equal: !=
Variables
- To insert a Variable, simply press # inside the Expression Field, and a menu will pop up where you can select the desired Variable.
You can just continue typing to filter the Variable list by Variable name. If you filter the Variables until there is only one left, you can also apply it by pressing Enter.
The Variable will be displayed in its respective color, e.g.myVariable.

JSON:
- You can store JSON data inside a String Variable. This allows you to access structured or nested data directly inside Expressions.
- To access values within the JSON, use bracket notation — similar to how you would access data in Python.
Example:myVariable["key0"]["key1"]will access the nested value underkey1insidekey0. - If the item is an array, you can also use numeric indices to access elements.
Example:myVariable["users"][0]["name"]will return thenameof the first element in theusersarray.
Extended mathematical functions (see Python Mathematical Functions for details):
'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'cbrt', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'dist', 'erf', 'erfc', 'exp', 'exp2', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'isclose', 'isfinite', 'isinf', 'isnan', 'isqrt', 'lcm', 'ldexp', 'lgamma', 'log', 'log1p', 'log10', 'log2', 'modf', 'pow', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'prod', 'sumprod', 'perm', 'comb', 'nextafter', 'ulp', 'pi', 'e', 'tau', 'inf', 'nan'
Every name in Python's math module is available, so the list above reflects the module as
it currently ships. The built-in functions below, by contrast, are a fixed allow-list.
Python built-in functions (see Python Built-In Functions for details):
'min', 'max', 'abs', 'round', 'sum', 'len', 'all', 'any'
If you use number arrays, make sure to add whitespaces between the entries. Otherwise, numbers may be treated as float values (e.g. [1,2,3] will be evaluated to [1.2, 3]. Using [1, 2, 3] would work as intended. See examples below).
Pose Expressions:
Pose Expressions provide a structured way to represent positions and orientations. These Expressions can represent either Cartesian Poses or Joint Poses.
The syntax below is what a Pose Expression looks like written out. In the app you normally build one field by field in the Pose Expression Configurator instead — see Configure Pose Expression.
Cartesian Pose Expressions:
- A Cartesian Pose Expression defines a 3D position and an orientation, optionally relative to a reference frame.
- Format:
[PositionX, PositionY, PositionZ, OrientationZ, OrientationY, OrientationX], ReferenceFrame - Example:
[100+3, IntVar*FloatVar, PoseB.z, PoseA.rz, PoseA.ry, PoseA.rx], PoseD - Breakdown:
100+3,IntVar*FloatVar, andPoseB.z: Define the X, Y, and Z position components.PoseA.rz, PoseA.ry, PoseA.rx: Represents the orientation of the pose.PoseDsymbolizes the reference frame. Generally the reference frame can beBASEor you can specify a CartesianPoseVariable (in this examplePoseD).
Joint Pose Expressions:
- A Joint Pose Expression defines values for individual joints.
- Format:
[Joint1, Joint2, Joint3, ...] - Example:
[JointPose.j1, IntVar, 100*2, 3+4, FloatVar, JointPoseB.j3] - Breakdown:
- Each entry specifies a new value for the corresponding joint.
- Example:
JointPose.j1: References the current value of the first joint of the JointPoseVariable named JointPose.
Example Expressions:
2 * 3 * 4 ==> 242 * pi ==> 6.283pow(2, 3) ==> 8sqrt(9) ==> 32 * True ==> 22 * False ==> 02 * myVariable ==> 4(myVariable=2)True or False ==> TrueTrue and False ==> False3 != 3 ==> False5 == 5 ==> Truesum([1, 2, 3]) ==> 6sum([1,2,3]) ==> 4.2 (evaluates to sum([1.2, 3]), see note above)min([4, 7]) ==> 4max([4, 7]) ==> 7len([4, 7]) ==> 2all([True, False]) ==> Falseany([True, False]) ==> True[100+3, IntVar*2, PoseB.z, PoseA.rz, PoseA.ry, PoseA.rx], BASE[JointPose.j1, 90, FloatVar]