Last active
August 29, 2015 14:22
-
-
Save moriarty/80e7e7822426322a3f18 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select twist.data from TwistROSMessage as twist | |
| where twist.data.linear.x > 0 | |
| select cmd.data from CmdVelEvent as cmd | |
| where cmd.data.linear.x > 0 | |
| select data from StringROSMessage(topic='chatter/String2') | |
| where data != '0' | |
| select * from pattern[ every [1] (a=AButtonEvent -> b=BButtonEvent)] | |
| select * from IntROSMessage | |
| match_recognize ( | |
| measures A.data + B.data as dataSum | |
| pattern (A B) | |
| define | |
| A as A.topic='chatter/Int1' or A.topic='chatter/Int2', | |
| B as B.topic != A.topic and (B.topic='chatter/Int1' or B.topic='chatter/Int2')) | |
| Map<String, Integer> - eventMap | |
| eventMap.get(“dataSum”) | |
| select * from IntROSMessage | |
| match_recognize ( | |
| measures A.data * B.data as dataProduct | |
| pattern (A B) | |
| define | |
| A as A.topic='chatter/Int1', | |
| B as B.topic='chatter/Int2' and B.data = A.data ) | |
| Map<String, Integer> - eventMap | |
| eventMap.get(“dataProduct”) | |
| select * from IntROSMessage | |
| match_recognize ( | |
| measures A.data as int1, C.data as int2 | |
| pattern (A B C) | |
| define | |
| A as A.topic='e_button_a', | |
| B as B.topic='e_button_a', | |
| C as C.topic='e_button_b' ) | |
| select * from ColorSensorEvent | |
| match_recognize ( | |
| measures A as c1, B as c2 | |
| pattern (A B) | |
| define | |
| A as A.r > 10.0 , | |
| B as (B.r > A.r) ) | |
| select avg(linearVelocity) as avg_vel, avg(angularVelocity) as avg_rot | |
| from TurtlePoseEvent(topic='turtle1/pose').win:time_batch(10 sec) | |
| select avg(linearVelocity) as avg_vel, avg(angularVelocity) as avg_rot | |
| from TurtlePoseEvent(topic='turtle1/pose').win:time_batch(5 sec) | |
| select avg(linearVelocity) as avg_vel, avg(angularVelocity) as avg_rot | |
| from TurtlePoseEvent(topic='turtle1/pose').win:time_batch( | |
| “this.time_window” | |
| ) | |
| select * from pattern[ | |
| every sample=IntROSMessage(topic='chatter/temperature', data > 50) | |
| -> | |
| ((IntROSMessage(topic=sample.topic, data >= sample.data) | |
| and not | |
| IntROSMessage(topic=sample.topic, data < sample.data )) | |
| -> | |
| (IntROSMessage(topic=sample.topic, data >= sample.data) | |
| and not | |
| IntROSMessage(topic=sample.topic, data < sample.data )) | |
| ) where timer:within(90 seconds)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment