Adjust Omnidirectional Camera Range

Requests regarding how to set up experiments in ARGoS.
M_Rizk
Posts: 28
Joined: Thu Apr 30, 2015 2:46 am

Adjust Omnidirectional Camera Range

Postby M_Rizk » Wed Jul 22, 2015 6:37 am

I want to set the range of the footbot omnidirectional camera to be the same as the rab range. In other words, I want all footbots that are within viewing range of each other to also be within messaging range and vice versa. Is there a way to adjust the omnidirectional camera range via the .argos file as you would with aperture? Alternatively, is there a way to adjust the aperture to achieve an exact viewing range?

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

Re: Adjust Omnidirectional Camera Range

Postby pincy » Wed Jul 22, 2015 2:47 pm

The camera aperture determines the viewing range on the ground. If you set the aperture, you automatically set a range.

The omnidirectional camera is simulated as a cone with its base laying parallel to the floor, and its tip located where the mirror is. The cone base radius is indeed the camera range, while the cone aperture corresponds to the camera aperture.

The relationship between range and aperture is as follows (ARGoS code):

RANGE = MIRROR_ELEVATION * TAN(APERTURE)

So, if you want to find the aperture that corresponds to a specific range, you need

APERTURE = ATAN2(RANGE, MIRROR_ELEVATION)

MIRROR_HEIGHT depends on the robot. For the foot-bot it is 0.288699733 (ARGoS code).
I made ARGoS.

M_Rizk
Posts: 28
Joined: Thu Apr 30, 2015 2:46 am

Re: Adjust Omnidirectional Camera Range

Postby M_Rizk » Thu Jul 30, 2015 1:49 am

This works perfectly. Thank you! :)

Just a heads up to anyone else who uses these formulae, make sure that you're using degrees and not radians. I forgot to do that and ended up getting some unusual results.


Return to “How to... ?”