rviz错误, Attempt to set a screen on a child window.

在ROS环境中使用RVIZ时,在多显示器配置下会遇到与Qt相关的错误,这并非操作失误,而是RVIZ与Qt在特定环境下的已知问题。错误源自对QGLWidget的尺寸限制调用,此问题在切换到Qt5.4的QOpenGLWidget后消失。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在ros中运行rviz时不断刷出错误

0x29a0920 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x1e857b0) ): Attempt to set a screen on a child window.

该错误会在多显示器的环境下报出,并不是使用上的错误而是rviz本身与Qt的一个bug

Finally, I understood what happens:

The warning messages occur whenever setMinimumWidth() / setMinimumHeight() are called on a QGLWidget under Linux with a dual screen display.
This is probably a bug in Qt. It will probably be not fixed, since it is recommended in the documentation to use the new QOpenGLWidget instead, that appeared in Qt 5.4 (note: "OpenGL" instead of "GL"), which I did and the warning messages disappeared.

Edit: I saw a message from someone that had problems with text not rendering properly with the new QOpenGLWidget which I answer here: When using the new QOpenGLWidget, one needs to take care that it no longer has an independent OpenGL context, it shares the OpenGL context with Qt (therefore, OpenGL states modified in the rendering function needs to be restored after exiting the rendering function, for instance blending mode).

rviz作者暂时没有解决这个问题

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值