0
$\begingroup$

Rosanswers logo

Hi all,

I have searched but I can not find any clue to launch rviz with a fixed frame size. For example, I want to set the visualization region to be 1080*900 pixel? How to do that?

I am using Fuerte on Ubuntu*64.


Originally posted by ZiyangLI on ROS Answers with karma: 93 on 2014-02-20

Post score: 1


Original comments

Comment by trunc8 on 2021-07-02:
Though not an ideal solution, here's how I have dealt with this. After resizing the window and setting the view, save the RViz config. Load the RViz config during the next launch. You can manually tweak numbers inside the saved .rviz file too.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

rviz should remember the last window size/position it was launched with (at least it did when I just tested this). Another option is the use of the wmctrl Unix/Linux command line tool. With this, you can easily alter window sizes and positions of all windows in your X Window manager.

Using

 wmctrl -l

you can get a list of all managed windows. Using one of the names retrieved (it helps when it is unique ;) ) you can then specifiy a window position and size for example like this:

wmctrl -r 'ocs_default.rviz - RViz' -e '0,1920,0,1080,900'

Originally posted by Stefan Kohlbrecher with karma: 24361 on 2014-02-20

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ZiyangLI on 2014-02-21:
Can this method specify the size of the visual region of rviz, since I have no interest in the control panel.

Comment by Stefan Kohlbrecher on 2014-02-25:
Indirectly, by figuring out how much "overhead" the borders are (in pixels) and using that information to resize using wmctrl accordingly. I know it´s not the perfect solution, but a relatively easy one that doesn´t require changing rviz code and recompiling.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.