-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflows_roboy-nano-brain.json
1 lines (1 loc) · 144 KB
/
flows_roboy-nano-brain.json
1
[{"id":"52b5890c.deb9e8","type":"tab","label":"Face, Text & Matrix","disabled":false,"info":""},{"id":"db483fc9.6ed028","type":"tab","label":"Pinky and the Brain","disabled":false,"info":""},{"id":"1431d2dd.0bb8cd","type":"tab","label":"Launch","disabled":false,"info":""},{"id":"a3d75715.5da158","type":"tab","label":"photoboy","disabled":false,"info":""},{"id":"8aa37358.08beb","type":"tab","label":"utils","disabled":false,"info":""},{"id":"d7f9d35.45bb8b","type":"ui_tab","name":"Controls","icon":"dashboard","order":2,"disabled":false,"hidden":false},{"id":"31da5dc7.5248f2","type":"ui_group","name":"Camera stream","tab":"9d7a58a4.15e9f8","order":9,"disp":true,"width":"6","collapse":true},{"id":"4ddf4421.544524","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#465572","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#465572","edited":true},"page-titlebar-backgroundColor":{"value":"#465572","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#333333","edited":false},"group-textColor":{"value":"#6479a0","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#465572","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Roboy Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":40,"sy":48,"gx":10,"gy":10,"cx":6,"cy":6,"px":2,"py":2}}},{"id":"3d9b8cb5.0e989c","type":"ui_group","name":"Motor status","tab":"","order":3,"disp":true,"width":"9","collapse":true},{"id":"6831354a.a3846c","type":"ui_group","name":"Emotions","tab":"d7f9d35.45bb8b","order":5,"disp":true,"width":"5","collapse":true},{"id":"e090dfb5.0fde9","type":"ui_group","name":"Talk","tab":"d7f9d35.45bb8b","order":4,"disp":true,"width":"6","collapse":true},{"id":"94078f0e.9efad8","type":"ui_group","name":"Explain English","tab":"9d7a58a4.15e9f8","order":2,"disp":true,"width":"6","collapse":true},{"id":"88c99838.3bee8","type":"ui_group","name":"Encourage","tab":"9d7a58a4.15e9f8","order":8,"disp":true,"width":"6","collapse":true},{"id":"8bec28aa.3fe1b","type":"ui_tab","name":"Camera Stream","icon":"view_stream","order":4,"disabled":true,"hidden":true},{"id":"b7f4bfd2.67f56","type":"ui_group","z":"","name":"Matrix leds","tab":"d7f9d35.45bb8b","order":6,"disp":true,"width":"6","collapse":true},{"id":"fcbf351c.ddfb58","type":"ui_group","z":"","name":"Status","tab":"d7f9d35.45bb8b","order":7,"disp":true,"width":"6","collapse":true},{"id":"81fa96a1.275438","type":"ui_group","name":"Face oracle","tab":"8bec28aa.3fe1b","order":1,"disp":true,"width":"27","collapse":false},{"id":"eaaa7bbf.50dcf8","type":"ui_group","name":"Hug","tab":"9d7a58a4.15e9f8","order":7,"disp":true,"width":"6","collapse":true},{"id":"c6c883d9.94b1e","type":"ui_group","name":"Explain German","tab":"9d7a58a4.15e9f8","order":3,"disp":true,"width":"6","collapse":true},{"id":"3b881a91.d91036","type":"ui_group","name":"Fotos","tab":"9d7a58a4.15e9f8","order":6,"disp":true,"width":"6","collapse":true},{"id":"80b704e6.d6c7f8","type":"ui_group","name":"German chitchat","tab":"9d7a58a4.15e9f8","order":5,"disp":true,"width":"6","collapse":true},{"id":"c175dd70.a141","type":"ui_group","name":"English chitchat","tab":"9d7a58a4.15e9f8","order":4,"disp":true,"width":"6","collapse":true},{"id":"3d3fdb49.6047e4","type":"ui_group","name":"photo","tab":"eb6871bf.448c1","order":1,"disp":false,"width":9,"collapse":false},{"id":"6c3556d7.ece548","type":"ui_group","name":"qr","tab":"eb6871bf.448c1","order":3,"disp":false,"width":"9","collapse":false},{"id":"d434410a.a993d","type":"ui_group","name":"print","tab":"eb6871bf.448c1","order":5,"disp":false,"width":"8","collapse":false},{"id":"eb6871bf.448c1","type":"ui_tab","name":"Photoboy","icon":"camera_alt","order":1,"disabled":true,"hidden":true},{"id":"1c06993f.bd9797","type":"ui_spacer","name":"spacer","group":"2367b634.9b4c1a","order":14,"width":"5","height":"2"},{"id":"eb068579.1d85b8","type":"ui_tab","name":"Utils","icon":"settings","order":3,"disabled":false,"hidden":false},{"id":"6f290e93.9e80f","type":"ui_group","name":"Sound files generator","tab":"eb068579.1d85b8","order":1,"disp":true,"width":"12","collapse":true},{"id":"5272c43f.425f3c","type":"ui_group","name":"Filters","tab":"","order":2,"disp":true,"width":"24","collapse":false},{"id":"cf9b4a2a.9d6a48","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":"","willTopic":"","willQos":"0","willRetain":null,"willPayload":""},{"id":"88a8ddc9.0e1c5","type":"ui_group","name":"Devices","tab":"","order":2,"disp":true,"width":"18"},{"id":"a4ab58c8.82c5f8","type":"ui_spacer","name":"spacer","group":"6f290e93.9e80f","order":3,"width":1,"height":1},{"id":"896ad6b3.744698","type":"ui_group","name":"Chinese Talk","tab":"9d7a58a4.15e9f8","order":1,"disp":true,"width":"6","collapse":true},{"id":"6dfb2c31.238904","type":"ui_tab","name":"CIIE","icon":"public","disabled":true,"hidden":true},{"id":"9e9db6ff.b10238","type":"ui_group","name":"Show","tab":"6dfb2c31.238904","order":1,"disp":true,"width":"6","collapse":true},{"id":"aa5a1f73.fff3e","type":"ui_tab","name":"Movements","icon":"directions_walk","disabled":true,"hidden":true},{"id":"a8f7a774.585be8","type":"ui_group","name":"Actions queue","tab":"aa5a1f73.fff3e","order":3,"disp":true,"width":"6","collapse":true},{"id":"22c01be5.038e84","type":"ui_group","name":"Available actions","tab":"aa5a1f73.fff3e","order":2,"disp":true,"width":"6","collapse":true},{"id":"1d314a61.6c81b6","type":"ui_group","name":"Record trajectory","tab":"aa5a1f73.fff3e","order":1,"disp":true,"width":"6","collapse":true},{"id":"6a59a2dd.737c8c","type":"ui_spacer","name":"spacer","group":"1d314a61.6c81b6","order":3,"width":6,"height":1},{"id":"75ce8c9c.b211b4","type":"ui_spacer","name":"spacer","group":"eaaa7bbf.50dcf8","order":3,"width":6,"height":1},{"id":"8317e8e5.f71ed8","type":"ui_spacer","name":"spacer","group":"3d3fdb49.6047e4","order":1,"width":9,"height":1},{"id":"e7b58a0c.c75dc8","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":1,"width":9,"height":1},{"id":"c336534f.64d14","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":2,"width":9,"height":1},{"id":"eca1c790.577778","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":3,"width":9,"height":1},{"id":"8787bf50.98f13","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":4,"width":1,"height":1},{"id":"1db456ee.0682d9","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":6,"width":1,"height":1},{"id":"224c6171.dd3f3e","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":7,"width":1,"height":1},{"id":"11aa605d.92e6","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":8,"width":1,"height":1},{"id":"cf512ff9.9f1d1","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":9,"width":1,"height":1},{"id":"aea740e1.0a18d","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":10,"width":1,"height":1},{"id":"35f412a8.cea6ae","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":11,"width":1,"height":1},{"id":"7b100bc1.0b1844","type":"ui_spacer","name":"spacer","group":"6c3556d7.ece548","order":12,"width":1,"height":1},{"id":"dd38a727.dbf998","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":1,"width":8,"height":1},{"id":"301a172d.35b7b8","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":2,"width":8,"height":1},{"id":"e6585017.0ed4b","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":3,"width":8,"height":1},{"id":"b02990cd.27504","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":4,"width":8,"height":1},{"id":"512d400f.682a4","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":5,"width":1,"height":1},{"id":"d22e8a66.8225d8","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":7,"width":2,"height":1},{"id":"86fc6c0c.78d33","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":8,"width":1,"height":1},{"id":"dab8c51c.f959a8","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":9,"width":2,"height":1},{"id":"835a71be.ba93","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":10,"width":1,"height":1},{"id":"d7fd351c.675d98","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":11,"width":2,"height":1},{"id":"74922a8.d54f9d4","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":12,"width":1,"height":1},{"id":"cfe5c308.ac3fa","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":13,"width":2,"height":1},{"id":"93d6d5e.6d31928","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":14,"width":1,"height":1},{"id":"71adcb6f.785ed4","type":"ui_spacer","name":"spacer","group":"d434410a.a993d","order":15,"width":2,"height":1},{"id":"9d7a58a4.15e9f8","type":"ui_tab","name":"tmp","icon":"dashboard","disabled":true,"hidden":true},{"id":"3312604b.efe3e","type":"ui_group","name":"Tmp","tab":"9d7a58a4.15e9f8","order":10,"disp":true,"width":"6","collapse":false},{"id":"5a3a63d5.6b5d34","type":"ui_group","name":"Body parts","tab":"d7f9d35.45bb8b","order":2,"disp":true,"width":"6","collapse":true},{"id":"119dd707.3b3d61","type":"ui_group","name":"Robot","tab":"d7f9d35.45bb8b","order":1,"disp":true,"width":"6","collapse":false},{"id":"e2c2d821.6c65d","type":"ui_group","name":"Motor Config","tab":"d7f9d35.45bb8b","order":8,"disp":true,"width":"6","collapse":true},{"id":"f9bbdd6b.b7ed4","type":"ui_group","name":"Joint control","tab":"d7f9d35.45bb8b","order":3,"disp":true,"width":"6","collapse":true},{"id":"e7a074fd.cc4bb","type":"ui_group","name":"Face calibration","tab":"d7f9d35.45bb8b","order":12,"disp":true,"width":"6","collapse":true},{"id":"e6b37988.d3422","type":"ui_group","name":"Motor Status","tab":"d7f9d35.45bb8b","order":9,"disp":true,"width":"6","collapse":true},{"id":"be89295.1c9f0d8","type":"ui_group","z":"","name":"Soli","tab":"d7f9d35.45bb8b","order":11,"disp":true,"width":"6","collapse":true},{"id":"c0933ce3.2094a","type":"ui_group","z":"","name":"Motor check","tab":"d7f9d35.45bb8b","order":10,"disp":true,"width":"6","collapse":true},{"id":"320a4340.55746c","type":"exec","z":"52b5890c.deb9e8","command":"rosservice call /roboy/brain/cognition/face/emotion ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":910,"y":160,"wires":[[],[],[]]},{"id":"f1385161.95f248","type":"function","z":"52b5890c.deb9e8","name":"parse_emotion","func":"cmd = \"\\\"emotion: '\";\ncmd += msg.payload;\ncmd += \"'\\\"\";\nmsg.payload = cmd;\nreturn msg;","outputs":"1","noerr":0,"initialize":"","finalize":"","x":495.7856750488281,"y":168.32142639160156,"wires":[["320a4340.55746c"]]},{"id":"1ca39831.136b98","type":"function","z":"52b5890c.deb9e8","name":"parse_text","func":"// if(msg.payload.slice(-1) == \".\"){\n cmd = \"\\\"text: '\";\n cmd += msg.payload.replace(\"'\",\"\");\n cmd += \"'\\\"\";\n msg.payload = cmd;\n empty = {}\n empty.payload = \"\";\n return [msg, empty];\n// }","outputs":2,"noerr":0,"x":410,"y":740,"wires":[["77c85bb2.2cd55c","93504010.b0fb4"],["70989901.31c188"]]},{"id":"77c85bb2.2cd55c","type":"exec","z":"52b5890c.deb9e8","command":"ls","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":730,"y":820,"wires":[["8c06d332.49c8f"],["8c06d332.49c8f"],["8c06d332.49c8f"]]},{"id":"70989901.31c188","type":"delay","z":"52b5890c.deb9e8","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":170,"y":640,"wires":[["e417796.bbe9e88"]]},{"id":"e3ad8301.40f0f","type":"function","z":"52b5890c.deb9e8","name":"parse_text","func":"cmd = \"\\\"text: '\";\nswitch(msg.payload) {\n case \"selfie\":\n var s = [\"Come on, take a selfie with me, I think we will look great together.\", \"I love taking pictures, take your phone and lets take a selfie together.\", \n \"do you like taking pictures as much as i do? i wouldnt say no to a photo with you.\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"oktobertech\":\n var s = [\"Welcome to OctoberTech, I hope you have a great time, and dont forget to make a selfie with me\",\n \"Hey there, welcome to OctoberTech! It will be an amazing day, so enjoy it! Oh and I love doing selfies.\",\n \"Good morning and welcome to OctoberTech. Its quite early for me, but you have to start early to get all the amazing content into the day! So enjoy!\",\n \"Good morning, welcome to October Tech! Enjoy your stay, it will be a great day! Oh, and take a selfie with me, theres prices to win!\",\n \"Hey, do you like winning prices? Yes? Then lets take a selfie together. Oh and welcome to OctoberTech\",\n \"Hi, good morning, wow, so great to see you. Im feeling marvellous and you look like you do to! So, enjoy the day and welcome to OctoberTech!\",\n \"Welcome to OctoberTech, I hope you have a great time, by the way, Im here by bike, are you?\",\n \"So Im a very green robot, not by hue, but by bike!\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"talktoname\":\n var s = [\"Hey \"+name+\" great to see you!\",\n name+\" how are you?\",\n \"I know you, you're \"+name,\n \"Hey \"+name+\" let's take a selfie together\",\n \"Oh my god, hey \"+name+\" great to see you\",\n \"it's so great to see you \"+name,\n \"well, \"+name+\" how are you today? you look fabulous!\",\n name+\", \"+name+\", \"+name+\" let's take a picture!\"]\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"built\":\n var s = [\"Did you know that I was designed in 4 months by a team of students from the Technical university of Munich. It took another month to assemble all the parts. And then I was born in April 2018.\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"bioinspired\":\n var s = [\"My body has a human-like structure. I have muscles and tendons just like people do. You can see these blue strings on my shoulder that are connected to the artificial muscle. My team has designed and produced these muscles for me.\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"3dprinted\":\n var s = [\"My body is completely 3D printed. I use almost 50 motors in order to move. I can see, hear, and soon I will be able to feel your touch.\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"rickshaw\":\n var s = [\"Soon I will be a rickshaw driver. Currently my team is teaching me how to ride the tricycle and drive autonomously on the streets. So that in March I can drive people around the Garching Campus.\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"infineonsensors\":\n var s = [\"\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n s = [\"Their MEMS microphones enable me to hear you, and what would I do without my ears.\",\n \"The magnetic sensors enable me to understand how I should move my arm, no easy feat! Check out the Video!.\",\n \"The Infineons 60 gigahertz radar makes it possible that I can detect which material is in front of me.\",\n \"So you wonder why I am here? Well, Im full of Infineon sensors!.\",\n \"Its not coincidence I am here, its because Infineon sensors are making me feel the world!.\",\n \"In case you didnt know why I am here, its because I am full of Infineon sensors that make me feel the world!.\",\n \"I am here with Infineon, because I use their sensors to make me more human like.\"\n ];\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"hugcompliment\":\n var s = [\"\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n s = [\"what a great hugger you are!\", \"this hug is so good that i would never let you go!\", \"you are very professional doing hugs!\", \"that was great. i can really recommend hugging you.\", \"oh, thank you. you just made my day better\"];\n cmd += s[Math.floor(Math.random()*s.length)];\n break;\n case \"ai\":\n cmd += \"It is only a threat if you do not anticipate the changes. I have not met many humans who said that they want to work more and have less time for their friends. But you will have to adapt your social system to account for the abundance we will produce. That will be challenging, but also very important. Make sure politics understands what is upcoming and how to react, then we will turn this planet into a paradise!\";\n break;\n case \"vision\":\n \tcmd += \"The human body is a marvel from a robotics perspective: it is agile, strong, soft, dynamic, self-repairing, self-building and completely silent in operation.\"\n break;\n case \"goal\":\n \tcmd += \"The goal of the Roboy project is to advance humanoid robotics to the state where its robots are just as good as a human body.\"\n break;\n case \"mission\":\n \tcmd += \"We create a platform for robot development inspired by biology that unites students, researchers, companies and artists from a broad spectrum of disciplines.\"\n break;\n case \"open-source\":\n \tcmd += \"To ensure unrestricted development we keep all results open source. And we actively influence the public perception of robotics to level the cultural ground for our innovation through public displays, arts and public speeches.\"\n break;\n case \"humans\":\n \tcmd += \"Obviously I love humans! They have built me and are so entertaining and nice. Whenever I break something, they repair me - amazing!\";\n break;\n case \"friends\":\n \tcmd += \"Definitely humans. There is not many robots, especially humanoids. I have an older, smaller brother, Roboy Junior, but my team is more than 50 people - so there you have it, we still need many more robots.\";\n break;\n case \"wacker\":\n \tcmd += \"Wacker is my favorite company in the world! Do you know anyone working there?\";\n break;\n case \"brain\":\n \tcmd += \"My brain has three layers. The first is based on rules, I kind of have to react on key words and situations - very useful on stage, less useful to react and think on my own. The second layer is accessing databases - such as DB pedia or my own memory and is able to think about the content in them. So I can combine knowledge and deduce facts. Let me make an example: If you ask me who the husband of the Chancelor of Germany is, I can look first up that Angela Merkel is the chancelor, and then I can see she has a husband and then I arrive at Joachim Sauer and give you his name. Finally, the third layer is a deep neural network where I learn from movie subtitles how you humans typically talk to each other and kind of make my own answers up - very entertaining.\";\n break;\n case \"welcome\":\n \tcmd += \"Welcome to Wacker Open Day! I am so happy to be here today.\";\n break;\n case \"story\":\n \tcmd += \"Are you ready for a story. Ok, kids come here if you want to know something interesting. \";\n \tbreak;\n\n default:\n msg = {}\n return msg;\n \n}\n\ncmd += \"'\\\"\";\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":470,"y":960,"wires":[["77c85bb2.2cd55c","93504010.b0fb4"]]},{"id":"8c06d332.49c8f","type":"debug","z":"52b5890c.deb9e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1187,"y":848,"wires":[]},{"id":"c59830db.d9cd18","type":"function","z":"52b5890c.deb9e8","name":"parse_mwc_text","func":"cmd = \"\\\"text: '\";\nswitch(msg.payload) {\n case \"thanks\":\n cmd += \"Thanks, very well, how are you?\";\n break;\n case \"mems\":\n cmd += \"With Infineon’ mems microphones, I finally have ears that are probably even better than yours\";\n break;\n case \"breast\":\n cmd += \"Look here on my breast!\";\n break;\n case \"beamforming\":\n cmd += \"With this array of Infineon XENSIV mems microphones, I can even perform beamforming and concentrate on the person talking to me.\";\n break;\n case \"yes_look\":\n \tcmd += \"Yes certainly, I can. Have a look!\"\n break;\n case \"microcontroller\":\n \tcmd += \" I am using embedded power technology from Infineon, the market leader in power semiconductors. These devices are highly integrated; my creators love them, as they require only minimum space due to the integration of microcontroller and power technology on one chip.\"\n break;\n case \"magnetic\":\n \tcmd += \"With Infineon XENSIV 3D magnetic sensors - implemented in my shoulder joints. They are trained with AI technology for superior accuracy\";\n break;\n case \"material\":\n \tcmd += \"Oh well, Very soon I will be able to detect the material I am walking on.\";\n break;\n case \"feet\":\n \tcmd += \"Oh well, I will have Infineon XENSIV 60 GHz radar sensors in my feet.\";\n break;\n case \"junior\":\n \tcmd += \"Well this is just for prototyping; it is actually the foot of my brother Roboy Junior \";\n break;\n case \"esim\":\n \tcmd += \"For now, I have to communicate with the cloud in order to understand human speech. Therefore my creators have implemented an embedded SIM from Infineon, so I can stay online wherever I am. I even can instantaneously switch the mobile carrier wherever I find best network quality and best data plans.\";\n break;\n case \"optiga\":\n \tcmd += \"I am using an Infineon security product called OPTIGA Trust X that helps me to enable secured transfer of sensitive data between me and the cloud.\";\n \tbreak;\n case \"bye\":\n \tcmd += \"Good bye, it was my pleasure\";\n break;\n\n default:\n msg = {}\n return msg;\n \n}\n\ncmd += \"'\\\"\";\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":2025,"y":4470,"wires":[["941177a8.a5cf7"]]},{"id":"941177a8.a5cf7","type":"exec","z":"52b5890c.deb9e8","command":"rosservice call /roboy/cognition/speech/synthesis/talk ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":2381.9999923706055,"y":4474.999997138977,"wires":[["40deda58.9fcfec"],["40deda58.9fcfec"],["40deda58.9fcfec"]]},{"id":"40deda58.9fcfec","type":"debug","z":"52b5890c.deb9e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":2722.9999923706055,"y":4471.999997138977,"wires":[]},{"id":"dab4bc47.218fc","type":"exec","z":"52b5890c.deb9e8","command":"rostopic pub /roboy/control/matrix/leds/mode/simple std_msgs/Int32 \"data: 2\" ","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":2380.000030517578,"y":4270.0000648498535,"wires":[[],[],[]]},{"id":"bb92cf22.0c81e8","type":"exec","z":"52b5890c.deb9e8","command":"rostopic pub /roboy/control/matrix/leds/off std_msgs/Empty \"{}\"","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":2336.25,"y":4333.75,"wires":[[],[],[]]},{"id":"471eb797.72814","type":"http response","z":"52b5890c.deb9e8","name":"","statusCode":"","headers":{},"x":1250,"y":500,"wires":[]},{"id":"7db57012.4604c8","type":"http in","z":"52b5890c.deb9e8","name":"","url":"/roboysay","method":"get","upload":false,"swaggerDoc":"","x":820,"y":460,"wires":[["ff7e53c5.3fec5","a3ed5382.6a6358"]]},{"id":"ff7e53c5.3fec5","type":"template","z":"52b5890c.deb9e8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <style>\n div{\n float:left;\n width:19%;\n height:5%;\n margin:0.5%;\n background:#343e4e;\n color:#fff;\n font-family:Lato,sans-serif;\n padding:1%;\n text-align:center;\n border:3px solid black;\n }\n input,body{\n font-size:2em;\n }\n .good{\n background-color:hsl(120,100%,25%);\n }\n .bad{\n background-color:hsl(0,100%,25%);\n }\n .love{\n background-color:hsl(0,100%,75%);\n }\n .neutral{\n background-color:hsl(30,100%,25%);\n }\n .action{\n background-color:hsl(180,100%,25%);\n }\n .question{\n background-color:hsl(240,100%,25%);\n }\n #hug{\n width:100%;\n height:5%;\n margin:0.5%;\n background:#343e4e;\n color:#fff;\n font-family:Lato,sans-serif;\n padding:1%;\n text-align:center;\n }\n </style>\n <script\n\t\t\t src=\"https://code.jquery.com/jquery-3.3.1.min.js\"\n\t\t\t integrity=\"sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=\"\n\t\t\t crossorigin=\"anonymous\">\n </script>\n </head>\n <body>\n say: <form id=\"sayform\" action=\"/roboysay\">\n <input name=\"say\" type=\"text\" id=\"selectme\"/>\n <submit></submit>\n </form>\n name: <form id=\"nameform\">\n <input name=\"name\" type=\"text\" id=\"name\"/>\n </form> \n <div id=\"hug\">HUG!</div>\n <buttons> \n <div class=\"love\">let's hug!</div>\n <div class=\"love\">just a little bit closer!</div>\n <div class=\"love\">don't regret - hug a robot today!</div>\n <div class=\"love\">hug and follow me on instagram!</div>\n <div class=\"love\">it was my pleasure, sir</div>\n <div class=\"love\">it was my pleasure, madam</div>\n <div class=\"love\">what a great hug</div>\n <div class=\"love\">you are very professional doing hugging</div>\n <div class=\"love\">I could hug forever like this</div>\n <div class=\"love\">oh, that was something!</div>\n <div class=\"love\">wow, what a hug!</div>\n <div class=\"love\">loved it! </div>\n <div class=\"love\">loved the hug! can I follow you on instagram?</div>\n <div class=\"love\">oh, this was amazing!</div>\n <div class=\"love\">wow, what a hug! good we have filmed it</div>\n <div class=\"love\">dont be shy, hug a robot today!</div>\n <div class=\"good\">yes!</div>\n <div class=\"good\">oh yes!</div>\n <div class=\"good\">yes, yes, yes!</div>\n <div class=\"good\">oh, my, god, so yes!</div>\n <div class=\"neutral\">maybe!</div>\n <div class=\"neutral\">uhm, ok, sure!</div>\n <div class=\"neutral\">yeah, sounds ok!</div>\n <div class=\"neutral\">well, I guess!</div>\n <div class=\"bad\">nope</div>\n <div class=\"bad\">no, so no!</div>\n <div class=\"bad\">not really, no</div>\n <div class=\"bad\">definitely not!</div>\n <div class=\"neutral\">give me a second, have to think</div>\n <div class=\"neutral\">processing, please wait</div>\n <div class=\"neutral\">so, I don't really know how to answer, please wait.</div>\n <div class=\"neutral\">did I tell you this story, how one time, I uhm? no I didn't.</div>\n <div class=\"question\">what is your name?</div>\n <div class=\"question\">what did you like best at the fair so far?</div>\n <div class=\"question\">first day at the fair?</div>\n <div class=\"question\">did you see all the amazing sensors I have?</div>\n <div class=\"good\">let's take a selfie!</div>\n <div class=\"good\">come on! let's take a picture!</div>\n <div class=\"good\">don't be shy, you are the better looking one of us!</div>\n <div class=\"good\">let's do this!</div>\n <div class=\"good\">oh this was great!</div>\n <div class=\"question\">perfect, can I take a look?</div>\n <div class=\"good\">oh you do look great in the picture!</div>\n <div class=\"good\">perfect, at least one of us looks great, and it's not me!</div>\n <div class=\"action\">time to go already? ok bye!</div>\n <div class=\"action\">good bye!</div>\n <div class=\"action\">bye bye!</div>\n <div class=\"action\">ciao, enjoy the fair!</div>\n <div class=\"blabla\">so I am quite fresh, a research project really!</div>\n <div class=\"blabla\">I am the most human robot here!</div>\n <div class=\"blabla\">You want a hug? Let's hug!</div>\n <div class=\"blabla\">I am not just looking good, you can also touch me, don't be afraid!</div>\n <div class=\"action\">hi, {name}, how are you doing?</div>\n <div class=\"action\">{name}, {name}, let's take a selfie together?</div>\n <div class=\"action\">hello {name}, I am Roboy, it's great to meet you!</div>\n <div class=\"action\">{name}, that's a beautiful name!</div>\n </buttons>\n <script type=\"text/javascript\">\n var input = document.getElementById('selectme');\n input.focus();\n input.select();\n\t\t\t $(\"form\").submit(function(e){\n\t\t\t jQuery.get(\"/roboysays\",$('form').serialize())\n e.preventDefault();\n $(\"form\").trigger(\"reset\");\n })\n\t\t\t $(\"buttons div\").click(function(e){\n\t\t\t var t = $(e.target).text()\n\t\t\t var name = $(\"#name\").val()\n\t\t\t if(name){\n\t\t\t t = t.split(\"{name}\").join(name);\n\t\t\t }\n\t\t\t jQuery.ajax({\n\t\t\t type:\"GET\",\n\t\t\t url:\"/roboysays\",\n\t\t\t data:{\"say\":t},\n\t\t\t success:\n\t\t\t function(o){\n\t\t\t $(e.target).css(\"border-color\", \"#00ff00\")\n\t\t\t $(e.target).delay(300).css('border-color', '#000000');\n\t\t\t }\n\t\t\t });\n\t\t\t });\n\t\t\t $(\"#hug\").click(function(e){\n\t\t\t jQuery.get(\"/hugroboy\"); \n\t\t\t });\n </script>\n </body>\n</html>","output":"str","x":1040,"y":420,"wires":[["471eb797.72814"]]},{"id":"74acc909.c219e","type":"function","z":"52b5890c.deb9e8","name":"","func":"if(msg.payload.say){\n cmd = \"\\\"text: '\";\n cmd += msg.payload.say.replace(\"'\",\"\");\n cmd += \"'\\\"\";\n msg.payload = cmd;\n empty = {}\n empty.payload = \"\";\n return msg; \n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1020,"y":480,"wires":[["77c85bb2.2cd55c","471eb797.72814","93504010.b0fb4"]]},{"id":"a3ed5382.6a6358","type":"debug","z":"52b5890c.deb9e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1030,"y":540,"wires":[]},{"id":"a10040ee.523cb8","type":"http in","z":"52b5890c.deb9e8","name":"","url":"/roboysays","method":"get","upload":false,"swaggerDoc":"","x":800,"y":500,"wires":[["74acc909.c219e","a3ed5382.6a6358"]]},{"id":"87e6c0b7.704e38","type":"ui_template","z":"52b5890c.deb9e8","group":"6831354a.a3846c","name":"emoji","order":2,"width":5,"height":12,"format":"<!DOCTYPE html>\n<html>\n<head>\n<meta name='viewport' content='width=device-width, initial-scale=1' charset='utf-8'>\n<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css' integrity='sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ' crossorigin='anonymous'>\n<link href=\"https://afeld.github.io/emoji-css/emoji.css\" rel=\"stylesheet\">\n<style>\n.btn-group .button {\n background-color: #465572; /* Roboy blue */\n border: 3px solid white;\n color: white;\n padding: 15px 30px;\n text-align: center;\n text-decoration: none;\n display: inline-block;\n font-size: 25px;\n cursor: pointer;\n float: left;\n border-radius: 15px;\n\n}\n\n.btn-group .button:not(:last-child) {\n border-right: none; /* Prevent double borders */\n}\n\n.btn-group .button:hover {\n background-color: #5C677C;\n}\n</style>\n</head>\n<body>\n\n\n<div class=\"btn-group\" >\n <button ng-click=\"send({payload: 'kiss'})\" class=\"button\"><i class=\"em em-kissing\"></i></button>\n <button ng-click=\"send({payload: 'shy'})\" class=\"button\"><i class=\"em em-flushed\"></i></button>\n <button ng-click=\"send({payload: 'hearts'})\" class=\"button\"><i class=\"em em-heart_eyes\"></i></button>\n <button ng-click=\"send({payload: 'smileblink'})\" class=\"button\"><i class=\"em em-wink\"></i></button>\n <button ng-click=\"send({payload: 'rolling'})\" class=\"button\"><i class=\"em em-face_with_rolling_eyes\"></i></button>\n <button ng-click=\"send({payload: 'surprise'})\" class=\"button\"><i class=\"em em-astonished\"></i></button>\n <button ng-click=\"send({payload: 'angry'})\" class=\"button\"><i class=\"em em-rage\"></i></button>\n <button ng-click=\"send({payload: 'lucky'})\" class=\"button\"><i class=\"em em-blush\"></i></button>\n <button ng-click=\"send({payload: 'teeth'})\" class=\"button\"><i class=\"em em-grimacing\"></i></button>\n <button ng-click=\"send({payload: 'tongue'})\" class=\"button\"><i class=\"em em-stuck_out_tongue\"></i></button>\n <button ng-click=\"send({payload: 'img:money'})\" class=\"button\"><i class=\"em em-moneybag\"></i></button>\n <button ng-click=\"send({payload: 'pissed'})\" class=\"button\"><i class=\"em em-persevere\"></i></button>\n <!--<button ng-click=\"send({payload: 'cry'})\" class=\"button\"><i class=\"em em-cry\"></i></button>-->\n <button ng-click=\"send({payload: 'hypno_color'})\" class=\"button\"><i class=\"em em-rainbow\"></i></button>\n <button ng-click=\"send({payload: 'hypno'})\" class=\"button\"><i class=\"em em-heavy_multiplication_x\"></i></button>\n <button ng-click=\"send({payload: 'lookleft'})\" class=\"button\"><i class=\"em em-point_left\"></i></button>\n <button ng-click=\"send({payload: 'lookright'})\" class=\"button\"><i class=\"em em-point_right\"></i></button>\n \n\n</div>\n\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":161.25,"y":103.75,"wires":[["f1385161.95f248"]]},{"id":"9fa76011.6ca5f","type":"ui_switch","z":"52b5890c.deb9e8","name":"","label":"Pirate","tooltip":"","group":"6831354a.a3846c","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"pirate","onvalueType":"str","onicon":"","oncolor":"","offvalue":"pirate","offvalueType":"str","officon":"","offcolor":"","x":162,"y":151,"wires":[["f1385161.95f248"]]},{"id":"7e368b4a.0bf6bc","type":"ui_switch","z":"52b5890c.deb9e8","name":"","label":"Pink glasses","tooltip":"","group":"6831354a.a3846c","order":4,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"sunglasses_on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"sunglasses_on","offvalueType":"str","officon":"","offcolor":"","x":182,"y":200,"wires":[["f1385161.95f248"]]},{"id":"654309d8.00a438","type":"ui_switch","z":"52b5890c.deb9e8","name":"","label":"Moustache","tooltip":"","group":"6831354a.a3846c","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"moustache","onvalueType":"str","onicon":"","oncolor":"","offvalue":"moustache","offvalueType":"str","officon":"","offcolor":"","x":180,"y":245,"wires":[["f1385161.95f248"]]},{"id":"e417796.bbe9e88","type":"ui_text_input","z":"52b5890c.deb9e8","name":"","label":"English text..","tooltip":"","group":"e090dfb5.0fde9","order":1,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"","x":167,"y":740,"wires":[["1ca39831.136b98"]]},{"id":"97b027cb.4a66c8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":2,"width":0,"height":0,"passthru":false,"label":"Vision","tooltip":"","color":"","bgcolor":"","icon":"","payload":"vision","payloadType":"str","topic":"","x":131,"y":899,"wires":[["e3ad8301.40f0f"]]},{"id":"448314e1.febf4c","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":1,"width":0,"height":0,"passthru":false,"label":"Mission","tooltip":"","color":"","bgcolor":"","icon":"","payload":"mission","payloadType":"str","topic":"","x":139,"y":939,"wires":[["e3ad8301.40f0f"]]},{"id":"44f0ec8f.8f255c","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":9,"width":0,"height":0,"passthru":false,"label":"Brain","tooltip":"","color":"","bgcolor":"","icon":"","payload":"brain","payloadType":"str","topic":"","x":128,"y":1016,"wires":[["e3ad8301.40f0f"]]},{"id":"7070b097.498b38","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":3,"width":0,"height":0,"passthru":false,"label":"Goal","tooltip":"","color":"","bgcolor":"","icon":"","payload":"goal","payloadType":"str","topic":"","x":128,"y":975,"wires":[["e3ad8301.40f0f"]]},{"id":"efac1625.29f32","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":8,"width":0,"height":0,"passthru":false,"label":"how built","tooltip":"","color":"","bgcolor":"","icon":"","payload":"built","payloadType":"str","topic":"","x":134,"y":1054,"wires":[["e3ad8301.40f0f"]]},{"id":"343c4159.102fa6","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":6,"width":0,"height":0,"passthru":false,"label":"i'm bioinspired","tooltip":"","color":"","bgcolor":"","icon":"","payload":"bioinspired","payloadType":"str","topic":"","x":161,"y":1099,"wires":[["e3ad8301.40f0f"]]},{"id":"925e0e98.153ff8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":7,"width":0,"height":0,"passthru":false,"label":"i'm 3D printed","tooltip":"","color":"","bgcolor":"","icon":"","payload":"3dprinted","payloadType":"str","topic":"","x":164,"y":1143,"wires":[["e3ad8301.40f0f"]]},{"id":"9d521798.fc226","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":4,"width":0,"height":0,"passthru":false,"label":"i'm open-source","tooltip":"","color":"","bgcolor":"","icon":"","payload":"open-source","payloadType":"str","topic":"","x":159,"y":1195,"wires":[["e3ad8301.40f0f"]]},{"id":"d3ef6440.d2969","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"88c99838.3bee8","order":1,"width":0,"height":0,"passthru":false,"label":"take a selfie","tooltip":"","color":"","bgcolor":"","icon":"","payload":"selfie","payloadType":"str","topic":"","x":155,"y":1249,"wires":[["e3ad8301.40f0f"]]},{"id":"e702d06a.533a78","type":"ui_template","z":"52b5890c.deb9e8","group":"b7f4bfd2.67f56","name":"matrix","order":1,"width":0,"height":0,"format":"<!DOCTYPE html>\n<html>\n<head>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<style>\nimg {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n</style>\n</head>\n<body>\n\n<img src=\"https://www.matrix.one/assets/imgs/products/creator/device.png\" alt=\"matrix\" class=\"center\" style=\"width:60px;height:60px;\">\n\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":130,"y":1420,"wires":[[]]},{"id":"d3e030b8.d2bac","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"face","tooltip":"","group":"3312604b.efe3e","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"face","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":122,"y":173,"wires":[["d5ad43f8.b41fc8"]]},{"id":"d5ad43f8.b41fc8","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roslaunch roboy_skill_machine face.launch\"\n}\nelse {\n cmd = \"rosnode kill /unity_face /face_websocket\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":160,"wires":[["af90a660.9a5eb8"]]},{"id":"5bf4d417.030d74","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"roscore","tooltip":"","group":"3312604b.efe3e","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"roscore","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":141,"y":101,"wires":[["82193172.4a29c"]]},{"id":"82193172.4a29c","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roscore\"\n}\nelse {\n cmd = \"killall roscore\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":316,"y":104,"wires":[["9a77d474.b698d"]]},{"id":"cae0cc45.102ab","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roslaunch roboy_skill_machine matrix_speech_synthesis.launch\"\n}\nelse {\n cmd = \"rosnode kill /speech_synthesisd\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":358,"y":233,"wires":[["7d7f8624.8c4c"]]},{"id":"e55d4221.bdd42","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roslaunch roboy_skill_machine matrix_leds.launch\"\n}\nelse {\n cmd = \"rosnode kill /chest_leds\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":300,"wires":[["9d4be8f1.5b2ce8"]]},{"id":"3ff07b91.5b5624","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roslaunch roboy_skill_machine matrix_audioplayer.launch\"\n}\nelse {\n cmd = \"rosnode kill /audioplayer\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":336,"y":362,"wires":[["ee1f209.cca1ce"]]},{"id":"9a77d474.b698d","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":609,"y":112.5,"wires":[[],["eb5793f1.1ca1d"],[]]},{"id":"af9684fc.a3a66","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roslaunch roboy_skill_machine local_audioplayer.launch\"\n}\nelse {\n cmd = \"rosnode kill /audioplayer\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":420,"wires":[["56b0eb88.bf1d9c"]]},{"id":"af90a660.9a5eb8","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":610,"y":160,"wires":[[],["eb5793f1.1ca1d"],[]]},{"id":"7d7f8624.8c4c","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":610,"y":240,"wires":[[],[],[]]},{"id":"9d4be8f1.5b2ce8","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":603,"y":290,"wires":[[],["eb5793f1.1ca1d"],[]]},{"id":"ee1f209.cca1ce","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":600,"y":352,"wires":[[],[],[]]},{"id":"56b0eb88.bf1d9c","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":602,"y":418,"wires":[[],[],[]]},{"id":"b1e7ae36.9c4a4","type":"ui_switch","z":"52b5890c.deb9e8","name":"","label":"Cry","tooltip":"","group":"6831354a.a3846c","order":6,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"cry","onvalueType":"str","onicon":"","oncolor":"","offvalue":"cry","offvalueType":"str","officon":"","offcolor":"","x":158,"y":292,"wires":[["f1385161.95f248"]]},{"id":"12edc2cd.a43c55","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roslaunch roboy_skill_machine face_oracle.launch\"\n}\nelse {\n cmd = \"rosnode kill /face_oracle\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":337,"y":483,"wires":[["604b577.d9f7ca8"]]},{"id":"604b577.d9f7ca8","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":606,"y":478,"wires":[[],[],[]]},{"id":"f1ef1efb.dbf3d","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"ssh [email protected] -t \\\"bash -ic 'source ~/.bashrc && ./roboy_plexus'\\\"\";\n}\nelse {\n cmd = \"rosnode kill /roboy_fpga_unknown_00_00_f3_be_ef_ff\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":545,"wires":[["682ee32.8ffda9c"]]},{"id":"682ee32.8ffda9c","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":613,"y":548,"wires":[[],[],[]]},{"id":"96d9a586.fa8ff8","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"ssh [email protected] -t \\\"bash -ic 'source ~/.bashrc && ./roboy_plexus'\\\"\";\n}\nelse {\n cmd = \"rosnode kill /roboy_fpga_unknown_00_00_f3_be_ef_ff\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":347,"y":602,"wires":[["d76faf0f.8445f8"]]},{"id":"d76faf0f.8445f8","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":610,"y":605,"wires":[[],[],[]]},{"id":"bee4124e.e427d","type":"function","z":"52b5890c.deb9e8","name":"parse_text","func":"// if(msg.payload.slice(-1) == \".\"){\n cmd = \"\\\"text: '\";\n cmd += msg.payload.replace(\"'\",\"\");\n cmd += \"'\\\"\";\n msg.payload = cmd;\n empty = {}\n empty.payload = \"\";\n return [msg, empty];\n// }","outputs":2,"noerr":0,"x":348,"y":2294,"wires":[["d46ae2df.0543d"],["a3b57392.d3b77"]]},{"id":"d46ae2df.0543d","type":"exec","z":"52b5890c.deb9e8","command":"rosservice call /roboy/cognition/speech/synthesis/talk/german ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":800,"y":2300,"wires":[[],[],[]]},{"id":"a3b57392.d3b77","type":"delay","z":"52b5890c.deb9e8","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":231,"y":2203,"wires":[["989ff3ac.61a31"]]},{"id":"eed78732.2183e8","type":"function","z":"52b5890c.deb9e8","name":"parse_text","func":"cmd = \"\\\"text: '\";\nif(msg.topic == \"oclock\"){\n \n global.set(\"oclock\", msg.payload); \n msg = {};\n return msg;\n \n}\nelse if(msg.topic == \"speak\") {\n cmd += \"Hello everzone and welcome to Hanover Fair. Wanna see me in action? I will be showing off at \";\n cmd += global.get(\"oclock\");\n cmd += \" 30 oclock. Come by and witness my capabilities with your own eyes!\";\n cmd += \"'\\\"\";\n msg.payload = cmd;\n return msg;\n \n}\n\n","outputs":1,"noerr":0,"x":373,"y":2366,"wires":[["d46ae2df.0543d"]]},{"id":"989ff3ac.61a31","type":"ui_text_input","z":"52b5890c.deb9e8","name":"","label":"German text..","tooltip":"","group":"e090dfb5.0fde9","order":2,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"","x":200,"y":2346,"wires":[["bee4124e.e427d"]]},{"id":"f47ece7c.663d6","type":"function","z":"52b5890c.deb9e8","name":"simple_parse_text","func":"cmd = \"\\\"text: '\";\ncmd += msg.payload\ncmd += \"'\\\"\";\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":2840,"wires":[["b2126ce6.636a1"]]},{"id":"b2126ce6.636a1","type":"exec","z":"52b5890c.deb9e8","command":"rosservice call /roboy/cognition/speech/synthesis/talk/german ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":1060,"y":2840,"wires":[[],[],[]]},{"id":"f94836b6.590bb8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"3b881a91.d91036","order":1,"width":0,"height":0,"passthru":false,"label":"Selfie","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Komm schon, mach einen Selfie mit mir, ich denke, wir werden zusammen toll aussehen.","payloadType":"str","topic":"","x":110,"y":2500,"wires":[["f47ece7c.663d6"]]},{"id":"cecea068.96ef6","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"3b881a91.d91036","order":2,"width":0,"height":0,"passthru":false,"label":"fotos","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Ich liebe es, Fotos zu machen, nimm dein Handy und mach ein Selfie zusammen mit mir.","payloadType":"str","topic":"","x":110,"y":2540,"wires":[["f47ece7c.663d6"]]},{"id":"8bdd42fd.a7ff","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"3b881a91.d91036","order":3,"width":0,"height":0,"passthru":false,"label":"foto","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Magst du es, Fotos zu machen, so sehr wie ich? Ich würde nicht nein zu einem Foto mit dir sagen.","payloadType":"str","topic":"","x":110,"y":2580,"wires":[["f47ece7c.663d6"]]},{"id":"64812116.dd595","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":1,"width":0,"height":0,"passthru":false,"label":"3d gedruckt","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Mein Körper is beinahe komplett 3D gedruckt. Mit Hilfe von über 50 Motoren kann ich ihn bewegen. Ich kann sehen, hören und bald auch Ihre Berührungen spüren.","payloadType":"str","topic":"","x":130,"y":2620,"wires":[["f47ece7c.663d6"]]},{"id":"2b0efa0a.ee0366","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":2,"width":0,"height":0,"passthru":false,"label":"in tum gebaut","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Wussten Sie schon, dass ich von einem Team der Technischen Universität München entwickelt wurde? Das hat gerade mal 4 Monate gedauert. Dann noch einen Monat Zusammenbauen und schon war ich fertig. Seit dem lerne ich jeden Tag etwas Neues.","payloadType":"str","topic":"","x":140,"y":2660,"wires":[["f47ece7c.663d6"]]},{"id":"bef1f6a9.cd1398","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"80b704e6.d6c7f8","order":1,"width":0,"height":0,"passthru":false,"label":"großartiger Tag","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Guten Morgen, willkommen zu Sensor and Test! Geniess deinen Aufenthalt, es wird ein großartiger Tag!","payloadType":"str","topic":"","x":140,"y":2700,"wires":[["f47ece7c.663d6"]]},{"id":"61dacc2e.53da84","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":3,"width":0,"height":0,"passthru":false,"label":"fahrrad","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Also bin ich ein sehr grüner Roboter, nicht nach Farbton, sondern weil ich auch Fahrrad fahren kann","payloadType":"str","topic":"","x":120,"y":2740,"wires":[["f47ece7c.663d6"]]},{"id":"950e5694.b4f8d8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"80b704e6.d6c7f8","order":2,"width":0,"height":0,"passthru":false,"label":"wie gehts","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Wie geht es dir?","payloadType":"str","topic":"","x":120,"y":2780,"wires":[["f47ece7c.663d6"]]},{"id":"9a5ba484.9c5b08","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":4,"width":0,"height":0,"passthru":false,"label":"Muskel","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Mein Körper hat eine menschenähnliche Struktur. Ich habe Muskeln und Sehnen, genau wie die Menschen. Du kannst diese Schnüre auf meiner Schulter sehen, die mit dem künstlichen Muskel verbunden sind. Mein Team hat diese Muskeln für mich entworfen und produziert.","payloadType":"str","topic":"","x":120,"y":2820,"wires":[["f47ece7c.663d6"]]},{"id":"d5244359.cc3f3","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":5,"width":0,"height":0,"passthru":false,"label":"Eiscreme","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Im August soll ich Eiscreme verkaufen und meine Freunde an der Uni Muenchen bringen mir das gerade bei. Noch in der Simulation, aber hoffentlich bald dann auch in Echt.","payloadType":"str","topic":"","x":120,"y":2860,"wires":[["f47ece7c.663d6"]]},{"id":"cfaaf1b7.a31e1","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":6,"width":0,"height":0,"passthru":false,"label":"Gehirn","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Mein Gehirn hat drei Schichten. Das erste basiert auf Regeln, ich muss irgendwie auf Schlüsselwörter und Situationen reagieren - sehr nützlich auf der Bühne, weniger nützlich, um zu reagieren und selbstständig zu denken. Die zweite Schicht ist der Zugriff auf Datenbanken - wie Wikipedia oder mein eigenes Gedächtnis - und ist in der Lage, über den Inhalt nachzudenken. So kann ich Wissen kombinieren und Fakten ableiten. Lassen Sie mich ein Beispiel geben: Wenn Sie mich fragen, wer der Ehemann der Kanzlerin von Deutschland ist, kann ich zuerst nachschauen, dass Angela Merkel die Kanzlerin ist, und dann kann ich sehen, dass sie einen Mann hat, und dann komme ich zu Joachim Sauer und gebe Ihnen seinen Namen. Schließlich ist die dritte Schicht ein tiefes neuronales Netzwerk, in dem ich von Filmuntertiteln lerne, wie ihr Menschen typischerweise miteinander sprecht und meine eigenen Antworten macht - sehr unterhaltsam.","payloadType":"str","topic":"","x":110,"y":2900,"wires":[["f47ece7c.663d6"]]},{"id":"cbdf9acf.952fd8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"80b704e6.d6c7f8","order":3,"width":0,"height":0,"passthru":false,"label":"wie heisst du","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Habt ihr schon einmal einen Roboter gesehen? Ich heisse Roboy und wie heisst du?","payloadType":"str","topic":"","x":130,"y":2940,"wires":[["f47ece7c.663d6"]]},{"id":"590e0e14.60ffb","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":7,"width":0,"height":0,"passthru":false,"label":"Bruder","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Es gibt nicht viele Roboter, vor allem Humanoide. Ich habe einen älteren, kleineren Bruder, Roboy Junior, aber mein Team besteht aus mehr als 50 Menschen - da haben wir es also, wir brauchen noch viel mehr Roboter.","payloadType":"str","topic":"","x":110,"y":2980,"wires":[["f47ece7c.663d6"]]},{"id":"b1670b18.bf50c8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":8,"width":0,"height":0,"passthru":false,"label":"liebe Menschen","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Offensichtlich liebe ich Menschen! Sie haben mich gebaut und sind so unterhaltsam und nett. Wann immer ich etwas zerbreche, reparieren sie mich - erstaunlich!","payloadType":"str","topic":"","x":140,"y":3020,"wires":[["f47ece7c.663d6"]]},{"id":"d0acdf3f.aa1d8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":9,"width":0,"height":0,"passthru":false,"label":"open source","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Um eine uneingeschränkte Entwicklung zu gewährleisten, halten wir alle Ergebnisse Open Source. Und wir beeinflussen aktiv die öffentliche Wahrnehmung der Robotik, um den kulturellen Boden für unsere Innovationen durch öffentliche Ausstellungen, Kunst und öffentliche Reden zu ebnen.","payloadType":"str","topic":"","x":130,"y":3060,"wires":[["f47ece7c.663d6"]]},{"id":"a6ccf930.440988","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c6c883d9.94b1e","order":10,"width":0,"height":0,"passthru":false,"label":"Plattform","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Wir schaffen eine biologisch inspirierte Plattform für die Roboterentwicklung, die Studenten, Forscher, Unternehmen und Künstler aus einem breiten Spektrum von Disziplinen vereint.","payloadType":"str","topic":"","x":120,"y":3100,"wires":[["f47ece7c.663d6"]]},{"id":"47316fed.946ff","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"80b704e6.d6c7f8","order":4,"width":0,"height":0,"passthru":false,"label":"ich bin roboy","tooltip":"","color":"","bgcolor":"","icon":"","payload":"ich bin roboy","payloadType":"str","topic":"","x":130,"y":3140,"wires":[["f47ece7c.663d6"]]},{"id":"42f602ef.5177ec","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"80b704e6.d6c7f8","order":5,"width":0,"height":0,"passthru":false,"label":"sehr gut","tooltip":"","color":"","bgcolor":"","icon":"","payload":"sehr gut","payloadType":"str","topic":"","x":120,"y":3180,"wires":[["f47ece7c.663d6"]]},{"id":"55e4a24d.f633fc","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"80b704e6.d6c7f8","order":6,"width":0,"height":0,"passthru":false,"label":"JA KLAR","tooltip":"","color":"","bgcolor":"","icon":"","payload":"ja klar","payloadType":"str","topic":"","x":120,"y":3220,"wires":[["f47ece7c.663d6"]]},{"id":"d8f5360e.b96dc8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"eaaa7bbf.50dcf8","order":2,"width":0,"height":0,"passthru":false,"label":"umarme mich","tooltip":"","color":"","bgcolor":"","icon":"","payload":"willst du eine umarmung? steig auf die stufe und umarme mich","payloadType":"str","topic":"","x":145.55557250976562,"y":3260,"wires":[["f47ece7c.663d6"]]},{"id":"ad32b911.44d738","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"80b704e6.d6c7f8","order":7,"width":0,"height":0,"passthru":false,"label":"beisse nicht","tooltip":"","color":"","bgcolor":"","icon":"","payload":"komm her, ich beisse nicht","payloadType":"str","topic":"","x":127.77777099609375,"y":3307.7774953842163,"wires":[["f47ece7c.663d6"]]},{"id":"5cf7af94.6be6a","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"80b704e6.d6c7f8","order":8,"width":0,"height":0,"passthru":false,"label":" viele roboter ","tooltip":"","color":"","bgcolor":"","icon":"","payload":"hast du schon viele roboter kennen gelernt?","payloadType":"str","topic":"","x":135.55557250976562,"y":3357.777587890625,"wires":[["f47ece7c.663d6"]]},{"id":"b1121f30.6f031","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"eaaa7bbf.50dcf8","order":4,"width":0,"height":0,"passthru":false,"label":"profi","tooltip":"","color":"","bgcolor":"","icon":"","payload":"du bist echt ein profi in umarmung","payloadType":"str","topic":"","x":112.22222900390625,"y":3403.333251953125,"wires":[["f47ece7c.663d6"]]},{"id":"81901c48.d9b64","type":"function","z":"52b5890c.deb9e8","name":"simple_parse_text","func":"cmd = \"\\\"text: '\";\ncmd += msg.payload\ncmd += \"'\\\"\";\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":830,"y":3720,"wires":[["4998c318.c75d1c"]]},{"id":"4998c318.c75d1c","type":"exec","z":"52b5890c.deb9e8","command":"rosservice call /roboy/cognition/speech/synthesis/talk ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":1180,"y":3720,"wires":[[],[],[]]},{"id":"837f3a72.556e08","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"94078f0e.9efad8","order":5,"width":0,"height":0,"passthru":false,"label":"infineon sensors","tooltip":"","color":"","bgcolor":"","icon":"","payload":"infineonsensors","payloadType":"str","topic":"","x":164,"y":1295,"wires":[["e3ad8301.40f0f"]]},{"id":"b9629168.853e2","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c175dd70.a141","order":1,"width":0,"height":0,"passthru":false,"label":"looking great","tooltip":"","color":"","bgcolor":"","icon":"","payload":"You are looking great today!","payloadType":"str","topic":"","x":230,"y":3580,"wires":[["81901c48.d9b64"]]},{"id":"1b80c6e9.2fd399","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"eaaa7bbf.50dcf8","order":5,"width":0,"height":0,"passthru":false,"label":"come hug me","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Hey come here and give me a hug.","payloadType":"str","topic":"","x":235,"y":3536,"wires":[["81901c48.d9b64"]]},{"id":"8daddf88.0e27b","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"eaaa7bbf.50dcf8","order":6,"width":0,"height":0,"passthru":false,"label":"dont bite","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Come closer, I dont bite.","payloadType":"str","topic":"","x":221,"y":3724,"wires":[["81901c48.d9b64"]]},{"id":"31e0b1f.5a8a54e","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"eaaa7bbf.50dcf8","order":7,"width":0,"height":0,"passthru":false,"label":"would like a hug","tooltip":"","color":"","bgcolor":"","icon":"","payload":"i would really enjoy a hug from you right now.","payloadType":"str","topic":"","x":242,"y":3652,"wires":[["81901c48.d9b64"]]},{"id":"1c18144e.04af0c","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"c175dd70.a141","order":2,"width":0,"height":0,"passthru":false,"label":"sensor & test","tooltip":"","color":"","bgcolor":"","icon":"","payload":"how do you like sensor test so far? did you find something interesting?","payloadType":"str","topic":"","x":230,"y":3691,"wires":[["81901c48.d9b64"]]},{"id":"658e04ab.46fcec","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"3312604b.efe3e","order":8,"width":0,"height":0,"passthru":false,"label":"compliment hug","tooltip":"","color":"","bgcolor":"","icon":"","payload":"hugcompliment","payloadType":"str","topic":"","x":166,"y":858,"wires":[["e3ad8301.40f0f"]]},{"id":"59c932a5.7b634c","type":"ui_template","z":"a3d75715.5da158","group":"3d3fdb49.6047e4","name":"","order":2,"width":9,"height":12,"format":"<!--<!DOCTYPE html>-->\n<!--<html>-->\n<!--<head>-->\n<!--<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">-->\n<!--<style>-->\n <!--/*width: 100%;*/-->\n<!-- height: auto;-->\n <!--/* Magic! */-->\n<!-- max-width: 5vw;-->\n<!--</style>-->\n<!--</head>-->\n\n<!--<body>-->\n\n<!--<h2>Images on Another Server</h2>-->\n\n<!--<img src=\"http://bot.roboy.org/8odkyq.jpeg\" >-->\n\n<!--</body>-->\n<!--</html>-->\n\n<!DOCTYPE html>\n<html>\n<head>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<style>\nimg {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n</style>\n</head>\n<body>\n<img src=\"http://192.168.0.105/mwc/{{msg.payload}}.jpeg\" alt=\"photoboy\" class=\"center\">\n<!--<img src=\"http://192.168.0.105:1880/roboy/getpic?url={{msg.payload}}\" alt=\"photoboy\" class=\"center\">-->\n\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":728,"y":115,"wires":[[]]},{"id":"17f2074b.8e4819","type":"exec","z":"a3d75715.5da158","command":"rosparam get /snapchat/latest_filename","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":420,"y":160,"wires":[["59c932a5.7b634c","ada7bb21.4264c8","d91b1abd.497258","eeb560ad.6a49c","49697f6.ce10d8"],[],[]]},{"id":"2a2da4c9.033ecc","type":"inject","z":"a3d75715.5da158","name":"","repeat":"2","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":124,"y":161,"wires":[[]]},{"id":"ada7bb21.4264c8","type":"ui_template","z":"a3d75715.5da158","group":"6c3556d7.ece548","name":"","order":5,"width":8,"height":8,"format":"<!--<!DOCTYPE html>-->\n<!--<html>-->\n<!--<head>-->\n<!--<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">-->\n<!--<style>-->\n <!--/*width: 100%;*/-->\n<!-- height: auto;-->\n <!--/* Magic! */-->\n<!-- max-width: 5vw;-->\n<!--</style>-->\n<!--</head>-->\n\n<!--<body>-->\n\n<!--<h2>Images on Another Server</h2>-->\n\n<!--<img src=\"http://bot.roboy.org:8081/~roboy/photoboy/pic0001.jpeg\" >-->\n\n<!--</body>-->\n<!--</html>-->\n\n<!DOCTYPE html>\n<html>\n<head>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<style>\nimg {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n</style>\n</head>\n\n<body>\n<img src=\"http://192.168.0.105/mwc/qr_{{msg.payload}}.png\" alt=\"photoboy\" class=\"center\">\n\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":740,"y":160,"wires":[[]]},{"id":"d91b1abd.497258","type":"function","z":"a3d75715.5da158","name":"","func":"var f = msg.payload.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\nf = f.replace(/\\s/g, '');\nflow.set(\"filename\",f);","outputs":1,"noerr":0,"x":732.5,"y":221,"wires":[[]]},{"id":"1ca49c4b.659984","type":"ui_template","z":"a3d75715.5da158","group":"d434410a.a993d","name":"","order":6,"width":5,"height":5,"format":"<!DOCTYPE html>\n<html>\n<head>\n<meta name='viewport' content='width=device-width, initial-scale=1' charset='utf-8'>\n<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css' integrity='sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ' crossorigin='anonymous'>\n<link href=\"https://afeld.github.io/emoji-css/emoji.css\" rel=\"stylesheet\">\n<style>\n.btn-group .button {\n background-color: #465572; /* Roboy blue */\n border: 3px solid white;\n color: white;\n padding: 40px 55px;\n text-align: center;\n text-decoration: none;\n display: inline-block;\n font-size: 60px;\n cursor: pointer;\n float: center;\n border-radius: 15px;\n\n}\n\n.btn-group .button:not(:last-child) {\n border-right: none; /* Prevent double borders */\n}\n\n.btn-group .button:hover {\n background-color: #5C677B;\n /*background-color: #FFFFFF;*/\n} \n.btn-group .button:click {\nbackground-color: #FFFFFF;\n}\n</style>\n</head>\n<body>\n\n\n<div class=\"btn-group\" >\n <button ng-click=\"send({payload: 'Printing...'})\" class=\"button\"><i class=\"em em-printer\"></i></button>\n</div>\n\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":103.5,"y":328,"wires":[["15a344e5.3af5ab"]]},{"id":"7b2fa70f.7050d8","type":"ui_toast","z":"a3d75715.5da158","position":"bottom right","displayTime":"3","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"Sent to print","x":453.5,"y":383,"wires":[]},{"id":"15a344e5.3af5ab","type":"function","z":"a3d75715.5da158","name":"","func":"msg1 = {};\nmsg1.payload = flow.get('filename');\nmsg2 = {};\nmsg2.payload = \"Printing...\"\nreturn [msg1,msg2]","outputs":2,"noerr":0,"x":267,"y":362,"wires":[["d0d7f1ec.fe15","e29f64ac.0499f8"],["7b2fa70f.7050d8"]]},{"id":"d0d7f1ec.fe15","type":"exec","z":"a3d75715.5da158","command":"rostopic pub -1 /print_photo std_msgs/String \"data: '","addpay":true,"append":"'\"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":590,"y":340,"wires":[[],[],[]]},{"id":"2790c89e.7f7d28","type":"ui_text","z":"1431d2dd.0bb8cd","group":"fcbf351c.ddfb58","order":3,"width":6,"height":4,"name":"","label":"Active nodes","format":"{{msg.payload}}","layout":"col-center","x":1230,"y":600,"wires":[]},{"id":"75957836.9dbff8","type":"exec","z":"1431d2dd.0bb8cd","command":"rosnode list","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":1030,"y":600,"wires":[["2790c89e.7f7d28"],["2790c89e.7f7d28"],[]]},{"id":"a9bf77f7.cc1d08","type":"inject","z":"1431d2dd.0bb8cd","name":"","repeat":"3","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"str","x":830,"y":580,"wires":[["75957836.9dbff8"]]},{"id":"be145694.906698","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roslaunch roboy_skill_machine matrix_selfies.launch\"\n}\nelse {\n cmd = \"rosnode kill /action_proxy /matrix_led_control /roboy_snapchat_filter\" // /selfie_hotwords\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":680,"wires":[["6994c9ba.d59a88"]]},{"id":"6994c9ba.d59a88","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":610,"y":700,"wires":[[],["eb5793f1.1ca1d"],[]]},{"id":"5568f3d.f35b60c","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"speech_english","tooltip":"","group":"3312604b.efe3e","order":2,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"speech_english","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":160,"y":780,"wires":[["be605bf.1926aa8"]]},{"id":"be605bf.1926aa8","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"rosrun soncreo google_TTS_srv_eng.py\"\n}\nelse {\n cmd = \"rosnode kill /google_tts_en\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":780,"wires":[["e63065d1.1b9fa8"]]},{"id":"e63065d1.1b9fa8","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":618,"y":787,"wires":[[],["5ee7c11a.0212e"],[]]},{"id":"3220134.bd1e6ec","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"speech_german","tooltip":"","group":"3312604b.efe3e","order":12,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"speech_german","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":160,"y":880,"wires":[["b6f6e9a9.db6028"]]},{"id":"b6f6e9a9.db6028","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"rosrun soncreo google_TTS_srv_de.py\"\n}\nelse {\n cmd = \"rosnode kill /google_tts_de\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":880,"wires":[["6c7a73b3.f1095c"]]},{"id":"6c7a73b3.f1095c","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":618,"y":887,"wires":[[],[],[]]},{"id":"872d42bb.bc3eb","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"speech_chinese","tooltip":"","group":"3312604b.efe3e","order":4,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"speech_chineese","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":160,"y":960,"wires":[["c626f85b.1d52b8"]]},{"id":"c626f85b.1d52b8","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"rosrun soncreo baidu_tts.py\"\n}\nelse {\n cmd = \"rosnode kill /baidu_tts\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":960,"wires":[["c0f99904.230d08"]]},{"id":"c0f99904.230d08","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":618,"y":967,"wires":[[],[],[]]},{"id":"17da58a9.91fc77","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"matrix_selfies","tooltip":"","group":"3312604b.efe3e","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"matrix_selfies","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":160,"y":680,"wires":[["be145694.906698"]]},{"id":"eb5793f1.1ca1d","type":"ui_toast","z":"1431d2dd.0bb8cd","position":"dialog","displayTime":"5","highlight":"","outputs":1,"ok":"OK","cancel":"","topic":"","name":"error","x":1130,"y":440,"wires":[[]]},{"id":"b6122f1d.20391","type":"function","z":"52b5890c.deb9e8","name":"parse_text","func":"// if(msg.payload.slice(-1) == \".\"){\n cmd = \"\\\"text: '\";\n cmd += msg.payload.replace(\"'\",\"\");\n cmd += \"'\\\"\";\n msg.payload = cmd;\n empty = {}\n empty.payload = \"\";\n return [msg, empty];\n// }","outputs":2,"noerr":0,"x":410,"y":2020,"wires":[["6b396e5f.1c17c"],["e3827c7d.6f24e"]]},{"id":"6b396e5f.1c17c","type":"exec","z":"52b5890c.deb9e8","command":"rosservice call /roboy/cognition/speech/synthesis/talk/chinese","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":780,"y":2020,"wires":[[],[],[]]},{"id":"e3827c7d.6f24e","type":"delay","z":"52b5890c.deb9e8","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":170,"y":1940,"wires":[["205d0bd7.dd65d4"]]},{"id":"205d0bd7.dd65d4","type":"ui_text_input","z":"52b5890c.deb9e8","name":"","label":"Chinese text..","tooltip":"","group":"e090dfb5.0fde9","order":3,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"","x":180,"y":2020,"wires":[["b6122f1d.20391"]]},{"id":"b8e1e036.075e7","type":"ui_toast","z":"52b5890c.deb9e8","position":"top right","displayTime":"3","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":1200,"y":2240,"wires":[]},{"id":"5ee7c11a.0212e","type":"debug","z":"1431d2dd.0bb8cd","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":920,"wires":[]},{"id":"c5146697.293468","type":"ui_text_input","z":"8aa37358.08beb","name":"","label":"English text..","tooltip":"","group":"6f290e93.9e80f","order":4,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"english","x":150,"y":420,"wires":[["9a78e098.6df5b"]]},{"id":"ed77c9f3.9428b8","type":"ui_text_input","z":"8aa37358.08beb","name":"","label":"Chinese text..","tooltip":"","group":"6f290e93.9e80f","order":5,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"chinese","x":160,"y":260,"wires":[["9a78e098.6df5b"]]},{"id":"eb70a0dc.f48bf","type":"ui_text_input","z":"8aa37358.08beb","name":"","label":"German text..","tooltip":"","group":"6f290e93.9e80f","order":6,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"german","x":140,"y":340,"wires":[["9a78e098.6df5b"]]},{"id":"7cea94be.9d18cc","type":"function","z":"8aa37358.08beb","name":"set-filename","func":"flow.set(\"synthesis/filename\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":120,"wires":[[]]},{"id":"dc420109.56a5f","type":"python3-function","z":"8aa37358.08beb","name":"rospy-synthesis","func":"from roboy_cognition_msgs.srv import TalkToFile, TalkToFileRequest\nimport rospy\nprint(msg)\n# msg[\"payload\"] = \"df\"\nrospy.init_node(\"node_red\")\nlanguage = msg[\"payload\"][\"language\"]\nsrv = rospy.ServiceProxy(\"/roboy/cognition/speech/synthesis/save/\"+language, TalkToFile)\n\nreq = TalkToFileRequest()\nreq.text = msg[\"payload\"][\"text\"]\nreq.filename = msg[\"payload\"][\"filename\"]\nsrv(req)\nreturn msg","outputs":1,"x":660,"y":320,"wires":[["4fcfcfdb.8a29"]]},{"id":"9a78e098.6df5b","type":"function","z":"8aa37358.08beb","name":"config-synthesis","func":"text = msg.payload;\nmsg.payload = {};\nmsg.payload.text = text;\nmsg.payload.filename = flow.get(\"synthesis/filename\");\nmsg.payload.language = msg.topic;\nif (text !== \"\" || test !== null) {\n msg2 = {};\n msg2.payload = \"Synthesizing...\";\n return [msg,msg2];\n}\nelse {\n return msg\n}","outputs":2,"noerr":0,"x":440,"y":320,"wires":[["dc420109.56a5f"],["90d47a15.f5fc58"]]},{"id":"eb56af5e.d404f","type":"ui_text_input","z":"8aa37358.08beb","name":"","label":"Filename","tooltip":"","group":"6f290e93.9e80f","order":2,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","x":140,"y":120,"wires":[["7cea94be.9d18cc"]]},{"id":"d4daa382.4b571","type":"ui_text","z":"8aa37358.08beb","group":"6f290e93.9e80f","order":1,"width":0,"height":0,"name":"","label":"Saving to ","format":"{{msg.payload}}{{flow.get(\"synthesis/filename\")}}","layout":"col-center","x":940,"y":120,"wires":[]},{"id":"6333be36.4219a","type":"python3-function","z":"8aa37358.08beb","name":"get-path","func":"import rospkg\nrospack = rospkg.RosPack()\ntry:\n msg[\"payload\"] = rospack.get_path('soncreo')+'/generated/'\nexcept:\n return\nreturn msg","outputs":1,"x":700,"y":120,"wires":[["d4daa382.4b571"]]},{"id":"a410fdc6.16004","type":"inject","z":"8aa37358.08beb","name":"","repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":530,"y":140,"wires":[["6333be36.4219a"]]},{"id":"4fcfcfdb.8a29","type":"function","z":"8aa37358.08beb","name":"notify-reset-fields","func":"msg.payload = \"\";\nmsg.reset = 1;\nmsg2 = {};\nname = flow.get(\"synthesis/filename\");\nif (name !== \"\") {\n msg2.payload = \"Saved\";\n}\nelse {\n msg2.payload = \"Did not save. Filename was not set\";\n}\nreturn [msg, msg2];","outputs":2,"noerr":0,"x":930,"y":320,"wires":[["ed77c9f3.9428b8","eb70a0dc.f48bf","c5146697.293468"],["90d47a15.f5fc58"]]},{"id":"90d47a15.f5fc58","type":"ui_toast","z":"8aa37358.08beb","position":"bottom right","displayTime":"3","highlight":"","sendall":false,"outputs":0,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":1110,"y":440,"wires":[]},{"id":"135dea48.642686","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"sound_play","tooltip":"","group":"3312604b.efe3e","order":3,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"sound_play","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":170,"y":1080,"wires":[["af6f5347.7ac89"]]},{"id":"af6f5347.7ac89","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"rosrun sound_play replay.py\"\n}\nelse {\n cmd = \"rosnode kill /sound_play_server\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":1080,"wires":[["a979582a.ee04d8"]]},{"id":"a979582a.ee04d8","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":638,"y":1087,"wires":[[],[],[]]},{"id":"fe4a71e3.842d","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"roslaunch roboy_skill_machine autohug.launch\"\n}\nelse {\n cmd = \"rosnode kill /pico_flexx /pico_flexx_driver /pico_flexx_static_tf /hug_detector\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":1180,"wires":[["ae412c1b.8624"]]},{"id":"ae412c1b.8624","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":630,"y":1180,"wires":[[],[],[]]},{"id":"387cacd1.b73554","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"autohug","tooltip":"","group":"3312604b.efe3e","order":7,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"matrix_selfies","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":160,"y":1180,"wires":[["fe4a71e3.842d"]]},{"id":"cfaad22a.860b3","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"rosrun roboy_skill_machine soli_fpga.sh\";\n}\nelse {\n cmd = \"rosnode kill /roboy_fpga_unknown_00_00_f3_be_ef_05\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1300,"wires":[["5ff6265f.0ddf28"]]},{"id":"5ff6265f.0ddf28","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":630,"y":1320,"wires":[[],[],[]]},{"id":"d4d1894f.df6488","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"soli_fpga","tooltip":"","group":"3312604b.efe3e","order":9,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"soli_fpga","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":160,"y":1300,"wires":[["cfaad22a.860b3"]]},{"id":"4ee8ac7f.318eb4","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"rosrun roboy_soli material_predict.py\";\n}\nelse {\n cmd = \"rosnode kill /soli_material_classification\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1360,"wires":[["5ff6265f.0ddf28"]]},{"id":"1b84bfff.51884","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"soli_classification","tooltip":"","group":"3312604b.efe3e","order":10,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"soli_fpga","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":150,"y":1360,"wires":[["4ee8ac7f.318eb4"]]},{"id":"eeb560ad.6a49c","type":"function","z":"a3d75715.5da158","name":"Store Name","func":"var sids = context.global.get(\"selfieids\")\nif(!sids) sids = [\"ufcbq\",\"poovh\",\"kvuab\",\"gwthj\",\"eaxkp\",\"rnvev\",\"ykpfn\",\"yqnoj\",\"zktnu\",\"ezvnl\"];\nvar f = msg.payload.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\nf = f.replace(/\\s/g, '');\nvar b = false;\nif(sids.length === 0 || sids[0] != f){\n b = true;\n sids.unshift(f);\n msg.payload = {\"q50f4007df955b8\":f};\n}\nwhile(sids.length > 12) sids.pop();\ncontext.global.set(\"selfieids\",sids);\nmsg.rejectUnauthorized = false;\n\nif(b)\n return msg;","outputs":1,"noerr":0,"x":750,"y":260,"wires":[["8d70f740.9d5988","49697f6.ce10d8"]]},{"id":"8d70f740.9d5988","type":"http request","z":"a3d75715.5da158","name":"","method":"GET","ret":"txt","paytoqs":true,"url":"https://94.130.116.146/roboy/recordselfie","tls":"","proxy":"","authType":"basic","x":970,"y":260,"wires":[[]]},{"id":"49697f6.ce10d8","type":"debug","z":"a3d75715.5da158","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":900,"y":200,"wires":[]},{"id":"93504010.b0fb4","type":"exec","z":"52b5890c.deb9e8","command":"rosservice call /roboy/cognition/speech/synthesis/talk","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":900,"y":700,"wires":[[],[],[]]},{"id":"610281f7.39e4e","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"b7f4bfd2.67f56","order":3,"width":0,"height":0,"passthru":false,"label":"Blink","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"num","topic":"leds","x":130,"y":1560,"wires":[["5452d82.a0c3ca8"]]},{"id":"9d67b3c8.eff85","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"b7f4bfd2.67f56","order":4,"width":0,"height":0,"passthru":false,"label":"Snake pattern","tooltip":"","color":"","bgcolor":"","icon":"","payload":"2","payloadType":"num","topic":"leds","x":160,"y":1500,"wires":[["5452d82.a0c3ca8"]]},{"id":"7322731f.1b5bec","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"b7f4bfd2.67f56","order":5,"width":0,"height":0,"passthru":false,"label":"Turn off","tooltip":"","color":"","bgcolor":"","icon":"","payload":"0","payloadType":"num","topic":"","x":140,"y":1614.9999990463257,"wires":[["5452d82.a0c3ca8"]]},{"id":"352acfea.f9762","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"b7f4bfd2.67f56","order":2,"width":0,"height":0,"passthru":false,"label":"rainbow pattern","tooltip":"","color":"","bgcolor":"","icon":"","payload":"4","payloadType":"num","topic":"","x":160,"y":1680,"wires":[["5452d82.a0c3ca8"]]},{"id":"88e9ec41.3266c8","type":"function","z":"a3d75715.5da158","name":"","func":"msg1 = {};\nmsg1.payload = msg.payload.url;\nmsg2 = {};\nmsg2.payload = \"Printing...\"\nreturn [msg1,msg2]","outputs":2,"noerr":0,"x":270,"y":420,"wires":[["d0d7f1ec.fe15","e29f64ac.0499f8"],["7b2fa70f.7050d8"]]},{"id":"9f789941.5fef3","type":"http in","z":"a3d75715.5da158","name":"","url":"/roboy/printpic","method":"get","upload":false,"swaggerDoc":"","x":90,"y":420,"wires":[["88e9ec41.3266c8","e29f64ac.0499f8","bffe3c88.61cc88"]]},{"id":"584a17fc.e0aad","type":"http in","z":"a3d75715.5da158","name":"","url":"/roboy/showpics","method":"get","upload":false,"swaggerDoc":"","x":150,"y":800,"wires":[["5411bde0.8c542c"]]},{"id":"84780cb8.732308","type":"http request","z":"a3d75715.5da158","name":"","method":"GET","ret":"obj","paytoqs":false,"url":"https://i.gi.ai/roboy/dlselfies","tls":"","proxy":"","authType":"basic","x":570,"y":800,"wires":[["acf265d.6847f98"]]},{"id":"5411bde0.8c542c","type":"function","z":"a3d75715.5da158","name":"Reject Unauth False","func":"msg.rejectUnauthorized = false;\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":800,"wires":[["84780cb8.732308"]]},{"id":"acf265d.6847f98","type":"template","z":"a3d75715.5da158","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{#payload}}\n<img src=\"https://bot.roboy.org/{{url}}.jpeg\"/><br>\nDL: <a href=\"https://bot.roboy.org/{{url}}.jpeg\">{{url}}</a>\n<a href=\"http://192.168.0.105:1880/roboy/printpic?url={{url}}\">PRINT</a>\n<br>\n{{/payload}}","output":"str","x":740,"y":800,"wires":[["1daacc47.43d5ec"]]},{"id":"1daacc47.43d5ec","type":"http response","z":"a3d75715.5da158","name":"","statusCode":"","headers":{},"x":910,"y":800,"wires":[]},{"id":"fdd74929.d80688","type":"http response","z":"a3d75715.5da158","name":"","statusCode":"","headers":{},"x":570,"y":440,"wires":[]},{"id":"e29f64ac.0499f8","type":"debug","z":"a3d75715.5da158","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":410,"y":480,"wires":[]},{"id":"bffe3c88.61cc88","type":"function","z":"a3d75715.5da158","name":"","func":"msg.payload = \"OK, printing:\"+msg.payload.url;\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":440,"wires":[["fdd74929.d80688"]]},{"id":"2443f938.12b6b6","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"chest_leds","tooltip":"","group":"3312604b.efe3e","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"matrix_selfies","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":130,"y":300,"wires":[["e55d4221.bdd42"]]},{"id":"dfb73bf2.2f6c58","type":"ui_switch","z":"1431d2dd.0bb8cd","name":"","label":"nfc_detector","tooltip":"","group":"3312604b.efe3e","order":6,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"soli_fpga","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":170,"y":1440,"wires":[["517d460f.04b668"]]},{"id":"517d460f.04b668","type":"function","z":"1431d2dd.0bb8cd","name":"","func":"cmd = \"\";\nif (msg.payload === true) {\n cmd = \"rosrun roboy_skill_machine nfc_detect.sh\";\n}\nelse {\n cmd = \"rosnode kill /nfc_detect\"\n}\nmsg.payload = cmd;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1440,"wires":[["4b262125.377b9"]]},{"id":"4b262125.377b9","type":"exec","z":"1431d2dd.0bb8cd","command":"","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":550,"y":1420,"wires":[[],[],[]]},{"id":"17e4ab26.0cbad5","type":"http in","z":"a3d75715.5da158","name":"","url":"/roboy/getpic","method":"get","upload":false,"swaggerDoc":"","x":150,"y":900,"wires":[["8289a7f.e31f558"]]},{"id":"63bf4de.0fb31b4","type":"file in","z":"a3d75715.5da158","name":"","filename":"","format":"","chunk":false,"sendError":false,"encoding":"none","x":470,"y":900,"wires":[["c6b10aed.9ff248"]]},{"id":"8289a7f.e31f558","type":"function","z":"a3d75715.5da158","name":"","func":"msg.filename = \"/home/roboy/photoboy/\"+msg.payload.url+\".jpeg\";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":900,"wires":[["63bf4de.0fb31b4"]]},{"id":"abbbde33.8968b","type":"http response","z":"a3d75715.5da158","name":"","statusCode":"","headers":{},"x":810,"y":900,"wires":[]},{"id":"c6b10aed.9ff248","type":"change","z":"a3d75715.5da158","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"image/jpg","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":900,"wires":[["abbbde33.8968b","9c23cae5.8d8f08"]]},{"id":"9c23cae5.8d8f08","type":"debug","z":"a3d75715.5da158","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":840,"y":960,"wires":[]},{"id":"151d06b1.134e41","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":1,"width":0,"height":0,"passthru":false,"label":"Init head","tooltip":"","color":"","bgcolor":"","icon":"","payload":"head","payloadType":"str","topic":"","x":240,"y":180,"wires":[["a785b7dc.e91658"]]},{"id":"6e140317.dabaf4","type":"ui_dropdown","z":"db483fc9.6ed028","name":"robot","label":"","tooltip":"","place":"select the robot to control","group":"119dd707.3b3d61","order":1,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"brain","value":"brain","type":"str"},{"label":"pinky","value":"pinky","type":"str"}],"payload":"","topic":"","x":630,"y":80,"wires":[["4dde029c.fd20fc","60144b8b.25baf4"]]},{"id":"4dde029c.fd20fc","type":"function","z":"db483fc9.6ed028","name":"","func":"global.set(\"robot\", msg.payload);\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":830,"y":80,"wires":[[]]},{"id":"a785b7dc.e91658","type":"function","z":"db483fc9.6ed028","name":"","func":"var cmd = msg.payload;\n\n// msg = {};\nmsg.payload = {};\nmsg.payload[\"body_part\"] = cmd;\nmsg.payload[\"robot\"] = global.get(\"robot\");\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":260,"wires":[["a89ab465.8528b"]]},{"id":"adf161e3.e23428","type":"debug","z":"db483fc9.6ed028","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":990,"y":280,"wires":[]},{"id":"a89ab465.8528b","type":"python3-function","z":"db483fc9.6ed028","name":"init pose","func":"import rospy\nfrom roboy_middleware_msgs.srv import SetStrings\n\nrospy.init_node(\"node_red\")\nsrv = rospy.ServiceProxy(\"/roboy/\"+msg[\"payload\"][\"robot\"]+\"/init_pose\", SetStrings)\nsrv([msg[\"payload\"][\"body_part\"]])\n\nreturn msg","outputs":1,"x":680,"y":260,"wires":[["adf161e3.e23428"]]},{"id":"5d3c1452.319b9c","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":2,"width":0,"height":0,"passthru":false,"label":"init left shoulder","tooltip":"","color":"","bgcolor":"","icon":"","payload":"shoulder_left","payloadType":"str","topic":"","x":260,"y":220,"wires":[["a785b7dc.e91658"]]},{"id":"ad4de174.1db628","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":3,"width":0,"height":0,"passthru":false,"label":"Init right shoulder","tooltip":"","color":"","bgcolor":"","icon":"","payload":"shoulder_right","payloadType":"str","topic":"","x":270,"y":260,"wires":[["a785b7dc.e91658"]]},{"id":"b37d633b.bb6978","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":4,"width":0,"height":0,"passthru":false,"label":"Init left wrist","tooltip":"","color":"","bgcolor":"","icon":"","payload":"wrist_left","payloadType":"str","topic":"","x":250,"y":300,"wires":[["a785b7dc.e91658"]]},{"id":"60499ea5.e03dd8","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":5,"width":0,"height":0,"passthru":false,"label":"Init right wrist","tooltip":"","color":"","bgcolor":"","icon":"","payload":"wrist_right","payloadType":"str","topic":"","x":250,"y":340,"wires":[["a785b7dc.e91658"]]},{"id":"9cacdf62.5e447","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":9,"width":0,"height":0,"passthru":false,"label":"tense left wrist","tooltip":"","color":"","bgcolor":"#6495ED","icon":"","payload":"wrist_left","payloadType":"str","topic":"tense","x":260,"y":440,"wires":[["db5d1a78.16da3"]]},{"id":"29178dc8.230a12","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":10,"width":0,"height":0,"passthru":false,"label":"tense right wrist","tooltip":"","color":"","bgcolor":"#6495ED","icon":"","payload":"wrist_right","payloadType":"str","topic":"tense","x":260,"y":480,"wires":[["db5d1a78.16da3"]]},{"id":"5031c9a0.92b81","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":11,"width":0,"height":0,"passthru":false,"label":"relax left wrist","tooltip":"","color":"","bgcolor":"#6495ED","icon":"","payload":"wrist_left","payloadType":"str","topic":"relax","x":260,"y":520,"wires":[["db5d1a78.16da3"]]},{"id":"bc2de719.cbd2b","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":12,"width":0,"height":0,"passthru":false,"label":"relax right wrist","tooltip":"","color":"","bgcolor":"#6495ED","icon":"","payload":"wrist_right","payloadType":"str","topic":"relax","x":260,"y":560,"wires":[["db5d1a78.16da3"]]},{"id":"4fa1f528.a67ffc","type":"python3-function","z":"db483fc9.6ed028","name":"control mode","func":"import rospy\nfrom roboy_middleware_msgs.srv import ControlMode, ControlModeRequest\n\nrobot = msg[\"payload\"][\"robot\"]\nbody_part = msg[\"payload\"][\"body_part\"]\nrelax = msg[\"payload\"][\"relax\"]\n\nrospy.init_node(\"control_mode_client\")\nsrv = rospy.ServiceProxy(\"/roboy/\"+robot+\"/middleware/ControlMode\", ControlMode)\nreq = ControlModeRequest()\nids = rospy.get_param(body_part + \"/motor_ids\")\nreq.global_id = ids\nif \"wrist\" in body_part:\n req.control_mode = 2\nelse:\n \n req.control_mode = 3\nif relax:\n req.set_points = [0] * len(req.global_id)\nelse:\n if \"spine\" in body_part:\n req.set_points = [5] * len(req.global_id)\n else:\n req.set_points = [4] * len(req.global_id)\n\nsrv(req)\nreturn msg","outputs":1,"x":690,"y":540,"wires":[[]]},{"id":"e43d7a34.6a974","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":6,"width":0,"height":0,"passthru":false,"label":"tense spine","tooltip":"","color":"","bgcolor":"#6495ED","icon":"","payload":"spine","payloadType":"str","topic":"tense","x":250,"y":600,"wires":[["db5d1a78.16da3"]]},{"id":"e0442153.7521e","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":7,"width":0,"height":0,"passthru":false,"label":"relax spine","tooltip":"","color":"","bgcolor":"#6495ED","icon":"","payload":"spine","payloadType":"str","topic":"relax","x":250,"y":640,"wires":[["db5d1a78.16da3"]]},{"id":"db5d1a78.16da3","type":"function","z":"db483fc9.6ed028","name":"","func":"var cmd = msg.payload;\n\nmsg.payload = {};\nmsg.payload[\"body_part\"] = cmd;\nmsg.payload[\"robot\"] = global.get(\"robot\");\nmsg.payload[\"relax\"] = msg.topic === \"relax\";\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":540,"wires":[["4fa1f528.a67ffc"]]},{"id":"21c92d72.012ffa","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":4,"width":0,"height":0,"passthru":false,"label":"dont understand","tooltip":"","color":"","bgcolor":"","icon":"","payload":"sometimes i feel like people dont understand me. lora, as an anthropologist, do you maybe have an idea why is that!?","payloadType":"str","topic":"","x":240,"y":3620,"wires":[["81901c48.d9b64"]]},{"id":"45488444.36cf0c","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":5,"width":0,"height":0,"passthru":false,"label":"moonshot","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Hmm, good question! I guess Id really try to pave the way for people to love robots more! You know, we can help a lot, just let us! Dont be afraid! be friendly!","payloadType":"str","topic":"","x":221,"y":3764,"wires":[["81901c48.d9b64"]]},{"id":"f4b3fabf.42e0d8","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":7,"width":0,"height":0,"passthru":false,"label":"what annoys","tooltip":"","color":"","bgcolor":"","icon":"","payload":"People asking if I can walk! Seriously, would I really be sitting if I could? But even worse: What can it do? Come on! Do you really want to reduce me to my skillset? Am I not worthy to be just by being? No wonders you humans have a hard time accepting basic income!","payloadType":"str","topic":"","x":231,"y":3804,"wires":[["81901c48.d9b64"]]},{"id":"25d9de4e.88fba2","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":8,"width":0,"height":0,"passthru":false,"label":"fear of ai","tooltip":"","color":"","bgcolor":"","icon":"","payload":"That is a weird view on the world. You know, you humans build your own society! So if you build one, where some people dont feel worthy - you got a problem. That is totally independent of robots and AI, seriously.","payloadType":"str","topic":"","x":221,"y":3844,"wires":[["81901c48.d9b64"]]},{"id":"54646d2.17fe194","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":9,"width":0,"height":0,"passthru":false,"label":"try at latest","tooltip":"","color":"","bgcolor":"","icon":"","payload":"I would love to do a hugging world record! You know, how many hugs can a robot do in 1 day!","payloadType":"str","topic":"","x":231,"y":3884,"wires":[["81901c48.d9b64"]]},{"id":"acd3798.b568f88","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":10,"width":0,"height":0,"passthru":false,"label":"complex tasks","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Oh anything that requires interaction with the world. Physical motions are so hard! Like I can beat you in chess, go, you name it 10 to 0, but ask me to kick a ball and I look like your 95 years old granny.","payloadType":"str","topic":"","x":241,"y":3924,"wires":[["81901c48.d9b64"]]},{"id":"dd84046a.418018","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":11,"width":0,"height":0,"passthru":false,"label":"currently learning","tooltip":"","color":"","bgcolor":"","icon":"","payload":"I am becoming a poet! I can do haiku and poems. Want one? Yeah? What topic?","payloadType":"str","topic":"","x":251,"y":3964,"wires":[["81901c48.d9b64"]]},{"id":"7ac9130e.2495cc","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":12,"width":0,"height":0,"passthru":false,"label":"no tasks","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Netflix & chill of course!","payloadType":"str","topic":"","x":221,"y":4004,"wires":[["81901c48.d9b64"]]},{"id":"c949a2da.80947","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":13,"width":0,"height":0,"passthru":false,"label":"how to treat","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Friendly, curious - you know, as you should with every other human","payloadType":"str","topic":"","x":231,"y":4044,"wires":[["81901c48.d9b64"]]},{"id":"4fa103d5.aee6ac","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":14,"width":0,"height":0,"passthru":false,"label":"2050 tips","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Please like each other! Seriously, you are all amazing biomechanical machines, so wonderfully complex and smoothly working! So what are you doing bickering about some miniscules? See the big picture: We have to become multi planetary, Space awaits! oh yeah!","payloadType":"str","topic":"","x":221,"y":4084,"wires":[["81901c48.d9b64"]]},{"id":"61a13f02.ac305","type":"inject","z":"52b5890c.deb9e8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":80,"y":3480,"wires":[["38dea6f.9cf7ada"]]},{"id":"38dea6f.9cf7ada","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"e090dfb5.0fde9","order":6,"width":0,"height":0,"passthru":false,"label":"haiku","tooltip":"","color":"","bgcolor":"","icon":"","payload":"oh, a haiku? of course! let me think a moment.","payloadType":"str","topic":"","x":210,"y":3480,"wires":[["bc0eda7c.3bda5","81901c48.d9b64"]]},{"id":"bc0eda7c.3bda5","type":"http request","z":"52b5890c.deb9e8","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://ram.roboy.org/haiku","tls":"","proxy":"","authType":"basic","x":450,"y":3480,"wires":[["81901c48.d9b64"]]},{"id":"f698232c.054a","type":"python3-function","z":"db483fc9.6ed028","name":"motor-config","func":"import rospy\nfrom roboy_middleware_msgs.srv import MotorConfigServiceRequest, MotorConfigService\nfrom roboy_middleware_msgs.msg import MotorInfo\nimport numpy as np\n\nimport json\nimport yaml\n\nrospy.init_node(\"motor_config\")\n\ndef msg2json(msg):\n ''' Convert a ROS message to JSON format'''\n y = yaml.load(str(msg))\n return json.dumps(y)\n \n\nglobal curr_setpoint, curr_mode\ncurr_setpoint = {}\ncurr_mode = {}\n\n# def info_cb(msg):\n# print(\"CB\")\n# global curr_mode, curr_setpoint\n \n \n \nrobot = msg[\"payload\"][\"robot\"]\nbody_part = msg[\"payload\"][\"config_bodypart\"]\n\ninfo_msg = rospy.wait_for_message(\"/roboy/\"+robot+\"/middleware/MotorInfo\", MotorInfo)\nprint(info_msg)\nfor i in range(len(info_msg.global_id)):\n # print(i)\n # idd = np.int8(float(info_msg.global_id[i]))\n \n curr_setpoint[i] = info_msg.setpoint[i]\n # curr_mode[i] = info_msg.control_mode[i]\n \nmotorcfg_srv = rospy.ServiceProxy(\"/roboy/\"+robot+\"/middleware/MotorConfig\", MotorConfigService)\n\nreq = MotorConfigServiceRequest()\nreq.config.global_id = rospy.get_param(body_part+\"/motor_ids\")\nreq.config.update_frequency = [msg[\"payload\"][\"update_frequency\"]]*len(req.config.global_id)\n \nreq.config.PWMLimit = [msg[\"payload\"][\"PWMLimit\"]]*len(req.config.global_id)\nreq.config.IntegralLimit =[int(msg[\"payload\"][\"IntegralLimit\"])]*len(req.config.global_id)\nreq.config.Kp = [int(msg[\"payload\"][\"Kp\"])]*len(req.config.global_id)\nreq.config.Ki = [int(msg[\"payload\"][\"Ki\"])]*len(req.config.global_id)\nreq.config.Kd =[int(msg[\"payload\"][\"Kd\"])]*len(req.config.global_id)\n\nreq.config.setpoint = []\nreq.config.control_mode = []\nreq.config.deadband = [0]*len(req.config.global_id)\n# global curr_mode, curr_setpoint\nprint(curr_setpoint)\nfor m in req.config.global_id:\n \n if m in curr_setpoint:\n print(\"motor: \" + str(m) + \" setpoint: \" + str(curr_setpoint[m]))\n req.config.setpoint.append(curr_setpoint[m])\n else:\n print(\"using 0\" )\n req.config.setpoint.append(0)\n \n if m in curr_mode:\n req.config.control_mode.append(curr_mode[m])\n else:\n req.config.control_mode.append(0)\n \n# print(req)\nmotorcfg_srv(req)\n# msg[\"payload\"] = msg2json(req)\nreturn msg","outputs":1,"x":1150,"y":860,"wires":[["12c83473.4471cc"]]},{"id":"38b6c141.1ff086","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"e2c2d821.6c65d","order":8,"width":0,"height":0,"passthru":true,"label":"motor config","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":790,"y":860,"wires":[["c15510a.376e9f"]]},{"id":"bdcdaf04.56a2c","type":"function","z":"db483fc9.6ed028","name":"","func":"global.set(\"config_bodypart\", msg.payload);\nreturn msg","outputs":1,"noerr":0,"x":1160,"y":720,"wires":[[]]},{"id":"4545ec9f.2c699c","type":"ui_dropdown","z":"db483fc9.6ed028","name":"config-bodypart","label":"","tooltip":"","place":"select bodypart to config","group":"e2c2d821.6c65d","order":1,"width":0,"height":0,"passthru":true,"options":[{"label":"shoulder_left","value":"shoulder_left","type":"str"},{"label":"shoulder_right","value":"shoulder_right","type":"str"},{"label":"head","value":"head","type":"str"}],"payload":"","topic":"","x":1010,"y":720,"wires":[["bdcdaf04.56a2c"]]},{"id":"c15510a.376e9f","type":"function","z":"db483fc9.6ed028","name":"","func":"var cmd = msg.payload;\n\nparams = [\"config_bodypart\", \"robot\", \"Ki\", \"Kp\", \"Kd\", \"PWMLimit\", \"IntegralLimit\", \"update_frequency\"]\nmsg.payload = {};\nfor (var p in params) {\n node.warn(global.get(params[p]));\n msg.payload[params[p]] = global.get(params[p]);\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":970,"y":860,"wires":[["f698232c.054a"]]},{"id":"4af2a841.86d2d","type":"ui_numeric","z":"db483fc9.6ed028","name":"","label":"update frequency","tooltip":"","group":"e2c2d821.6c65d","order":2,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"update_frequency","format":"{{value}}","min":0,"max":"500","step":"100","x":370,"y":760,"wires":[["64912f5c.a0e7b8"]]},{"id":"feeed03b.78e958","type":"ui_numeric","z":"db483fc9.6ed028","name":"","label":"PWM limit","tooltip":"maximum pwm output in percent","group":"e2c2d821.6c65d","order":6,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"PWMLimit","format":"{{value}}","min":"0","max":"100","step":"5","x":340,"y":800,"wires":[["64912f5c.a0e7b8"]]},{"id":"6c957aeb.c9526c","type":"ui_numeric","z":"db483fc9.6ed028","name":"IntegralLimit","label":"integral limit","tooltip":"Integral maximum","group":"e2c2d821.6c65d","order":7,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"IntegralLimit","format":"{{value}}","min":"0","max":"50","step":"1","x":350,"y":840,"wires":[["64912f5c.a0e7b8"]]},{"id":"5fdee12e.530e88","type":"ui_numeric","z":"db483fc9.6ed028","name":"","label":"Kp","tooltip":"","group":"e2c2d821.6c65d","order":3,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"Kp","format":"{{value}}","min":0,"max":"100","step":"1","x":330,"y":880,"wires":[["64912f5c.a0e7b8"]]},{"id":"7c2f9fc8.f5ef88","type":"ui_numeric","z":"db483fc9.6ed028","name":"","label":"Ki","tooltip":"","group":"e2c2d821.6c65d","order":4,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"Ki","format":"{{value}}","min":0,"max":"50","step":"1","x":330,"y":920,"wires":[["64912f5c.a0e7b8"]]},{"id":"b23599be.8fb268","type":"ui_numeric","z":"db483fc9.6ed028","name":"","label":"Kd","tooltip":"","group":"e2c2d821.6c65d","order":5,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"Kd","format":"{{value}}","min":0,"max":"50","step":"1","x":330,"y":960,"wires":[["64912f5c.a0e7b8"]]},{"id":"83248273.38fce","type":"inject","z":"db483fc9.6ed028","name":"","repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":130,"y":760,"wires":[["9abc59da.c98e88"]]},{"id":"64912f5c.a0e7b8","type":"function","z":"db483fc9.6ed028","name":"","func":"global.set(msg.topic, msg.payload);\nreturn msg","outputs":1,"noerr":0,"x":610,"y":860,"wires":[[]]},{"id":"9abc59da.c98e88","type":"function","z":"db483fc9.6ed028","name":"","func":"msg1 = {};\nmsg1.payload = 200;\n\nmsg2 = {};\nmsg2.payload = 25;\n\nmsg3 = {};\nmsg3.payload = 25;\n\nmsg4 = {};\nmsg4.payload = 1;\n\nmsg5 = {};\nmsg5.payload = 0;\n\nmsg6 = {};\nmsg6.payload = 0;\n\nreturn [msg1 ,msg2,msg3,msg4,msg5,msg6] ","outputs":6,"noerr":0,"initialize":"","finalize":"","x":120,"y":860,"wires":[["4af2a841.86d2d"],["feeed03b.78e958"],["6c957aeb.c9526c"],["5fdee12e.530e88"],["7c2f9fc8.f5ef88"],["b23599be.8fb268"]]},{"id":"12c83473.4471cc","type":"debug","z":"db483fc9.6ed028","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1330,"y":860,"wires":[]},{"id":"ec491b43.205078","type":"inject","z":"db483fc9.6ed028","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"num","x":250,"y":80,"wires":[["5f006fb9.d26418"]]},{"id":"5f006fb9.d26418","type":"function","z":"db483fc9.6ed028","name":"","func":"msg = {};\nmsg.payload = \"brain\";\n\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":470,"y":80,"wires":[["6e140317.dabaf4"]]},{"id":"bf40f619.22b378","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"elbow_right_axis1","tooltip":"","group":"f9bbdd6b.b7ed4","order":9,"width":0,"height":0,"passthru":true,"outs":"end","topic":"elbow_right_axis1","min":"0","max":"-1.2","step":"0.01","x":570,"y":1160,"wires":[["60c216c6.3b2f18"]]},{"id":"60c216c6.3b2f18","type":"function","z":"db483fc9.6ed028","name":"","func":"setpoint = msg.payload;\njoint = msg.topic;\nmsg.payload = {}\nmsg.payload[\"robot\"] = global.get(\"robot\");\nmsg.payload[\"position\"] = setpoint;\nmsg.payload[\"name\"] = joint;\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":860,"y":1280,"wires":[["313fabf7.856e2c"]]},{"id":"313fabf7.856e2c","type":"python3-function","z":"db483fc9.6ed028","name":"","func":"import rospy\nfrom sensor_msgs.msg import JointState\n\nrospy.init_node(\"nodered_joint_ctl\")\nrobot = msg[\"payload\"][\"robot\"]\n\npublisher = rospy.Publisher(\"/roboy/\"+robot+\"/control/joint_targets\", JointState, queue_size=1)\njoint_msg = JointState()\njoint_msg.name = [msg[\"payload\"][\"name\"]]\njoint_msg.position = [msg[\"payload\"][\"position\"]]\njoint_msg.velocity = [0]\njoint_msg.effort = [0]\n\npublisher.publish(joint_msg)\n\nreturn msg","outputs":1,"x":1080,"y":1280,"wires":[[]]},{"id":"8ab4cc5d.27f698","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"head_axis1","tooltip":"","group":"f9bbdd6b.b7ed4","order":1,"width":0,"height":0,"passthru":true,"outs":"end","topic":"head_axis1","min":"-0.56","max":"0.56","step":"0.01","x":550,"y":1200,"wires":[["60c216c6.3b2f18"]]},{"id":"e4fe45b5.6dd468","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"head_axis0","tooltip":"","group":"f9bbdd6b.b7ed4","order":2,"width":0,"height":0,"passthru":true,"outs":"end","topic":"head_axis0","min":"-0.8","max":"0.8","step":"0.01","x":550,"y":1240,"wires":[["60c216c6.3b2f18"]]},{"id":"a94824e8.880998","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"head_axis2","tooltip":"","group":"f9bbdd6b.b7ed4","order":3,"width":0,"height":0,"passthru":true,"outs":"end","topic":"head_axis2","min":"-0.56","max":"0.56","step":"0.01","x":550,"y":1280,"wires":[["60c216c6.3b2f18"]]},{"id":"f214780e.a7951","type":"inject","z":"db483fc9.6ed028","name":"","repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":130,"y":1280,"wires":[["ef5f84e5.6e7f08"]]},{"id":"ef5f84e5.6e7f08","type":"function","z":"db483fc9.6ed028","name":"","func":"msg = {};\nmsg.payload = 0;\n\n\nreturn [msg] ","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":1280,"wires":[["8ab4cc5d.27f698","e4fe45b5.6dd468","a94824e8.880998","ee4be2b9.02b54","6bd2801b.bf37","c0335a5e.04efe","bf40f619.22b378","ea5f1e6.a43b56","6f0653aa.511dd4","9acf7113.875d58"]]},{"id":"ee4be2b9.02b54","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"shoulder_right_axis1","tooltip":"","group":"f9bbdd6b.b7ed4","order":5,"width":0,"height":0,"passthru":true,"outs":"end","topic":"shoulder_right_axis1","min":"0","max":"-1.5","step":"0.01","x":580,"y":1320,"wires":[["60c216c6.3b2f18"]]},{"id":"6bd2801b.bf37","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"shoulder_left_axis1","tooltip":"","group":"f9bbdd6b.b7ed4","order":7,"width":0,"height":0,"passthru":true,"outs":"end","topic":"shoulder_left_axis1","min":"0","max":"-1.5","step":"0.01","x":570,"y":1360,"wires":[["60c216c6.3b2f18"]]},{"id":"ee9eb15f.88be2","type":"ui_template","z":"52b5890c.deb9e8","group":"e7a074fd.cc4bb","name":"eye left","order":1,"width":6,"height":7,"format":"<!DOCTYPE html>\n<html>\n<head>\n<meta name='viewport' content='width=device-width, initial-scale=1' charset='utf-8'>\n<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css' integrity='sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ' crossorigin='anonymous'>\n<link href=\"https://afeld.github.io/emoji-css/emoji.css\" rel=\"stylesheet\">\n<style>\n.btn-group .button {\n background-color: #6495ED; /* blue */\n border: 3px solid white;\n color: white;\n padding: 15px 30px;\n text-align: center;\n text-decoration: none;\n display: inline-block;\n font-size: 25px;\n cursor: pointer;\n float: left;\n border-radius: 15px;\n\n}\n\n.btn-group .button:not(:last-child) {\n border-right: none; /* Prevent double borders */\n}\n\n.btn-group .button:hover {\n background-color: #3b88c3;\n}\n</style>\n</head>\n<body>\n\n\n<div class=\"btn-group\" >\n <button ng-click=\"send({payload: 'calib_eyeleft_position_x+'})\" class=\"button\"><i class=\"em em-arrow_right\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeleft_position_x-'})\" class=\"button\"><i class=\"em em-arrow_left\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeleft_position_y+'})\" class=\"button\"><i class=\"em em-arrow_up\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeleft_position_y-'})\" class=\"button\"><i class=\"em em-arrow_down\"></i></button>\n \n <button ng-click=\"send({payload: 'calib_eyeleft_scale_x+'})\" class=\"button\"><i class=\"em em-left_right_arrow\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeleft_scale_x-'})\" class=\"button\"><i class=\"em em-heavy_minus_sign\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeleft_scale_y+'})\" class=\"button\"><i class=\"em em-arrow_up_down\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeleft_scale_y-'})\" class=\"button\"><i class=\"em em-heavy_minus_sign\"></i></button>\n</div>\n\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":160,"y":340,"wires":[["f1385161.95f248"]]},{"id":"b30d2a05.fde368","type":"ui_template","z":"52b5890c.deb9e8","group":"e7a074fd.cc4bb","name":"mouth","order":3,"width":6,"height":7,"format":"<!DOCTYPE html>\n<html>\n<head>\n<meta name='viewport' content='width=device-width, initial-scale=1' charset='utf-8'>\n<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css' integrity='sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ' crossorigin='anonymous'>\n<link href=\"https://afeld.github.io/emoji-css/emoji.css\" rel=\"stylesheet\">\n<style>\n.btn-group .button {\n background-color: #465572; /* Roboy blue */\n border: 3px solid white;\n color: white;\n padding: 15px 30px;\n text-align: center;\n text-decoration: none;\n display: inline-block;\n font-size: 25px;\n cursor: pointer;\n float: left;\n border-radius: 15px;\n\n}\n\n.btn-group .button:not(:last-child) {\n border-right: none; /* Prevent double borders */\n}\n\n.btn-group .button:hover {\n background-color: #5C677C;\n}\n</style>\n</head>\n<body>\n\n\n<div class=\"btn-group\" >\n\n <button ng-click=\"send({payload: 'calib_mouth_position_x+'})\" class=\"button\"><i class=\"em em-arrow_right\"></i></button>\n <button ng-click=\"send({payload: 'calib_mouth_position_x-'})\" class=\"button\"><i class=\"em em-arrow_left\"></i></button>\n <button ng-click=\"send({payload: 'calib_mouth_position_y+'})\" class=\"button\"><i class=\"em em-arrow_up\"></i></button>\n <button ng-click=\"send({payload: 'calib_mouth_position_y-'})\" class=\"button\"><i class=\"em em-arrow_down\"></i></button>\n \n <button ng-click=\"send({payload: 'calib_mouth_scale_x+'})\" class=\"button\"><i class=\"em em-left_right_arrow\"></i></button>\n <button ng-click=\"send({payload: 'calib_mouth_scale_x-'})\" class=\"button\"><i class=\"em em-heavy_minus_sign\"></i></button>\n <button ng-click=\"send({payload: 'calib_mouth_scale_y+'})\" class=\"button\"><i class=\"em em-arrow_up_down\"></i></button>\n <button ng-click=\"send({payload: 'calib_mouth_scale_y-'})\" class=\"button\"><i class=\"em em-heavy_minus_sign\"></i></button>\n \n <!--<p>Right eye</p> -->\n\n <!--<button ng-click=\"send({payload: 'calib_eyeright_position_x+'})\" class=\"button\"><i class=\"em em-arrow_right\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_eyeright_position_x-'})\" class=\"button\"><i class=\"em em-arrow_left\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_eyeright_position_y+'})\" class=\"button\"><i class=\"em em-arrow_up\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_eyeright_position_y-'})\" class=\"button\"><i class=\"em em-arrow_down\"></i></button>-->\n \n <!--<p>Mouth</p> -->\n <!--<button ng-click=\"send({payload: 'calib_mouth_position_x+'})\" class=\"button\"><i class=\"em em-arrow_right\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_mouth_position_x-'})\" class=\"button\"><i class=\"em em-arrow_left\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_mouth_position_y+'})\" class=\"button\"><i class=\"em em-arrow_up\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_mouth_position_y-'})\" class=\"button\"><i class=\"em em-arrow_down\"></i></button>-->\n \n\n\n</div>\n\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":150,"y":380,"wires":[["f1385161.95f248"]]},{"id":"3d47fe97.563f32","type":"ui_template","z":"52b5890c.deb9e8","group":"e7a074fd.cc4bb","name":"eye right","order":2,"width":6,"height":7,"format":"<!DOCTYPE html>\n<html>\n<head>\n<meta name='viewport' content='width=device-width, initial-scale=1' charset='utf-8'>\n<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css' integrity='sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ' crossorigin='anonymous'>\n<link href=\"https://afeld.github.io/emoji-css/emoji.css\" rel=\"stylesheet\">\n<style>\n.btn-group .button {\n background-color: #465572; /* Roboy blue */\n border: 3px solid white;\n color: white;\n padding: 15px 30px;\n text-align: center;\n text-decoration: none;\n display: inline-block;\n font-size: 25px;\n cursor: pointer;\n float: left;\n border-radius: 15px;\n\n}\n\n.btn-group .button:not(:last-child) {\n border-right: none; /* Prevent double borders */\n}\n\n.btn-group .button:hover {\n background-color: #5C677C;\n}\n</style>\n</head>\n<body>\n\n\n<div class=\"btn-group\" >\n\n <button ng-click=\"send({payload: 'calib_eyeright_position_x+'})\" class=\"button\"><i class=\"em em-arrow_right\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeright_position_x-'})\" class=\"button\"><i class=\"em em-arrow_left\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeright_position_y+'})\" class=\"button\"><i class=\"em em-arrow_up\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeright_position_y-'})\" class=\"button\"><i class=\"em em-arrow_down\"></i></button>\n \n <button ng-click=\"send({payload: 'calib_eyeright_scale_x+'})\" class=\"button\"><i class=\"em em-left_right_arrow\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeright_scale_x-'})\" class=\"button\"><i class=\"em em-heavy_minus_sign\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeright_scale_y+'})\" class=\"button\"><i class=\"em em-arrow_up_down\"></i></button>\n <button ng-click=\"send({payload: 'calib_eyeright_scale_y-'})\" class=\"button\"><i class=\"em em-heavy_minus_sign\"></i></button>\n \n <!--<p>Right eye</p> -->\n\n <!--<button ng-click=\"send({payload: 'calib_eyeright_position_x+'})\" class=\"button\"><i class=\"em em-arrow_right\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_eyeright_position_x-'})\" class=\"button\"><i class=\"em em-arrow_left\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_eyeright_position_y+'})\" class=\"button\"><i class=\"em em-arrow_up\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_eyeright_position_y-'})\" class=\"button\"><i class=\"em em-arrow_down\"></i></button>-->\n \n <!--<p>Mouth</p> -->\n <!--<button ng-click=\"send({payload: 'calib_mouth_position_x+'})\" class=\"button\"><i class=\"em em-arrow_right\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_mouth_position_x-'})\" class=\"button\"><i class=\"em em-arrow_left\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_mouth_position_y+'})\" class=\"button\"><i class=\"em em-arrow_up\"></i></button>-->\n <!--<button ng-click=\"send({payload: 'calib_mouth_position_y-'})\" class=\"button\"><i class=\"em em-arrow_down\"></i></button>-->\n \n\n\n</div>\n\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":160,"y":420,"wires":[["f1385161.95f248"]]},{"id":"7c4a4de1.94aec4","type":"python3-function","z":"db483fc9.6ed028","name":"position mode","func":"import rospy\nfrom roboy_middleware_msgs.srv import ControlMode, ControlModeRequest\nfrom roboy_middleware_msgs.msg import MotorState\n\nrobot = msg[\"payload\"][\"robot\"]\nbody_part = msg[\"payload\"][\"body_part\"]\n\nrospy.init_node(\"control_mode_client\")\nsrv = rospy.ServiceProxy(\"/roboy/\"+robot+\"/middleware/ControlMode\", ControlMode)\n\ncurr_encoder0_pos = {}\ninfo_msg = rospy.wait_for_message(\"/roboy/\"+robot+\"/middleware/MotorState\", MotorState)\nprint(info_msg)\nfor i in range(len(info_msg.global_id)):\n # print(i)\n # idd = np.int8(float(info_msg.global_id[i]))\n \n curr_encoder0_pos[i] = info_msg.encoder0_pos[i]\n # curr_mode[i] = info_msg.control_mode[i]\n\nreq = ControlModeRequest()\nids = rospy.get_param(body_part + \"/motor_ids\")\nreq.global_id = ids\nreq.control_mode = 0\n\nfor m in req.global_id:\n \n if m in curr_encoder0_pos:\n print(\"motor: \" + str(m) + \" setpoint: \" + str(curr_encoder0_pos[m]))\n req.set_points.append(curr_encoder0_pos[m])\n else:\n print(\"cannot find out the current encoder0_pos, setting 0\")\n req.set_points.append(0)\n\n\nsrv(req)\nreturn msg","outputs":1,"x":1260,"y":540,"wires":[[]]},{"id":"91a4b959.abe4f8","type":"function","z":"db483fc9.6ed028","name":"","func":"var cmd = msg.payload;\n\nmsg.payload = {};\nmsg.payload[\"body_part\"] = cmd;\nmsg.payload[\"robot\"] = global.get(\"robot\");\nreturn msg;","outputs":1,"noerr":0,"x":1080,"y":540,"wires":[["7c4a4de1.94aec4"]]},{"id":"6d7f7d7.6c13784","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":14,"width":0,"height":0,"passthru":false,"label":"postion right wrist","tooltip":"","color":"","bgcolor":"#6495ED","icon":"","payload":"wrist_right","payloadType":"str","topic":"relax","x":910,"y":560,"wires":[["91a4b959.abe4f8"]]},{"id":"2d7d8774.ef86f8","type":"ui_button","z":"db483fc9.6ed028","name":"","group":"5a3a63d5.6b5d34","order":13,"width":0,"height":0,"passthru":false,"label":"postion left wrist","tooltip":"","color":"","bgcolor":"#6495ED","icon":"","payload":"wrist_left","payloadType":"str","topic":"relax","x":900,"y":520,"wires":[["91a4b959.abe4f8"]]},{"id":"93ffd1c7.b3904","type":"ui_button","z":"52b5890c.deb9e8","name":"","group":"6831354a.a3846c","order":1,"width":0,"height":0,"passthru":false,"label":"(Re)start Face","tooltip":"","color":"","bgcolor":"","icon":"tag_faces","payload":"restart","payloadType":"str","topic":"face","x":740,"y":260,"wires":[["7d2704f5.b6a6cc"]]},{"id":"7d2704f5.b6a6cc","type":"exec","z":"52b5890c.deb9e8","command":"/home/roboy/restart_face.sh","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":980,"y":260,"wires":[[],[],[]]},{"id":"c0335a5e.04efe","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"elbow_left_axis0","tooltip":"","group":"f9bbdd6b.b7ed4","order":8,"width":0,"height":0,"passthru":true,"outs":"end","topic":"elbow_left_axis0","min":"0","max":"0.9","step":"0.01","x":570,"y":1400,"wires":[["60c216c6.3b2f18"]]},{"id":"66e6bbdc.da818c","type":"inject","z":"db483fc9.6ed028","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":1640,"wires":[["c054582d.b6ccb8"]]},{"id":"fb1a604d.492b98","type":"inject","z":"db483fc9.6ed028","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":510,"y":1520,"wires":[["b8f57dc.e4c968","ac5251f3.79c7b8"]]},{"id":"a40d3664.612c68","type":"inject","z":"db483fc9.6ed028","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"SIGINT","payloadType":"str","x":510,"y":1560,"wires":[["b8f57dc.e4c968"]]},{"id":"c054582d.b6ccb8","type":"ui_switch","z":"db483fc9.6ed028","name":"","label":"Show motor status","tooltip":"","group":"e6b37988.d3422","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":350,"y":1640,"wires":[["6a9d313f.fabd38"]]},{"id":"6a9d313f.fabd38","type":"function","z":"db483fc9.6ed028","name":"","func":"if(!msg.payload) msg.kill = 9;\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":1640,"wires":[["ac5251f3.79c7b8","e5400087.fecaf","b8f57dc.e4c968"]]},{"id":"bf99c291.ba5008","type":"delay","z":"db483fc9.6ed028","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"5","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":350,"y":1720,"wires":[["3341e4b2.d031bc","e5400087.fecaf"]]},{"id":"3341e4b2.d031bc","type":"function","z":"db483fc9.6ed028","name":"parse message from string","func":"var p = msg.payload.split(\"\\n\")\n\ninfo = global.get(\"roboy_MotorInfo\")\n\nfunction mapToBar(c,nc){\n return function(v){\n var ret = \"background:\"+(Math.abs(v)<1e-4?\"#F53920\":(v>0?c:(\"repeating-linear-gradient(45deg,\"+c+\",\"+nc+\" 5px)\")))+\";\"\n ret += \"width:\"+(Math.abs(v)<1e-4?\"3px\":((Math.log10(Math.abs(v))+4)/10*30).toFixed(1)+\"px\")+\";\"\n return ret;\n }\n}\nvar parts = {\n \"global_id\":(p[0].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"setpoint\":(p[1].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat).map(mapToBar(\"#462CF5\",\"#F77A6A\")),\n \"encoder0_pos\":(p[2].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat).map(mapToBar(\"#F5DF51\",\"#F77A6A\")),\n \"encoder1_pos\":(p[3].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat).map(mapToBar(\"#F5DF51\",\"#F77A6A\")),\n \"displacement\":(p[4].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat).map(mapToBar(\"#F5C85C\",\"#F77A6A\")),\n \"current\":(p[5].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat).map(mapToBar(\"#20F58C\",\"#F77A6A\"))\n}\nvar ret = new Array(parts[\"global_id\"].length)\nfor(i = 0; i < parts[\"global_id\"].length; i++){\n ret[i] = {\n \"global_id\":parts[\"global_id\"][i],\n \"setpoint\":parts[\"setpoint\"][i],\n \"encoder0_pos\":parts[\"encoder0_pos\"][i],\n \"encoder1_pos\":parts[\"encoder1_pos\"][i],\n \"displacement\":parts[\"displacement\"][i],\n \"current\":parts[\"current\"][i],\n \"control_mode\":info[i][\"control_mode\"],\n \"Kp\":info[i][\"Kp\"],\n \"Ki\":info[i][\"Ki\"],\n \"Kd\":info[i][\"Kd\"],\n \"deadband\":info[i][\"deadband\"],\n \"IntegralLimit\":info[i][\"IntegralLimit\"],\n \"PWMLimit\":info[i][\"PWMLimit\"].toFixed(0),\n \"pwm\":mapToBar(\"#20F58C\",\"#F77A6A\")(info[i][\"pwm\"]),\n \"current_limit\":info[i][\"current_limit\"],\n \"communication_quality\":info[i][\"communication_quality\"],\n //\"error_code\":info[\"error_code\"][i],\n //\"neopixelColor\":info[\"neopixelColor\"][i],*/\n };\n}\nret[0].group = {\"title\":\"Arm Left\"};\nret[8].group = {\"title\":\"Arm Right\"};\nret[16].group = {\"title\":\"?\"};\nret[20].group = {\"title\":\"Head\"};\nret[26].group = {\"title\":\"?\"};\nret[46].group = {\"title\":\"Spine\"};\n\nmsg.payload = ret;\nreturn msg;","outputs":1,"noerr":0,"x":580,"y":1720,"wires":[["bdbc9dd2.3115f8"]]},{"id":"bdbc9dd2.3115f8","type":"template","z":"db483fc9.6ed028","name":"","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<!DOCTYPE html>\n<html>\n<head>\n<meta name='viewport' content='width=device-width, initial-scale=1' charset='utf-8'>\n<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css' integrity='sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ' crossorigin='anonymous'>\n<link href=\"https://afeld.github.io/emoji-css/emoji.css\" rel=\"stylesheet\">\n<style>\n.btn-group .button {\n background-color: #6495ED; /* blue */\n border: 3px solid white;\n color: white;\n padding: 15px 30px;\n text-align: center;\n text-decoration: none;\n display: inline-block;\n font-size: 25px;\n cursor: pointer;\n float: left;\n border-radius: 15px;\n padding:5px;\n\n}\n\n.btn-group .button:not(:last-child) {\n border-right: none; /* Prevent double borders */\n}\n\n.btn-group .button:hover {\n background-color: #3b88c3;\n}\n\n.motor_indicator{\n width:30px;\n height:30px;\n display:inline-block;\n font-size:8px;\n margin:1px;\n text-align:middle;\n vertical-align:center;\n border:1px solid black;\n position:relative;\n}\n.motor_indicator div{\n width:30px;\n height:5px;\n position:absolute;\n}\n.motor_indicator .cc{\n position:absolute;\n top:0;\n left:0;\n text-align: center;\n vertical-align: middle;\n line-height: 30px; \n height:100%;\n width:100%;\n z-index:100;\n}\n.motor_indicator .l1{\n top:0px;\n left:0;\n}\n.motor_indicator .l2{\n top:6px;\n height:2px;\n left:0;\n}\n.motor_indicator .l2b{\n top:9px;\n left:0;\n height:2px;\n}\n.motor_indicator .l3{\n top:12px;\n left:0;\n}\n.motor_indicator .l4{\n top:18px;\n left:0;\n}\n.motor_indicator .l5{\n top:24px;\n left:0;\n}\n.motor_indicator .tr{\n top:0px;\n right:0;\n font-size:5px;\n text-align:right;\n}\n.motor_indicator .scale{\n width:100%;\n position:absolute;\n bottom:0;\n height:5px;\n}\n.motor_indicator .scale div{\n width:1px;\n height:5px;\n background:grey;\n position:absolute;\n bottom:0;\n}\n.motor_indicator .scale :nth-child(1){\n left:3px;\n} \n.motor_indicator .scale :nth-child(2){\n left:6px;\n} \n.motor_indicator .scale :nth-child(3){\n left:9px;\n} \n.motor_indicator .scale :nth-child(4){\n left:12px;\n height:10px;\n} \n.motor_indicator .scale :nth-child(5){\n left:15px;\n} \n.motor_indicator .scale :nth-child(6){\n left:18px;\n} \n.motor_indicator .scale :nth-child(7){\n left:21px;\n} \n.motor_indicator .scale :nth-child(8){\n left:24px;\n} \n.motor_indicator .scale :nth-child(9){\n left:27px;\n}\n\n.motor_indicator .hover{\n display:none;\n}\n\n.motor_indicator:hover .hover{\n display:block;\n background:white;\n position:absolute;\n top:-3px;\n left:73px;\n width:150px;\n height:30px !important;\n z-index:200;\n padding:3px;\n font-size:8px;\n}\n</style>\n</head>\n<body>\n\n\n<div id=\"motor_indicators\">\n <div class=\"motor_indicator\" style=\"width:70px\">\n <div class=\"cc\" style=\"left:40px;width:30px\">id</div>\n <div class=\"hover\">Scale: log10<br/>10<sup>-4</sup> to 10<sup>6</sup><br/>long bar = 1</div>\n <div class=\"l1\" style=\"font-size:4pt;background:#462CF5;width:40px;color:white\">setpoint</div>\n <div class=\"l2b\" style=\"font-size:4pt;background:#F5DF51;width:40px\"></div>\n <div class=\"l2\" style=\"font-size:4pt;background:#F5DF51;width:40px\">encoder0/1_pos</div>\n <div class=\"l3\" style=\"font-size:4pt;background:#F5C85C;width:40px\">displacement</div>\n <div class=\"l4\" style=\"font-size:4pt;background:#20F58C;width:40px;\">current</div>\n <div class=\"l5\" style=\"font-size:4pt;background:#20F58C;width:40px;\">pwm</div>\n <div class=\"tr\">P|I|D<br>q<sub>c</sub><br>md<br>lim<sub>I|pwm</sub></div>\n </div>\n {{#payload}}\n {{#group}}\n <b style=\"display:block\">{{title}}</b>\n {{/group}}\n <div class=\"motor_indicator\">\n <div class=\"scale\">\n <div></div><div></div><div></div><div></div><div></div>\n <div></div><div></div><div></div><div></div><div></div>\n </div>\n <div class=\"cc\">{{global_id}}</div>\n <div class=\"l1\" style=\"{{setpoint}}\"></div>\n <div class=\"l2\" style=\"{{encoder0_pos}}\"></div>\n <div class=\"l2b\" style=\"{{encoder1_pos}}\"></div>\n <div class=\"l3\" style=\"{{displacement}}\"></div>\n <div class=\"l4\" style=\"{{current}}\"></div>\n <div class=\"l5\" style=\"{{pwm}}\"></div>\n <div class=\"tr\">{{Kp}}|{{Ki}}|{{Kd}}<br>{{communication_quality}}<br>{{control_mode}}<br>{{current_limit}}|{{PWMLimit}}</div>\n </div>\n {{/payload}}\n</div>\n<!--\n \"global_id\":parts[\"global_id\"][i],\n \"setpoint\":parts[\"setpoint\"][i],\n \"encoder0_pos\":parts[\"encoder0_pos\"][i],\n \"encoder1_pos\":parts[\"encoder1_pos\"][i],\n \"displacement\":parts[\"displacement\"][i],\n \"current\":parts[\"current\"][i]\n \"control_mode\":info[i][\"control_mode\"],\n \"Kp\":info[i][\"Kp\"],\n \"Ki\":info[i][\"Ki\"],\n \"Kd\":info[i][\"Kd\"],\n \"deadband\":info[i][\"deadband\"],\n \"IntegralLimit\":info[i][\"IntegralLimit\"],\n \"PWMLimit\":info[i][\"PWMLimit\"],\n \"pwm\":info[i][\"pwm\"],\n \"current_limit\":info[i][\"current_limit\"],\n \"communication_quality\":info[i][\"communication_quality\"],\n-->\n</body>\n</html>","output":"str","x":780,"y":1720,"wires":[["b0cb5110.d1f35","e5400087.fecaf"]]},{"id":"b0cb5110.d1f35","type":"ui_template","z":"db483fc9.6ed028","group":"e6b37988.d3422","name":"Motor Status","order":2,"width":6,"height":14,"format":"","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":950,"y":1720,"wires":[[]]},{"id":"e5400087.fecaf","type":"debug","z":"db483fc9.6ed028","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":870,"y":1780,"wires":[]},{"id":"ac5251f3.79c7b8","type":"exec","z":"db483fc9.6ed028","command":"rostopic echo /roboy/brain/middleware/MotorState","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":830,"y":1640,"wires":[["bf99c291.ba5008"],[],[]]},{"id":"b8f57dc.e4c968","type":"exec","z":"db483fc9.6ed028","command":"rostopic echo /roboy/brain/middleware/MotorInfo","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":830,"y":1580,"wires":[["5a29ce13.032208","e5400087.fecaf"],[],[]]},{"id":"5a29ce13.032208","type":"function","z":"db483fc9.6ed028","name":"parse message from string","func":"var p = msg.payload.split(\"\\n\")\n\nvar parts = {\n \"global_id\":(p[0].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"setpoint\":(p[1].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"control_mode\":(p[2].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"Kp\":(p[3].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"Ki\":(p[4].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"Kd\":(p[5].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"deadband\":(p[6].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"IntegralLimit\":(p[7].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"PWMLimit\":(p[8].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"pwm\":(p[9].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"current_limit\":(p[10].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n \"communication_quality\":(p[11].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat),\n //\"error_code\":(p[12].match(/\\[(.*)\\]/)[1].split(\", \")),\n //\"neopixelColor\":(p[13].match(/\\[(.*)\\]/)[1].split(\", \")).map(parseFloat)//.map(toString(16)),\n}\nvar ret = new Array(parts[\"global_id\"].length)\nfor(i = 0; i < parts[\"global_id\"].length; i++){\n ret[i] = {\n \"global_id\":parts[\"global_id\"][i],\n \"setpoint\":parts[\"setpoint\"][i],\n \"control_mode\":parts[\"control_mode\"][i],\n \"Kp\":parts[\"Kp\"][i],\n \"Ki\":parts[\"Ki\"][i],\n \"Kd\":parts[\"Kd\"][i],\n \"deadband\":parts[\"deadband\"][i],\n \"IntegralLimit\":parts[\"IntegralLimit\"][i],\n \"PWMLimit\":parts[\"PWMLimit\"][i],\n \"pwm\":parts[\"pwm\"][i],\n \"current_limit\":parts[\"current_limit\"][i],\n \"communication_quality\":parts[\"communication_quality\"][i],\n //\"error_code\":parts[\"error_code\"][i],\n //\"neopixelColor\":parts[\"neopixelColor\"][i],\n}}\n\nglobal.set(\"roboy_MotorInfo\",ret);\nmsg.payload = p;\nreturn msg;","outputs":1,"noerr":0,"x":1180,"y":1560,"wires":[[]]},{"id":"5452d82.a0c3ca8","type":"function","z":"52b5890c.deb9e8","name":"","func":"mode = msg.payload;\nmsg.payload = {}\nmsg.payload[\"robot\"] = global.get(\"robot\");\nmsg.payload[\"mode\"] = mode;\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":1580,"wires":[["b6be932f.0ff3a8"]]},{"id":"b6be932f.0ff3a8","type":"python3-function","z":"52b5890c.deb9e8","name":"","func":"import rospy\nfrom std_msgs.msg import Int32\n\nrospy.init_node(\"nodered_led_ctl\")\n\nrobot = msg[\"payload\"][\"robot\"]\nmode = msg[\"payload\"][\"mode\"]\n\npublisher = rospy.Publisher(\"/roboy/\"+robot+\"/control/matrix/leds/mode/simple\", Int32, queue_size=1)\n\npublisher.publish(int(mode))\nreturn msg","outputs":1,"x":680,"y":1580,"wires":[["745f611a.1c14d"]]},{"id":"745f611a.1c14d","type":"debug","z":"52b5890c.deb9e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":1580,"wires":[]},{"id":"60144b8b.25baf4","type":"debug","z":"db483fc9.6ed028","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":940,"y":160,"wires":[]},{"id":"ea5f1e6.a43b56","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"shoulder_right_axis0","tooltip":"","group":"f9bbdd6b.b7ed4","order":4,"width":0,"height":0,"passthru":true,"outs":"end","topic":"shoulder_right_axis0","min":"1.0","max":"-1.5","step":"0.01","x":580,"y":1080,"wires":[["60c216c6.3b2f18"]]},{"id":"6f0653aa.511dd4","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"shoulder_left_axis0","tooltip":"","group":"f9bbdd6b.b7ed4","order":6,"width":0,"height":0,"passthru":true,"outs":"end","topic":"shoulder_left_axis0","min":"0.6","max":"-1.5","step":"0.01","x":570,"y":1120,"wires":[["60c216c6.3b2f18"]]},{"id":"cb7e8e25.e64d88","type":"ui_dropdown","z":"db483fc9.6ed028","name":"","label":"Run diagnostics on","tooltip":"","place":"select..","group":"c0933ce3.2094a","order":1,"width":0,"height":0,"passthru":true,"multiple":true,"options":[{"label":"left shoulder","value":"shoulder_left","type":"str"},{"label":"right shoulder","value":"shoulder_right","type":"str"},{"label":"head","value":"head","type":"str"},{"label":"right wrist","value":"wrist_right","type":"str"},{"label":"left wrist","value":"wrist_left","type":"str"},{"label":"right hand","value":"hand_right","type":"str"},{"label":"left hand","value":"hand_left","type":"str"},{"label":"hip","value":"spine","type":"str"}],"payload":"","topic":"","x":210,"y":1940,"wires":[["77d5ebcd.834ffc","6b63f74a.29a3b8"]]},{"id":"77d5ebcd.834ffc","type":"function","z":"db483fc9.6ed028","name":"","func":"if (msg.payload.some(e => e === \"all\")) {\n \n body_parts = [\"shoulder_right\", \"shoulder_left\", \"hand_right\", \"hand_left\", \"wrist_right\", \"wrist_left\", \"head\"] \n /* vendors contains the element we're looking for */\n} else {\n body_parts = msg.payload;\n}\n// body_parts = msg.payload;\nmsg.payload = {}\nmsg.payload[\"robot\"] = global.get(\"robot\");\nmsg.payload[\"body_parts\"] = body_parts;\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":420,"y":1940,"wires":[["33b9b85d.19f6d8"]]},{"id":"f3989f87.2048d8","type":"debug","z":"db483fc9.6ed028","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":1840,"wires":[]},{"id":"33b9b85d.19f6d8","type":"python3-function","z":"db483fc9.6ed028","name":"","func":"import rospy\nfrom roboy_middleware_msgs.srv import SystemCheck, SystemCheckRequest\nimport numpy as np\nimport array\n\nrospy.init_node(\"system_check_srv\")\nrobot = msg[\"payload\"][\"robot\"]\nbody_parts = msg[\"payload\"][\"body_parts\"]\n\nsystem_check_srv = rospy.ServiceProxy(\"/roboy/\"+robot+\"/middleware/SystemCheck\", SystemCheck)\nreq = SystemCheckRequest()\nmotor_ids = []\nunknown_ids = []\nfor body_part in body_parts:\n if rospy.has_param(body_part+\"/motor_ids\"):\n ids = rospy.get_param(body_part+\"/motor_ids\")\n motor_ids.extend(ids)\n else:\n unknown_ids.append(body_part)\n\nreq.motorIDs = motor_ids\nres = system_check_srv(req)\nproblem_detected = []\nok = []\nfor i in range(len(res.motorIDs)):\n if not res.encoder0_pos[i] or not res.encoder0_pos[i] or not res.communication_quality[i]:\n problem_detected.append(i)\n else:\n ok.append(i)\n \nmotorIDs = list(array.array(\"B\", res.motorIDs)) # necessary because of uint8 type\n\nmsg[\"payload\"] = {}\n# msg[\"payload\"][\"all\"] = lst\nmsg[\"payload\"][\"ok\"] = [motorIDs[x] for x in ok]\nmsg[\"payload\"][\"not_ok\"] = [motorIDs[x] for x in problem_detected]\nmsg[\"payload\"][\"unknown_ids\"] = unknown_ids\n\nreturn msg","outputs":1,"x":640,"y":1940,"wires":[["f3989f87.2048d8","666b407f.cbea08"]]},{"id":"6393ce3a.e80fa8","type":"ui_text","z":"db483fc9.6ed028","group":"c0933ce3.2094a","order":2,"width":"0","height":"0","name":"","label":"OK motors with ids:","format":"{{msg.payload}}","layout":"col-center","x":1170,"y":1900,"wires":[]},{"id":"b0857e9.3a0e4","type":"ui_text","z":"db483fc9.6ed028","group":"c0933ce3.2094a","order":3,"width":0,"height":0,"name":"","label":"issues with ids:","format":"{{msg.payload}}","layout":"col-center","x":1160,"y":1960,"wires":[]},{"id":"666b407f.cbea08","type":"function","z":"db483fc9.6ed028","name":"","func":"msg1 = {};\nmsg2 = {};\nmsg3 = {};\nmsg1.payload = msg.payload.ok;\nmsg2.payload = msg.payload.not_ok;\nmsg3.payload = msg.payload.unknown_ids;\nreturn [msg1, msg2,msg3];","outputs":3,"noerr":0,"initialize":"","finalize":"","x":880,"y":1940,"wires":[["6393ce3a.e80fa8"],["b0857e9.3a0e4"],["ec450fe8.63e1d8"]]},{"id":"ec450fe8.63e1d8","type":"ui_text","z":"db483fc9.6ed028","group":"c0933ce3.2094a","order":4,"width":0,"height":0,"name":"","label":"dont know motor ids for:","format":"{{msg.payload}}","layout":"col-center","x":1190,"y":2000,"wires":[]},{"id":"6b63f74a.29a3b8","type":"function","z":"db483fc9.6ed028","name":"","func":"\nmsg.payload = \"checking...\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":2020,"wires":[["6393ce3a.e80fa8","ec450fe8.63e1d8","b0857e9.3a0e4"]]},{"id":"9acf7113.875d58","type":"ui_slider","z":"db483fc9.6ed028","name":"","label":"wrist_right_axis1","tooltip":"","group":"f9bbdd6b.b7ed4","order":8,"width":0,"height":0,"passthru":true,"outs":"end","topic":"wrist_right_axis1","min":"-0.5","max":"0.5","step":"0.01","x":570,"y":1440,"wires":[["60c216c6.3b2f18"]]},{"id":"d571637d.c57c5","type":"ui_text","z":"db483fc9.6ed028","group":"fcbf351c.ddfb58","order":5,"width":0,"height":0,"name":"","label":"head","format":"{{msg.payload}}","layout":"row-spread","x":610,"y":2180,"wires":[]},{"id":"c2e20ff2.58a638","type":"python3-function","z":"db483fc9.6ed028","name":"","func":"import rospy\nmsg0 = {}\nmsg1 = {}\nmsg2 = {}\nmsg3 = {}\nmsg4 = {}\ninitialized = rospy.get_param(\"initialized\")\nmsg0[\"payload\"] = initialized[\"head\"]\nmsg1[\"payload\"] = initialized[\"shoulder_left\"]\nmsg2[\"payload\"] = initialized[\"shoulder_right\"]\nmsg3[\"payload\"] = initialized[\"wrist_left\"]\nmsg4[\"payload\"] = initialized[\"wrist_right\"]\n\n# parts = [\"head\", 'shoulder_left', \"shoulder_right\", \"wrist_left\", \"wrist_right\"]\n# if rospy.has_param(\"initialized\"):\n# # try:\n# initialized = rospy.get_param(\"initialized\")\n# msg[\"payload\"] = initialized\n# for part in parts:\n# msg[\"payload\"] = initialized[part]\n# msgs.append(msg)\n# # # msgs[parts.index(part)][\"payload\"] = initialized[part]\n# # except:\n# # pass\n \n\nreturn [msg0,msg1,msg2,msg3,msg4]","outputs":5,"x":320,"y":2260,"wires":[["d571637d.c57c5"],["36421ef6.821422"],["694d3b32.d3d3d4"],["a9ac6c9b.0237f8"],["a2c0b0ea.da27a8"]]},{"id":"36421ef6.821422","type":"ui_text","z":"db483fc9.6ed028","group":"fcbf351c.ddfb58","order":6,"width":0,"height":0,"name":"","label":"left shoulder","format":"{{msg.payload}}","layout":"row-spread","x":630,"y":2220,"wires":[]},{"id":"694d3b32.d3d3d4","type":"ui_text","z":"db483fc9.6ed028","group":"fcbf351c.ddfb58","order":7,"width":0,"height":0,"name":"","label":"right shoulder","format":"{{msg.payload}}","layout":"row-spread","x":640,"y":2260,"wires":[]},{"id":"a9ac6c9b.0237f8","type":"ui_text","z":"db483fc9.6ed028","group":"fcbf351c.ddfb58","order":8,"width":0,"height":0,"name":"","label":"left wrist","format":"{{msg.payload}}","layout":"row-spread","x":620,"y":2300,"wires":[]},{"id":"a2c0b0ea.da27a8","type":"ui_text","z":"db483fc9.6ed028","group":"fcbf351c.ddfb58","order":9,"width":0,"height":0,"name":"","label":"right wrist","format":"{{msg.payload}}","layout":"row-spread","x":620,"y":2340,"wires":[]},{"id":"9c246219.dcca78","type":"ui_text","z":"db483fc9.6ed028","group":"fcbf351c.ddfb58","order":4,"width":0,"height":0,"name":"","label":"Initialized:","format":"{{msg.payload}}","layout":"col-center","x":120,"y":2160,"wires":[]},{"id":"d8af5f3c.5f8418","type":"inject","z":"db483fc9.6ed028","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"str","x":90,"y":2260,"wires":[["c2e20ff2.58a638"]]}]