Ask Your Question
1

In RVIZ, why does the aspect ratio with the top-down view change after a selection

asked 2011-03-06 21:16:30 -0600

Benoit Larochelle gravatar image

updated 2011-03-06 21:19:21 -0600

In RVIZ, with the top-down view, the user can resize the window to any format, and the aspect ratio stays constant (i.e. the squares of the grid are always squares). However, after the user tried to select something, the aspect ratio becomes variables. For example, if the window is 1000 X 500, the grid cells are squeezed and they are displayed twice as large as their height.

Why is that? How can I get rid of this behaviour?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2011-03-07 03:13:06 -0600

hersh gravatar image

updated 2011-03-07 03:14:53 -0600

This is definitely a bug. I've opened this ticket https://code.ros.org/trac/ros-pkg/ticket/4858 about it.

edit flag offensive delete link more
1

answered 2011-03-07 04:28:57 -0600

hersh gravatar image

Fixed in trunk. To check out and build the latest version, do:

svn co https://code.ros.org/svn/ros-pkg/stacks/visualization/trunk/rviz cd rviz export ROS_PACKAGE_PATH=pwd:$ROS_PACKAGE_PATH rosmake

edit flag offensive delete link more
0

answered 2011-03-06 21:18:49 -0600

Benoit Larochelle gravatar image

updated 2011-03-06 22:47:02 -0600

I have narrowed down the problem to these two lines:

render_texture->removeAllViewports(); render_texture->addViewport(viewport->getCamera());

inside this function:

SelectionManager::renderAndUnpack


I tried these two alternatives (separately), but they did not change anything:
viewport->getCamera()->setAspectRatio(0.4);
viewport->getCamera()->setAutoAspectRatio(false);

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-03-06 21:16:30 -0600

Seen: 124 times

Last updated: Mar 07 '11