{"action":"created","issue":{"url":"https://api.github.com/repos/toinsson/pyrealsense/issues/9","repository_url":"https://api.github.com/repos/toinsson/pyrealsense","labels_url":"https://api.github.com/repos/toinsson/pyrealsense/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/toinsson/pyrealsense/issues/9/comments","events_url":"https://api.github.com/repos/toinsson/pyrealsense/issues/9/events","html_url":"https://github.com/toinsson/pyrealsense/issues/9","id":198603787,"number":9,"title":"Accessing Multiple Cameras","user":{"login":"joehager","id":3851341,"avatar_url":"https://avatars.githubusercontent.com/u/3851341?v=3","gravatar_id":"","url":"https://api.github.com/users/joehager","html_url":"https://github.com/joehager","followers_url":"https://api.github.com/users/joehager/followers","following_url":"https://api.github.com/users/joehager/following{/other_user}","gists_url":"https://api.github.com/users/joehager/gists{/gist_id}","starred_url":"https://api.github.com/users/joehager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehager/subscriptions","organizations_url":"https://api.github.com/users/joehager/orgs","repos_url":"https://api.github.com/users/joehager/repos","events_url":"https://api.github.com/users/joehager/events{/privacy}","received_events_url":"https://api.github.com/users/joehager/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-04T00:28:01Z","updated_at":"2017-01-04T11:00:28Z","closed_at":null,"body":"Hi,\r\n\r\nI'm encountering an issue where if I try to access multiple cameras at the same time, I can only get frames from one of the units.\r\n\r\nMy system has two cameras attached, both are SR300 units. I'm using librealsense v 1.9.7.\r\n\r\nI modified one of the example files as follows:\r\n\r\n```\r\nimport logging\r\nlogging.basicConfig(level=logging.INFO)\r\nimport numpy as np\r\nimport cv2\r\nimport pyrealsense as pyrs\r\n\r\npyrs.start()\r\ndev0 = pyrs.Device(device_id = 0, streams = [pyrs.ColourStream(fps=30)])\r\ndev1 = pyrs.Device(device_id = 1, streams = [pyrs.ColourStream(fps=30)])\r\n\r\ncnt = 0\r\n\r\nwhile cnt < 30:\r\n        dev0.wait_for_frame()\r\n        dev1.wait_for_frame()\r\n        cnt += 1\r\n\r\nc0 = dev0.colour\r\nc0 = cv2.cvtColor(c0, cv2.COLOR_RGB2BGR)\r\n\r\nimg_str = cv2.imencode('.jpg', c0)[1].tobytes()\r\nfile0 = open(\"file0.jpg\", \"wb\")\r\nfile0.write(img_str)\r\nfile0.close()\r\n\r\nc1 = dev1.colour\r\nc1 = cv2.cvtColor(c1, cv2.COLOR_RGB2BGR)\r\n\r\nimg_str1= cv2.imencode('.jpg', c1)[1].tobytes()\r\nfile1 = open(\"file1.jpg\", \"wb\")\r\nfile1.write(img_str1)\r\nfile1.close()\r\n```\r\n\r\nAfter executing this code, I see the same image in both files.\r\n\r\nAm I using the python wrapper incorrectly? If so, what is the proper way to access two cameras?\r\n\r\nThanks,\r\nJoe"},"comment":{"url":"https://api.github.com/repos/toinsson/pyrealsense/issues/comments/270346084","html_url":"https://github.com/toinsson/pyrealsense/issues/9#issuecomment-270346084","issue_url":"https://api.github.com/repos/toinsson/pyrealsense/issues/9","id":270346084,"user":{"login":"toinsson","id":1176108,"avatar_url":"https://avatars.githubusercontent.com/u/1176108?v=3","gravatar_id":"","url":"https://api.github.com/users/toinsson","html_url":"https://github.com/toinsson","followers_url":"https://api.github.com/users/toinsson/followers","following_url":"https://api.github.com/users/toinsson/following{/other_user}","gists_url":"https://api.github.com/users/toinsson/gists{/gist_id}","starred_url":"https://api.github.com/users/toinsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toinsson/subscriptions","organizations_url":"https://api.github.com/users/toinsson/orgs","repos_url":"https://api.github.com/users/toinsson/repos","events_url":"https://api.github.com/users/toinsson/events{/privacy}","received_events_url":"https://api.github.com/users/toinsson/received_events","type":"User","site_admin":false},"created_at":"2017-01-04T11:00:28Z","updated_at":"2017-01-04T11:00:28Z","body":"yes, you are correct. \r\nI think it is because I set the property for the streams on the Device class and not the instance - see lines [102, 104, 109, 112]. However that is the recommended way to do for dynamic properties.\r\nI'll look into it."}}
{"actor":{"display_login":"toinsson"}}