Many of the developmental evaluations in SEDRo are based on experiments from developmental psychology. The field utilizes various behavioral metrics such as looking time, sucking rate and head turning to evaluate developmental skills. In our evaluation of Unity perception, we rely on looking time of the agent at different stimuli to make inferences. In this context, it is important for us to detect points of gaze of the agent.

The gaze points are generated by indexing the collision points between the agent's eye gaze laser and the experiment setup in the following way.

To get the coordinates of the agent’s gaze in SEDRo, I have written the following script.

I have chosen to use OnTriggerStay as it is called on all frames for every collider that touches the trigger. In SEDRo, the trigger is the transparent cube created just on top of the Unity Perception experiment setups. The collider is the ‘laser’ under eyesight_main.

I have attached the tag ‘looking’ to the collider viz the laser. If the collider touching the trigger is ‘laser’ then using raycast, the collision point is stored.

To convert the collision point to from global coordinates to local coordinates in relation to the transparent cube.