In present time, examination of human-robot interaction is highly important. The research in HRI has started to focus on the question, whether psychological phenomena, that are present in human-human interaction are also present in human-robot interaction. It turned out, it is necessary to create an environment for interaction with humanoid robots, to study and interpret these phenomena. We created a complex environment for controlling the iCub robot, creating light stimuli, recording reactions and measuring reaction time. Our environment is modular and is able to work with two forms of robot. With a robot in a simulator and with a physical robot. We also pointed out possibilities of how to extend to another form of robot embodiment, a robot in virtual reality. The developed environment was used for an experiment, that focused on how the embodiment of the robot influenced the efect of social gaze in human-robot interaction.