('Launchpad/NumPeopleZone2' >= 1) ~ 3There is at least one person detected in zone 2 of ALEngagementZones for at least 3 seconds.
Key Name | Type | Explanation |
Launchpad/NumMotionZone1() | int | The number of moving objects detected in zone 1. Only available during solitary state. |
Launchpad/NumMotionZone2() | int | The number of moving objects detected in zone 2. Only available during solitary state. |
Launchpad/NumMotionZone3() | int | The number of moving objects detected in zone 3. Only available during solitary state. |
Launchpad/NoMotionInZones() | bool | True when no motion is detected in any zone. Only available during solitary state. |
Launchpad/WavingDetection() | int | 0 while no waving is detected, 1 while waving is detected. Only available during solitary state. |
Launchpad/NumPeopleZone1() | int | The number of people detected in zone 1. Only available during solitary state. |
Launchpad/NumPeopleZone2() | int | The number of people detected in zone 2 Only available during solitary state. |
Launchpad/NumPeopleZone3() | int | The number of people detected in zone 3 Only available during solitary state. |
Launchpad/NoPeopleInZones() | bool | True when no people are detected in any zone. Only available during solitary state. |
Launchpad/PeopleNotSeen() | bool | True when PeoplePerception/VisiblePeopleList is empty. Only available during solitary state. |
Launchpad/SameTrackedHuman() | bool | True as long as the same person is being tracked. Momentarily false when the tracked person changes. The tracked person is determined by BasicAwareness. Only available if BasicAwareness is started. |
Launchpad/ZoneOfTrackedHuman() | int | The zone that the tracked person is in: 1, 2, or 3. 0 if no one is tracked. Only available if BasicAwareness is started. |
Launchpad/DistanceOfTrackedHuman() | float | The distance in meters to the tracked human. -1.0 if no one is tracked. Only available if BasicAwareness is started. |
Launchpad/TrackedHumanIsLookingAtRobot() | bool | True when the tracked person is looking at the robot. Only available if BasicAwareness is started. |
Key Name | Type | Explanation |
Launchpad/BatteryIsCharging() | bool | True if the batter is currently recharging. |
Launchpad/BatteryLevel() | int | A number in the set: [0, 5]. |
Launchpad/BatteryStatus() | string | Critical, Low, Half, Full. |
Key Name | Type | Explanation |
Launchpad/RobotType() | string | nao, pepper, romeo. |
Key Name | Type | Explanation |
Launchpad/Lifted() | bool | True if someone has lifted the robot up. Can only be true on NAO. |
Launchpad/PostureFamily() | string | One of the Posture family. |
Launchpad/Posture() | string | One of the Posture. |
Launchpad/RobotFellRecently() | bool | True if the robot has fallen within the last 13 seconds. |
Launchpad/RobotPushedRecently() | bool | True if the robot was pushed within the last 13 seconds. Can only be true on Pepper. |
*Conditions expression language * Expression grammar: * ------------------------------------------------------------------------------------------- * - Parenthesis () * * - Constant int: 1 * * - Constant floats: 1.5, 1e4 * * - Constant strings: double-quoted: "foo", "bar" * * - Lists: [1, 2, foo] * * - ALMemory keys: single-quoted: 'key12', 'motion/foo' * A key can be used anywhere a constant or list can be used. * Be careful about the data types of your keys. * If you refer to a memory key that does not exist, it will be an "Invalid" type * which effectively evaluates to 0 (false). * If you use a memory that has been declared, but not initialized with a value, * it is also an "Invalid" type, and evaluates to 0 (false). * * - Qi Signals and Properties: ServiceName.SignalName, ServiceName.SignalName.MemberName * Can be used anywhere an ALMemory key can be used. * Until a Signal is raised, it will be "Invalid" and evaluate to 0 (false). * A Property has a value by default and will always return a value if the Property exists. * If a Signal/Property does not exist, it will be "Invalid" and evaluate to 0 (false). * "MemberName" is the case where a Signal/Property returns a struct. * * - Index a list key: 'motion/foo'[2], ALMotion.FooProperty[2] * * - Index a map key: ALMotion.FooSignal["bar"] * Only supported on Signals/Properties, not supported for ALMemory keys. * * - Logical, Mathematical, bitwise operators: * && || ! != == <= < >= > + - / * % | & ^ * * - String operation functions: * substr("canard", 1, 3) returns "ana" * strlen("coin") returns 4 * concat("a", "b") returns "ab" * * - Type operation functions: * size([1,2,3]) returns 3. * type("foo") returns "String". Other types: Invalid, Array, Bool, Int, Float, String * Type casting: int() float() string() bool() * The parameters passed to these can be any expression. * * - subsets operator: * True example: [1, 2] subsets [1, 2, 3, 4] * True example: 1 subsets [1, 2, 3, 4] * * - intersects operator: * True example: [4, 5, 6] intersects [1, 2, 3, 4] * True example: [4, 5, 6] intersects 5 * * - random operator: * rand(0, 10, 1) return a random int between 0 and 10 included, the random number will be regenerated every second * rand(5.0, 7.0, 5) return a random float between 5.0 and 7.0 included, the random number will be regenerated every 5 seconds * rand(60, 80, 0) return a random int between 60 and 80 included, the random number will be generated only once per naoqi startup * * - Preference key fetching function: pref("com.mydomain", "myKey") * Only constant strings can be passed as parameters, not ALMemory keys or expressions. * If the preference does not exist, an "Invalid" will be returned. * Otherwise all preferences are returned as "String". It may be necessary to use * type casting functions around the pref() call. * * - ALMemory key utility functions: * bang('myKey'): True for the moment that the associated key's event is raised * and false at all other times. This only works with event based keys. * * stable(expression): expression can be any expression possible with this grammar. * stable() will evaluate to True as long as the returned value * of it's expression are not changing. * It will evaluate to false only at the moment that the expression * has a change in value. * This us useful when combined with time based operators. * * - Time based operators: * ~ operator: Requires an expression to be true for given duration in seconds * Example: ('myKey' < 1) ~ 1.5 * Meaning: myKey has been less than 1 for at least 1.5 seconds. * * @ operator: Requires an expression to be true at a specific point in time in the past * Example: ('myKey' == 1) @ 10.0 * Meaning: Exactly 10 seconds ago, myKey was equal to 1 * * # operator: Requires an expression to be true at any moment in time * within the specified window toward the past * Example: ('myKey' > 1) # 60.0 * Meaning: myKey was greater than 1 at some point in the last 60 seconds. * It may also have had many other values during that period. * * Note that time operators can be combined to describe a context. * Example: 'myKey' ~ 1.5 @ 10.0 && !'myKey' * Meaning: 10 seconds ago, myKey had been true for at least 1.5 seconds, * and now it is false. * * Example: ('Launchpad/FocusedActivity' == "myPkg/myActivity") # 2160 * && ('Launchpad/FocusedActivity' != "myPkg/myActivity") ~ 3600 * Meaning: "myPkg/myActivity" was focused at least once in the last 6 hours, * but not in the last 1 hour. * * Order of Operations: * (highest precedence operation listed first, items on same line have equal precedence) * ------------------------------------------------------------------------------------------- * () * Evaluate memory keys into constants * [] * pref(), int(), float(), string(), bool(), type(), size() * ! * ~, @, # * subsets, intersects * bang(), stable(), rand() * *, /, % * +, - * |, &, ^ * <, <=, >, >= * ==, != * && * ||