简体   繁体   English

CARLA/UE4 中的随机图像翻转

[英]Random image flipping in CARLA/UE4

I am working with Carla 0.9.9 in Unreal 4.24 (Windows10/RTX2080) right now in order to get some basic autonomous driving functions going.我现在正在 Unreal 4.24 (Windows10/RTX2080) 中使用 Carla 0.9.9,以便获得一些基本的自动驾驶功能。 So far it seems to be working fine, but I have a weird problem and I'm quite confident that it's not caused by my code.到目前为止它似乎工作正常,但我有一个奇怪的问题,我非常有信心这不是由我的代码引起的。 I've googled around and this problem seems to be quite unique, but maybe one of you guys can point me in the right direction:我用谷歌搜索了一下,这个问题似乎很独特,但也许你们中的一个人可以指出我正确的方向:

I am displaying a few steps of my lane detection algorithm in different windows (eg ROI, detected lines...), and every few seconds, depending on the current framerate, the image will randomly flip to being upside down in some of the windows (only one at a time and only for a single/few frames), except for the main window where I am controlling the car (manually for now).我在不同的窗口中显示我的车道检测算法的几个步骤(例如 ROI、检测到的线...),每隔几秒钟,根据当前的帧速率,图像将随机翻转到在某些窗口中颠倒(一次只有一个,并且只有一个/几帧),除了我控制汽车的主窗口(现在手动)。 I've tried setting the Unreal Editor to different framerates, and there is definitely a connection between the output framerate (server side) and the amount of these "flips" happening, to the point where it's almost never happening if I run it at 15-20fps.我尝试将虚幻编辑器设置为不同的帧率,输出帧率(服务器端)和发生的这些“翻转”的数量之间肯定存在联系,如果我在 15 运行它几乎不会发生这种情况-20fps。 There is also some "tearing" going on (eg only roughly the upper half of the image is flipped, like Vsynch is switched off) sometimes, which leads me to believe that the root cause is somewhere in the rendering part and not the python scripts.有时也会发生一些“撕裂”(例如,只有大约图像的上半部分被翻转,比如 Vsynch 被关闭),这让我相信根本原因在渲染部分的某个地方而不是 python 脚本. The point is: when the image is upside down, my lane detection is seeing the "lane" in the wrong place, which could lead to all sorts of trouble down the line.重点是:当图像颠倒时,我的车道检测在错误的地方看到了“车道”,这可能会导致各种麻烦。

To be honest I'm not that familiar with the whole Unreal Engine/DirectX(?)-rendering pipeline, so I am a little lost what might be causing this issue.老实说,我对整个 Unreal Engine/DirectX(?) 渲染管道不太熟悉,所以我有点不明白可能导致这个问题的原因。 I'm grateful for any ideas on how to fix this, thanks in advance!我很感激有关如何解决此问题的任何想法,在此先感谢!

Okay, in case anybody ever has the same problem, here's what I found out: the client was running too fast in relation to the server.好的,如果有人遇到同样的问题,我发现:客户端相对于服务器运行得太快。 I limited the client side to 30fps now and that fixed it.我现在将客户端限制为 30fps 并修复了它。 This issue will only occur if the tick rate of the client is so high that it has trouble keeping up while running the calculations in the background.仅当客户端的滴答率如此之高以至于在后台运行计算时无法跟上时,才会出现此问题。

I still can't figure out why the image is upside down in that case, but hey...我仍然无法弄清楚为什么图像在这种情况下是颠倒的,但是嘿...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM