Rotate the camera's sight (without interaction)

Requests regarding how to set up experiments in ARGoS.
emerckx
Posts: 15
Joined: Tue Mar 29, 2016 1:37 pm
Location: Belgium
Contact:

Rotate the camera's sight (without interaction)

Postby emerckx » Sun May 22, 2016 11:10 pm

Hello,

I defined the following camera position which looks from a position with a positive x coordinate, to the center of the arena.

Code: Select all

<visualization> <qt-opengl> <camera> <placement idx="0" position="2,0,2" look_at="0,0,1" lens_focal_length="20" /> </camera> </qt-opengl> </visualization>
When I run the experiment, the camera's sight is upside down.
Is there a way to rotate the sight of the camera?
(I've checked the gripping example, but couldn't find how it's done)

Sincerely yours,
Ewout Merckx

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

Re: Rotate the camera's sight (without interaction)

Postby pincy » Tue May 24, 2016 3:48 pm

Hi Ewout,

Try to slightly rotate the camera so that it's not perfectly vertical, and use those values. Just a little nudge is enough.That usually does the trick. If not, I'll see if I can change the code to also specify the Up vector to resolve the ambiguity in the positioning.

Cheers,
Carlo
I made ARGoS.

emerckx
Posts: 15
Joined: Tue Mar 29, 2016 1:37 pm
Location: Belgium
Contact:

Re: Rotate the camera's sight (without interaction)

Postby emerckx » Thu May 26, 2016 10:57 pm

Hello Carlo,

Thank you for the solution, it works.

I've added some random number numbers after the decimal point, to obtain the slight rotation.
The used values can be seen in the code below.

Code: Select all

<placement idx="0" position="1.9243,0.0426,1.9041" look_at="0.0314,-0.0028,1.0041" lens_focal_length="20" />
Sincerely yours,
Ewout Merckx

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

Re: Rotate the camera's sight (without interaction)

Postby pincy » Fri May 27, 2016 8:22 pm

Hi Ewout,

The bug is fixed in the latest development version. I'll make an official release with a few more fixes as soon as I have a little time.

Cheers,
Carlo
I made ARGoS.


Return to “How to... ?”