Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RViz on High-DPI screens #102

Closed
wxmerkt opened this issue Apr 9, 2021 · 15 comments
Closed

RViz on High-DPI screens #102

wxmerkt opened this issue Apr 9, 2021 · 15 comments
Labels
bug Something isn't working linux Related to Linux build platform [x86] osx Related to OSX build platform windows Related to Windows build platform

Comments

@wxmerkt
Copy link

wxmerkt commented Apr 9, 2021

I'm using a high-DPI screen with scaling (4K, 200% scale). Regular RViz works just fine while RoboStack-RViz does not use the full viewport.

This is how RViz starts:
image

After some window resizing I get this:
image

Sometimes it also renders garbage/background windows in the black space.

Have you observed something similar? Could this be related to a different OGRE version? I use rviz-1.14.5/the latest.

@lyh458
Copy link

lyh458 commented Apr 10, 2021

I have the same problem as you:

  • everything is ok if I drag the edge of RVIZ windows to resize
  • however, if I press the maximum icon, problem like you.

@stevencolinmartin
Copy link
Contributor

Can confirm that I have this issue across multiple machines and on windows. Resizing does appear to fix most case.

@wolfv
Copy link
Member

wolfv commented Apr 12, 2021

Thanks all for this bug report! Indeed, it's something I noticed on Fedora, too (and usually fixed by resizing the window).

We have similar issues on OS X where the view is skewed (but the skew factor seems to change based on how wide the RViz Window is).

I wonder if there is a place in RViz where the window viewport width is calculated? cc @rhaschke if you have a pointer where I should look I'd be happy to debug this a bit locally.

@stevencolinmartin
Copy link
Contributor

I did a little bit of digging and I am guessing the file is render_widget.cpp in the ogre_helpers folder might be relevant. Seems to have been an issue on High DPI screens here: ros-visualization/rviz#1306 (comment)

@Tobias-Fischer
Copy link
Collaborator

How about just calling RenderWidget::resizeEvent() at the end of the RenderWidget constructor? Unfortunately I don't have a high dpi screen to test it.

@rhaschke
Copy link

This issue seems to be a duplicate of ros-visualization/rviz#1262 which was fixed via ros-visualization/rviz#1263. The corresponding commit should be part of the RoboStack-released version as well. @wolfv, have a look at render_widget.cpp

@ameysutavani
Copy link

I can confirm the same issue on Ubuntu 18.04

@rhaschke
Copy link

@ameysutavani, do you observe this issue with the standard ROS Debian packages as well or with the RoboStack release only?
In the former case, please file a bug report at https://github.com/ros-visualization/rviz.

@lyh458
Copy link

lyh458 commented Apr 26, 2021

@ameysutavani, do you observe this issue with the standard ROS Debian packages as well or with the RoboStack release only?
In the former case, please file a bug report at https://github.com/ros-visualization/rviz.

@rhaschke my system is ubuntu 18.04, and everything of RVIZ (version 1.13.16) with the standard ROS Debian packages (melodic) is ok, but has the same issue after installing this devel with conda.

@ameysutavani
Copy link

ameysutavani commented Apr 26, 2021

@ameysutavani, do you observe this issue with the standard ROS Debian packages as well or with the RoboStack release only?
In the former case, please file a bug report at https://github.com/ros-visualization/rviz.

@rhaschke The above issue does not seem to happen with deb install rviz. I can confirm this for both ros melodic and ros noetic

@Tobias-Fischer Tobias-Fischer added bug Something isn't working linux Related to Linux build platform [x86] osx Related to OSX build platform windows Related to Windows build platform labels May 11, 2021
@Tobias-Fischer Tobias-Fischer changed the title RViz on Ubuntu on High-DPI screens RViz on High-DPI screens May 11, 2021
@Tobias-Fischer
Copy link
Collaborator

Tobias-Fischer commented Jun 7, 2021

Hiya, I just had a look at this - it seems like the ogre selector was wrong in

--- a/src/rviz/ogre_helpers/render_widget.cpp
+++ b/src/rviz/ogre_helpers/render_widget.cpp
@@ -98,7 +98,7 @@ void RenderWidget::resizeEvent(QResizeEvent* e)
* So here we just always force it to be even. */
const int w = width() * pixel_ratio_;
render_window_->resize(w + (w % 2), height() * pixel_ratio_);
-#if OGRE_VERSION < OGRE_VERSION_CHECK(1, 10, 0)
+#if OGRE_VERSION < OGRE_VERSION_CHECK(1, 12, 0)
render_window_->windowMovedOrResized();
#endif
}

We use Ogre 1.10 which needs the call to render_window_->windowMovedOrResized(); which didn't happen without the patch that I just uploaded (@rhaschke).

@ameysutavani @lyh458 @SteveQUT @wxmerkt - let me know if this did the trick for you (the package rebuild will take an hour or so, after that simply mamba upgrade ros-noetic-rviz)

@stevencolinmartin
Copy link
Contributor

Can confirm this is now fixed on Linux64.

@stevencolinmartin
Copy link
Contributor

This appears to have been reintroduced with latest update.
ros-noetic-rviz 1.14.4 py38h7d895da_3 robostack
image

@Tobias-Fischer
Copy link
Collaborator

Seems like the package was accidentally downgraded rather than upgraded.

@simonbogh
Copy link

I experience the view still being skewed using Robostack on macOS Ventura 13.2, Noetic, RViz 1.14.19 (Compiled against Qt version 5.15.6, Compiled against OGRE version 1.10.12 (Xalafu))
1
2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux Related to Linux build platform [x86] osx Related to OSX build platform windows Related to Windows build platform
Projects
None yet
Development

No branches or pull requests

8 participants