Search Unity

Question Struggling to stream to MRTK Canvas Raw Image

Discussion in 'AR' started by boogie_muffins, Feb 13, 2023.

  1. boogie_muffins

    boogie_muffins

    Joined:
    Oct 17, 2022
    Posts:
    6
    Hi,

    I am currently developing an app for the HoloLens 2 and struggling to find a GameObject to attach a Raw Image to to stream a camera feed from a Raspberry Pi to the app. I followed @maciejw94 's code found here:
    Question - How to Place ROS Image Messages in Scene and View in HMD? - Unity Forum

    I am using a ROS Network to subscribe to a /raw_image topic and can successfully see the stream when I create a UI -> Raw Image object in unity. Although I'm thrilled that I can at least see the camera feed, I am struggling to convert this stream into the MRTK/HoloLens scope of things. I ideally would like to add the image texture's to something like MRTK's slate prefab to make it manipulatable. I have tried converting the regular canvas to a MRTK Canvas but I am no longer able to see my video stream when I attempt this. I'm struggling to find any resources to achieve this functionality so any help, guidance, tutorials, or direction would be greatly appreciated. I'm still new to all of this and still learning :)