QT OpenGL frame capture error

Requests regarding how to set up experiments in ARGoS.
jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

QT OpenGL frame capture error

Postby jharwell » Mon Feb 01, 2021 10:44 pm

Hi Carlo,

I'm trying to capture a set of frames in ARGoS and stitch them together to make a video. The issue I'm having is that for most frames, the floor of the arena renders as black, even though it really is mostly white with some black squares on it for robots to find. What would be causing such a strange error ?

Attached are two adjacently captured screenshots, 10 timesteps apart, with the capture rate set to every 10 timesteps. The first one renders properly, and second one does not.

Image
Image

After timesteps 321, all the other captured images have the arena floor as black. The one robot always renders properly though.

- John
Attachments
frame_00311.png
frame_00311.png (30.38 KiB) Viewed 27880 times
frame_00321.png
frame_00321.png (9.54 KiB) Viewed 27880 times

jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Re: QT OpenGL frame capture error

Postby jharwell » Tue Feb 02, 2021 7:26 pm

Upon further investigation, I found that the black floor was caused by having lights that are too high above the floor/too bright. Why would this be the case ?

pincy
Site Admin
Posts: 640
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: QT OpenGL frame capture error

Postby pincy » Tue Feb 02, 2021 7:35 pm

I never had an error of this kind before. It might happen that the issue you're encountering is due to the lights, but also position of the camera might create funny artefacts. Have you tried moving the camera a little bit?
I made ARGoS.

jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Re: QT OpenGL frame capture error

Postby jharwell » Wed Feb 03, 2021 1:36 am

Yeah I did try that. The default ARGoS camera positions were a little low for what I wanted, so I raised them up to ~10 meters above the arena. Instead of the entire floor being black, only MOST of it was--the end of the arena furthest from the lights had a white floor, and I was able to determine that playing with the rendering perspective would cause the white portion of the floor to move.

The workaround of lowering my lights works for small arenas, but not for large (say 200x200) arenas, where I need to put the light up high and make it very bright so robots are always able to localize relative to it/phototaxis to it. I don't get this error if I use a single overhead camera positioned at the arena center which looks directly down at the center of the arena floor, so I think you're right that it is tied to the rendering perspective somehow.

Do the ARGoS lights interact with OpenGL at all ? It seems like they must, because changing the light location/intensity changes the rendering.

I checked the /tmp/argos_floor.png file ARGoS saves everytime it redraws the floor, and that file shows the floor being exactly as I expect, so the issue is only in the Qt OpenGL visualization plugin I think.

pincy
Site Admin
Posts: 640
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: QT OpenGL frame capture error

Postby pincy » Wed Feb 03, 2021 1:40 am

The light entity has no effect on the arena. The lights in the arena are placed statically, which admittedly sucks. We could add an XML tag that allows people to override where the lights are placed. If you say nothing, the lights are in the standard place. If you write XML explicitly, then the lights are where you place them. This might solve your problem!
I made ARGoS.

jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Re: QT OpenGL frame capture error

Postby jharwell » Thu Feb 18, 2021 1:52 am

Specifying the light placements manually helped to some degree. Now, I only see that black floor sporadically (see attached video). If I disable interpolation it happens less, but it still happens. The blocks on the floor (black squares in the video) also seem to sporadically move around, which does not happen in the actual simulation.

https://drive.google.com/file/d/1Gm-vvn ... sp=sharing

pincy
Site Admin
Posts: 640
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: QT OpenGL frame capture error

Postby pincy » Thu Feb 18, 2021 1:54 am

The switch from beta56 to beta57 has introduced a few problems, it seems. I am also experiencing garbled visualization (I opened an issue yesterday). Michael is looking into it - I guess I'll keep testing to see if there's something weird going on.
I made ARGoS.


Return to “How to... ?”