{"action":"created","issue":{"url":"https://api.github.com/repos/morse-simulator/morse/issues/623","labels_url":"https://api.github.com/repos/morse-simulator/morse/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/morse-simulator/morse/issues/623/comments","events_url":"https://api.github.com/repos/morse-simulator/morse/issues/623/events","html_url":"https://github.com/morse-simulator/morse/issues/623","id":80848332,"number":623,"title":"MORSE remote viewer","user":{"login":"giodegas","id":6838625,"avatar_url":"https://avatars.githubusercontent.com/u/6838625?v=3","gravatar_id":"","url":"https://api.github.com/users/giodegas","html_url":"https://github.com/giodegas","followers_url":"https://api.github.com/users/giodegas/followers","following_url":"https://api.github.com/users/giodegas/following{/other_user}","gists_url":"https://api.github.com/users/giodegas/gists{/gist_id}","starred_url":"https://api.github.com/users/giodegas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giodegas/subscriptions","organizations_url":"https://api.github.com/users/giodegas/orgs","repos_url":"https://api.github.com/users/giodegas/repos","events_url":"https://api.github.com/users/giodegas/events{/privacy}","received_events_url":"https://api.github.com/users/giodegas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-26T08:03:47Z","updated_at":"2015-05-26T15:00:52Z","closed_at":null,"body":"Is there any way to have MORSE running in a cloud and have a local blender to do the rendering?\r\nOr any kind of WebGL remote viewer, like [Blend4Web](http://www.blend4web.com) ?\r\n"},"comment":{"url":"https://api.github.com/repos/morse-simulator/morse/issues/comments/105554305","html_url":"https://github.com/morse-simulator/morse/issues/623#issuecomment-105554305","issue_url":"https://api.github.com/repos/morse-simulator/morse/issues/623","id":105554305,"user":{"login":"severin-lemaignan","id":385379,"avatar_url":"https://avatars.githubusercontent.com/u/385379?v=3","gravatar_id":"","url":"https://api.github.com/users/severin-lemaignan","html_url":"https://github.com/severin-lemaignan","followers_url":"https://api.github.com/users/severin-lemaignan/followers","following_url":"https://api.github.com/users/severin-lemaignan/following{/other_user}","gists_url":"https://api.github.com/users/severin-lemaignan/gists{/gist_id}","starred_url":"https://api.github.com/users/severin-lemaignan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/severin-lemaignan/subscriptions","organizations_url":"https://api.github.com/users/severin-lemaignan/orgs","repos_url":"https://api.github.com/users/severin-lemaignan/repos","events_url":"https://api.github.com/users/severin-lemaignan/events{/privacy}","received_events_url":"https://api.github.com/users/severin-lemaignan/received_events","type":"User","site_admin":false},"created_at":"2015-05-26T15:00:52Z","updated_at":"2015-05-26T15:00:52Z","body":"@giodegas \"compute-only\" MORSE (more frequently called *headless* simulation) is possible, as long as you have a OpenGL stack available.\r\n\r\nI post here the explanation I gave a while ago on that matter:\r\n\r\n*********************\r\n\r\n# Brief summary \r\n\r\nI stream the pose of the robot with ROS at 60Hz with no display/no GPU\r\nat all on a Intel Core i7.\r\n\r\nIn the same conditions, I stream a camera at 2.7Hz.\r\n\r\n*********************\r\n\r\nFirst, let's clarify one thing: MORSE *requires* OpenGL. There is\r\ncurrently no way around, and, as a 3D simulator, we are likely to keep\r\nthis requirement in the foreseeable future.\r\n\r\nSo 'headless' MORSE still means that your OS of choice provides an\r\nOpenGL implementation.\r\n\r\nOpenGL *does not* mandate a GPU, though. It is hence perfectly possible\r\nto run MORSE in the cloud, for instance on a cluster that does not\r\nprovide GPUs. Obviously, no GPU means no 3D hardware acceleration, but\r\ndepending on your application, it can still be perfectly ok. Read on for\r\nsome 'benchmarks'.\r\n\r\nIn the Linux world, the best option, today, for CPU-based 3D\r\nacceleration is LLVMpipe. It is really easy to install (it took me ~5min\r\nto compile and test MORSE on the CPU).\r\n\r\nGrab the lastest version of Mesa here (tested with 9.2.2):\r\n`ftp://ftp.freedesktop.org/pub/mesa/`\r\n\r\nCompile with:\r\n```\r\n$ scons build=release libgl-xlib\r\n```\r\nThis will result in a new `libGL.so` that uses the CPU instead of the GPU.\r\nBlender runs pretty well with it.\r\n\r\nTo run MORSE with this library:\r\n```\r\nLD_LIBRARY_PATH=<path to your Mesa>/build/linux-x86_64/gallium/targets/libgl-xlib morse run <env>\r\n```\r\n\r\nSome quick performance results with the default environment:\r\n\r\n```\r\n$ morse create test\r\n```\r\n\r\n(edit `test/default.py` and `add env.show_framerate()` at the end for the FPS)\r\n\r\n\r\n##### Intel HD4000\r\n```\r\n$ morse run test\r\n```\r\n-> 60 FPS with hardware acceleration (Intel HD4000 IvyBridge)\r\n\r\n##### LLVMpipe\r\n```\r\n$ LD_LIBRARY_PATH=<mesa>/build/linux-x86_64/gallium/targets/libgl-xlib morse run test\r\n```\r\n-> 14 FPS with LLVMpipe on a Intel Core i7, 8GB RAM\r\n\r\n\r\n##### FASTMODE=True\r\n\r\n(edit `test/default.py` and switch `fastmode` to True)\r\n\r\nIn fast mode, you only get the wireframe of the models: this is fine if you do not do any vision-based sensing.\r\n\r\n```\r\n$ LD_LIBRARY_PATH=<mesa>/build/linux-x86_64/gallium/targets/libgl-xlib morse run test\r\n```\r\n\r\n-> 54 FPS with LLVMpipe on a Intel Core i7, 8GB RAM\r\n\r\n\r\nLast thing: on a headless server, you may want to run `Xvfb` to create a\r\n'fake' display to run MORSE. You need to create it with a depth of 24bit:\r\n\r\n```\r\n$ Xvfb -screen 0 1024x768x24 :1 &\r\n$ LD_LIBRARY_PATH=<LLVMpipe path> DISPLAY=:1 morse <...>\r\n```\r\n\r\nA quick test shows that I can stream one camera with ROS at 2.7Hz :-/,\r\nbut in fast mode, I stream the pose of the robot at 60Hz without issue.\r\n"}}