{"id":3740,"date":"2019-11-25T00:09:37","date_gmt":"2019-11-24T23:09:37","guid":{"rendered":"http:\/\/dronesonen.usn.no\/?p=3740"},"modified":"2019-12-05T08:22:14","modified_gmt":"2019-12-05T07:22:14","slug":"haptix-week-47","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=3740","title":{"rendered":"Haptix week 47"},"content":{"rendered":"\n<p><strong>Petter:<\/strong><\/p>\n\n\n\n<p>Because&nbsp;of&nbsp;my&nbsp;issues&nbsp;with&nbsp;the&nbsp;input system I&nbsp;went&nbsp;and&nbsp;talked&nbsp;to Steven&nbsp;about&nbsp;possible&nbsp;solutions,&nbsp;he&nbsp;ended&nbsp;up giving&nbsp;me&nbsp;new&nbsp;ideas&nbsp;and&nbsp;perspectives.&nbsp;<\/p>\n\n\n\n<p>I ended up redoing the cube completely because of this and after 3 days compared to four&nbsp;weeks of work, I&nbsp;have a working prototype, which is frankly better in all ways&nbsp;compared to the old one. For a rough outline on how my thought process went:&nbsp;&nbsp;<\/p>\n\n\n\n<p>First, Steven and&nbsp;I&nbsp;categorised the options:&nbsp;<\/p>\n\n\n\n<p>9 layers x 2&nbsp;for&nbsp;+&nbsp;&#8211; = 18 options&nbsp;<\/p>\n\n\n\n<p>27 total&nbsp;pieces, including middle piece&nbsp;<\/p>\n\n\n\n<p>If&nbsp;we&nbsp;exclude&nbsp;middle&nbsp;because&nbsp;it&nbsp;can&#8217;t&nbsp;be&nbsp;seen,&nbsp;therefore&nbsp;should&nbsp;not be&nbsp;touched:&nbsp;&nbsp;<\/p>\n\n\n\n<p>6&nbsp;layers&nbsp;have 9&nbsp;pieces&nbsp;<\/p>\n\n\n\n<p>3 layers have 8 pieces, these three layers are the&nbsp;center&nbsp;layers, and are the only three layers which exceptions may be made for.&nbsp;<\/p>\n\n\n\n<p>Middle pieces never change&nbsp;their&nbsp;parallel&nbsp;position compared to each other, which means we can use them to identify which pieces are currently in the vicinity.&nbsp;<\/p>\n\n\n\n<p>I\u2019m&nbsp;gonna&nbsp;simplify the solution a lot for right now, both because it\u2019s very difficult to explain and because I still need to do some more testing, which means it might change, I\u2019ll do a full code walkthrough later. Anyways so:&nbsp;<\/p>\n\n\n\n<p>Give each middle piece a&nbsp;large&nbsp;layer sized box collider.&nbsp;<\/p>\n\n\n\n<p>This box collider can be used to gather the surrounding pieces. As well as register touch.&nbsp;<\/p>\n\n\n\n<p>The remaining pieces (20) will be kept in the main parent and not used before they&nbsp;must be.&nbsp;<\/p>\n\n\n\n<p>For the touch solution:&nbsp;<\/p>\n\n\n\n<p>Movement will only be allowed on the last layer parallel to the two others touched. The last layer can be turned by touching it and rotating any angle(x,y,z) by more than 45 degrees while still having one finger touching the side to be turned, the rotational direction is decided by whether the change is&nbsp;pos&nbsp;or neg or just tightening the fist and rotating it +-45 degrees.&nbsp;<\/p>\n\n\n\n<p>Parallel layers can be hard defined in code and the layer ready to be turned is highlighted.&nbsp;<\/p>\n\n\n\n<p><strong>William:<\/strong><\/p>\n\n\n\n<p>I am&nbsp;now&nbsp;done&nbsp;with&nbsp;the&nbsp;tutorial&nbsp;part in&nbsp;Unity&nbsp;(On&nbsp;how&nbsp;to&nbsp;solve&nbsp;a&nbsp;Rubiks&nbsp;Cube). The&nbsp;scoreboard&nbsp;is still&nbsp;beeing&nbsp;worked&nbsp;on.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/image-18-1024x506.png\" alt=\"\" class=\"wp-image-3756\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/image-18.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/image-18-300x148.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/image-18-768x380.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Herman: <\/strong><\/p>\n\n\n\n<p>The communication between the master hub and the slaves at\nthe gloves is somewhat complete. For test purposes I have used led diodes for\nthe vibration motors. Here it parses the information given and checks if it\u2019s numeric.\n&nbsp;It reads it as bytes and check for \/n as\nthe end bit. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"850\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/week47-2.jpg\" alt=\"\" class=\"wp-image-3760\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/week47-2.jpg 857w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/week47-2-150x150.jpg 150w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/week47-2-300x298.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/week47-2-768x762.jpg 768w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/figure>\n\n\n\n<p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nWhen\nthe system sees the start bit (0) it starts to check if the message wants to\nact on a finger that do exist, here we have numbered them 2-11 after which pins\nit connects. So, if it is the right hand (2-6) it will send the message forward\nto unit 1, or if it is the left hand (7-11) it sends the message to unit 2\n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"548\" height=\"842\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/week47-1.jpg\" alt=\"\" class=\"wp-image-3761\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/week47-1.jpg 548w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/week47-1-195x300.jpg 195w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/figure>\n\n\n\n<p>If an error occurs along the way it sends back an error code to the unity script. <\/p>\n\n\n\n<p>The scrpit for the gloves are base on the same idea, only here we remove sending the message further and rather execute the \u201cdigitalWrite(data_buf[FINGER_ID], data_buf[FINGER_ACT]);\u201d line <\/p>\n\n\n\n<p>What is missing now is to adjust it\nfor wireless connection and to add more measurement to ensure that nothing fails\nduring use, such as timers for timeout from unity, if the motors are still\ngoing when it shouldn\u2019t and so on. <\/p>\n\n\n\n<p><strong>Tom Erik:<\/strong><\/p>\n\n\n\n<p>Assembled and wired up the glove. To further optimize spacing, I\u2019ll&nbsp;look into&nbsp;designing a&nbsp;pcb&nbsp;for the circuit.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"891\" height=\"1024\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/image-14-891x1024.jpeg\" alt=\"\" class=\"wp-image-3758\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/image-14.jpeg 891w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/image-14-261x300.jpeg 261w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/image-14-768x883.jpeg 768w\" sizes=\"auto, (max-width: 891px) 100vw, 891px\" \/><\/figure>\n\n\n\n<p><strong>Daniel:<\/strong><\/p>\n\n\n\n<p>For this week I have continued on the Unity test application for the Haptic gloves. Where I have enlarged the environment in the main scene, both by implementing new objects and music. My idea was to create a narrative of being in the American Old West. <br><br>In order to achieve this, I figured that I could carry on with the Low Poly graphics. Upgraded the scene with some assets for a <a href=\"https:\/\/assetstore.unity.com\/packages\/3d\/environments\/low-poly-western-saloon-85578\">Low Poly Western Saloon<\/a>. Added some <a href=\"https:\/\/assetstore.unity.com\/packages\/3d\/3le-low-poly-cloud-pack-65911\">clouds<\/a> in the background and imported some music into the scene.<\/p>\n\n\n\n<p>As the user of the application you are placed into a chair in the saloon. From there on out, you will hear some Western music in the background. While also being able to both look around with the VR headset and interact with the nearby objects.<\/p>\n\n\n\n<figure class=\"wp-block-embed-vimeo wp-block-embed is-type-video is-provider-vimeo wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Haptix objects\" src=\"https:\/\/player.vimeo.com\/video\/374953692?dnt=1&amp;app_id=122963\" width=\"500\" height=\"281\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\"><\/iframe>\n<\/div><figcaption>Illustration of handling objects with the Leap Motion Rig<\/figcaption><\/figure>\n\n\n\n<p>In order to make the experience feel as good as possible, the objects close to the user had to be adjusted for the Leap Motion Rig&#8217;s Interaction Behaviour. Specifically with regard to such as the object&#8217;s Rigidbody and colliders.<\/p>\n\n\n\n<p>In the upcooming week I will look at the possibility of implementing a functional gun into the scene. As well as update the menu with graphics and helpful information. So hopefully the project will soon end up much like this illustration:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"514\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/illustration-2-1024x514.jpg\" alt=\"\" class=\"wp-image-3747\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/illustration-2-1024x514.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/illustration-2-300x150.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2019\/11\/illustration-2-768x385.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>  Overall illustration of the project  <\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Petter: Because&nbsp;of&nbsp;my&nbsp;issues&nbsp;with&nbsp;the&nbsp;input system I&nbsp;went&nbsp;and&nbsp;talked&nbsp;to Steven&nbsp;about&nbsp;possible&nbsp;solutions,&nbsp;he&nbsp;ended&nbsp;up giving&nbsp;me&nbsp;new&nbsp;ideas&nbsp;and&nbsp;perspectives.&nbsp; I ended up redoing the cube completely because of this and after 3 days compared to four&nbsp;weeks of work, I&nbsp;have a working prototype, which is frankly better in all ways&nbsp;compared to the old one. For a rough outline on how my thought process went:&nbsp;&nbsp; First, Steven and&nbsp;I&nbsp;categorised the options:&nbsp; [&hellip;]<\/p>\n","protected":false},"author":72,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,1],"tags":[],"class_list":["post-3740","post","type-post","status-publish","format-standard","hentry","category-haptix","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/3740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/users\/72"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3740"}],"version-history":[{"count":12,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/3740\/revisions"}],"predecessor-version":[{"id":3805,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/3740\/revisions\/3805"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}