ros-ukraine / leobot

LeoBot telepresence robot
MIT License
21 stars 4 forks source link

Control head from imu #78

Closed SystemDiagnosticss closed 6 years ago

SystemDiagnosticss commented 6 years ago

Closes #55 Closes #61

MaxZhaloba commented 6 years ago

Robot head reacts to movement, however I couldn't test the usability because of rendering delay on my computer.

There's one issue with truncated image height. In landscape orientation it looks OK:

While in landscape made the image is truncated so that I cannot see the paintings:

Maybe, it would work to centre the picture in viewport vertically: https://css-tricks.com/centering-css-complete-guide/

SystemDiagnosticss commented 6 years ago

@YarynaD Hello. Do you have any idea how I can lock landscape mode in browser? I tryed media query, js, manifest but its dosn't helpfull for me. I need horizontal orientation page only. Thank you.

YarynaD commented 6 years ago

@SystemDiagnosticss Hello. I'm not really sure if it's a good idea. It works for simple example. Please see the attached file in browser inspector's Responsive design mode. And let's discuss it after you check it.

mode.zip

SystemDiagnosticss commented 6 years ago

@YarynaD sorry but in this solution page change orientation also screenshot_2018-03-21-23-40-05 screenshot_2018-03-21-23-39-49

YarynaD commented 6 years ago

You can remove (orientation:portrait) to keep it fixed and change the rotation angle to needed. But it's still not the best idea. If the problem is with height of the images, the height itself can be fixed with media query. Than fixed orientation mode might be unnecessary. I can try that, but please, point me to the .css and .html files you used.

YarynaD commented 6 years ago

When you remove (orientation:portrait) page will behave this way landscape1 landscape2

SystemDiagnosticss commented 6 years ago

@YarynaD maybe I incorrect ask question. Really I need disable orientationchange event in browser.

Work branch - F#55_control_head_via_imu You can find html here and css here and js here

And also I need making this webpage fullscreen (hide address bar)

MaxZhaloba commented 6 years ago

We've tested this task with @SystemDiagnosticss on his laptop and on my phone with VR headset. Simulation in VR makes a good impression overall, and somewhat resembles an old DOS game "Stunts" (you can play it online here :) ). There are a few issues, but the basic functionality works well, so I suggest to merge this PR and open separate tasks for adjustments. It will prevent this issue from growing to large.

The following items need to be refined:

  1. Prevent screen locking on timeout
  2. Remove navigation and address bar (go fullscreen)
  3. Increase the simulation speed. Today it gave 7 FPS when we just started Gazebo and 4 FPS when we opened the video stream in VR.
MaxZhaloba commented 6 years ago

I've created separate issues for improvements: #89, #90 and #91. @SystemDiagnosticss, if you're available, please continue the development in the corresponding branches.