{"id":365,"date":"2018-12-07T18:54:59","date_gmt":"2018-12-07T18:54:59","guid":{"rendered":"https:\/\/projects-old.etc.cmu.edu\/pupil\/?page_id=365"},"modified":"2018-12-11T22:40:32","modified_gmt":"2018-12-11T22:40:32","slug":"technical-setup","status":"publish","type":"page","link":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/technical-setup\/","title":{"rendered":"Introduction"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"365\" class=\"elementor elementor-365 elementor-bc-flex-widget\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0b9d7f0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0b9d7f0\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a665a7c\" data-id=\"a665a7c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fc8b769 elementor-widget elementor-widget-heading\" data-id=\"fc8b769\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h1 class=\"elementor-heading-title elementor-size-large\">Technical Setup<\/h1>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bb1bddd elementor-widget elementor-widget-heading\" data-id=\"bb1bddd\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Platform Decision<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d15cd67 elementor-widget elementor-widget-text-editor\" data-id=\"d15cd67\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">Given the future-facing nature of our goals, we had to find technology to support us. Initially, we considered using the Hololens, Meta 2, and the Magic Leap. Since we were familiar with developing for the Hololens and had immediate access to it, we chose it as the platform for our initial efforts.<\/span><\/p><p><span style=\"font-weight: 400;\">One of our first prototype ideas involved creating 2D geometry shapes in AR using interactive markers. While developing for this, we encountered difficulty with marker tracking, as the Hololens was not compatible with Vuforia. In addition to this, our goal for exploring different Learner-Content interactions was hard to accomplish given the Hololens\u2019 relatively restricted gesture library. While that could be considered a helpful constraint, the user experience is also fairly frustrating on the Pinch gesture, which is definitely a problem that will be solved in the future.<\/span><\/p><p><span style=\"font-weight: 400;\">Overall, it seemed like the Hololens was not a great fit; neither for our overarching goal of exploring a number of interactions, or for our prototype\u2019s goal of marker tracking.<\/span><\/p><p><span style=\"font-weight: 400;\">We were aware of these limitations, so were also doing some research on potential workarounds. A passthrough VR setup presented itself as a powerful alternative. It involves using a Virtual Reality (VR) headset in combination with a stereo camera to simulate AR on a VR headset. This instantly ameliorates a major pain point that is unavoidable with all current-gen AR headsets &#8211; a field-of-view limitation that allows you to view virtual content in only a small rectangular area in your view through the glasses. In addition, combining this setup with a Leap Motion hand controller could give us access to the much more natural gesture library of the Leap Motion SDK. This setup felt more comfortably in-line with our vision of a future AR headset, so we decided to proceed with it for our next prototype, and consequently for all future prototypes when it proved to be able to accommodate all our needs.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e3f2d2e elementor-widget elementor-widget-image\" data-id=\"e3f2d2e\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"487\" height=\"373\" src=\"https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/11\/Picture1.png\" class=\"attachment-large size-large wp-image-287\" alt=\"\" srcset=\"https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/11\/Picture1.png 487w, https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/11\/Picture1-300x230.png 300w\" sizes=\"(max-width: 487px) 100vw, 487px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">A VR headset (here, the Oculus Rift) + the ZED mini stereo camera + Leap Motion controller<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b554fe0 elementor-widget elementor-widget-text-editor\" data-id=\"b554fe0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">The second issue, that of marker \/ image tracking, was important to solve for a number of reasons. Image recognition can serve as a link between the virtual and physical world; either for initializing virtual objects at a fixed point in the real world, or for synchronizing the virtual space for two users (which we would need to do for our Learner-Learner \/ Learner-Teacher Interaction prototypes)<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4f5dfe1 elementor-widget elementor-widget-heading\" data-id=\"4f5dfe1\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Marker Tracking<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-44c16b9 elementor-widget elementor-widget-text-editor\" data-id=\"44c16b9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">For our setup, we found that we could use OpenCV for Unity to implement image tracking. We first did a quick gold spike on that, which we then had to optimize. There was also another issue of the Zed camera freezing during execution. Eventually we tracked the Zed freezing issue to an incompatibility issue with the Zed SDK and the NVIDIA Graphics Drivers. After downgrading the driver version, we were able to overcome this problem.<\/span><\/p><p><span style=\"font-weight: 400;\">Using the intrinsic calibration parameters of the Zed Mini\u2019s left camera to feed into the OpenCV Marker Detection script, we were able to significantly improve the quality of tracking. However, it was running at 30 fps, which was too slow.<\/span><\/p><p><span style=\"font-weight: 400;\">We then moved the marker detection to a background thread, in order to allow the main render thread to continue running at our target 90fps. This meant that tracked marker positions would come in a few frames behind the current view, but we stored the position of the tracker in world space and smoothed the data out, so that stationary and slow-moving trackers would appear to be tracking correctly.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5ad5f74 elementor-widget elementor-widget-image\" data-id=\"5ad5f74\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"768\" height=\"460\" src=\"https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/markertrack-768x460.png\" class=\"attachment-medium_large size-medium_large wp-image-366\" alt=\"\" srcset=\"https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/markertrack-768x460.png 768w, https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/markertrack-300x180.png 300w, https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/markertrack-1024x614.png 1024w, https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/markertrack.png 1688w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Successful initialization of a virtual cube on a tracked marker<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0ee5475 elementor-widget elementor-widget-heading\" data-id=\"0ee5475\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Image Tracking<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a652563 elementor-widget elementor-widget-text-editor\" data-id=\"a652563\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">While marker tracking using arUco markers yielded great success, using image tracking using OpenCV\u2019s image pattern detection was considerably less reliable. We found that compared to marker tracking, image tracking both required more computational resources to calculate, and was less accurate in tracking quality than the markers. However, it is possible to use image tracking in situations where the images remain stationary throughout the experience.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cda39b6 elementor-widget elementor-widget-heading\" data-id=\"cda39b6\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Locating The Camera - Room Tracking<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-31bf1ba elementor-widget elementor-widget-text-editor\" data-id=\"31bf1ba\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">Both the marker and image tracking was not without their limitations, however. Most notably, the trackables had to span a certain fraction of the total field of view of the camera for OpenCV to detect them. Using a conservative estimate of the maximum distance at which a 10cm arUco tracker would be detected, we constructed 50cm-wide wall markers, which we estimated would be seen at an average distance of 3.5m from the center of the room. This worked quite well when placing content at the positions of the markers.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-613ecb7 elementor-widget elementor-widget-image\" data-id=\"613ecb7\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"768\" height=\"462\" src=\"https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/wallmarker-768x462.png\" class=\"attachment-medium_large size-medium_large wp-image-367\" alt=\"\" srcset=\"https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/wallmarker-768x462.png 768w, https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/wallmarker-300x180.png 300w, https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/wallmarker-1024x616.png 1024w, https:\/\/projects-old.etc.cmu.edu\/pupil\/wp-content\/uploads\/2018\/12\/wallmarker.png 1682w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Placing virtual objects on large wall markers<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0a91d49 elementor-widget elementor-widget-text-editor\" data-id=\"0a91d49\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">While the positional tracking of the markers were relatively stable, we observed heavy jitter when tracking the rotation of the markers. When we first encountered this issue, we were investigating the use of the larger wall-markers to locate the camera at a room-scale. Slight changes to the marker\u2019s rotation resulted in significant changes in the camera\u2019s position. Attempts to smooth this data out by using multiple wall-markers yielded limited success, as the other markers contributed their own sources of jitter as well. <\/span><\/p><p><span style=\"font-weight: 400;\">In the end, we decided to use multiple 10cm markers placed on the table as our source of room tracking, and then rely on the Zed\u2019s internal positional tracking when the markers were not in view. Because the Zed\u2019s internal tracking accumulates drift over time, however, we saw significant jumps in tracking when the camera relocated a marker after not seeing any markers for some time. This resulted in a noticeable feeling of disorientation for the player in the headset. The markers would have to be in view throughout the experience, or at least looked at in regular intervals.<\/span><\/p><p><span style=\"font-weight: 400;\">After about halfway through development, we migrated our VR headset from the Oculus Rift to the Vive, which allowed us to use the outside-in tracking of the Vive lighthouses to locate the users in a room space.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9a0c4c0 elementor-widget elementor-widget-spacer\" data-id=\"9a0c4c0\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-402fed8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"402fed8\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-50d9708\" data-id=\"50d9708\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-ab1e6db\" data-id=\"ab1e6db\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-58d1add elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"58d1add\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<a class=\"elementor-icon\" href=\"http:\/\/www.etc.cmu.edu\/projects\/pupil\/index.php\/2d-geometry-prototype\/\">\n\t\t\t\t\t\t\t<i class=\"fa fa-arrow-circle-o-right\" aria-hidden=\"true\"><\/i>\n\t\t\t\t\t\t<\/a>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Technical Setup Platform Decision Given the future-facing nature of our goals, we had to find technology to support us. Initially, we considered using the Hololens, Meta 2, and the Magic Leap. Since we were familiar with developing for the Hololens and had immediate access to it, we chose it as the platform for our initial [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","footnotes":""},"class_list":["post-365","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/wp-json\/wp\/v2\/pages\/365"}],"collection":[{"href":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/wp-json\/wp\/v2\/comments?post=365"}],"version-history":[{"count":5,"href":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/wp-json\/wp\/v2\/pages\/365\/revisions"}],"predecessor-version":[{"id":422,"href":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/wp-json\/wp\/v2\/pages\/365\/revisions\/422"}],"wp:attachment":[{"href":"https:\/\/projects-old.etc.cmu.edu\/pupil\/index.php\/wp-json\/wp\/v2\/media?parent=365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}