How to detect spotlight object intensity by vision sensor of robot

Typically: "How do I... ", "How can I... " questions
Post Reply
rohanp
Posts: 3
Joined: 09 Feb 2018, 14:43

How to detect spotlight object intensity by vision sensor of robot

Post by rohanp » 16 Feb 2018, 10:58

Hello,
So i am working with Kilobots which come equipped with sensor to measure light intensity that falls on the Bot.
So, in the simulator, the bot uses the function simReadVisionSensor to obtain the average intensity(by using index number 11) of ambient light.

However, i added a spotlight object in the scene to see what changes are obtained, but to my surprise, the intensity value showed no difference even when the bot was right in the spot light.

It seems that the bot only corresponds to the intensity of 'sky object' present in the scene.

How can I get the bot to detect spotlight intensity or atleast to change recorded value when near/in spotlight?

coppelia
Site Admin
Posts: 6740
Joined: 14 Dec 2012, 00:25

Re: How to detect spotlight object intensity by vision sensor of robot

Post by coppelia » 17 Feb 2018, 06:16

Hello,

I don't know how the Kilobots are operating exactly, since we haven't made that model. But you will probably go through all pixels read by the vision sensor, and detect an increased luminosity somehow. For that, you can use sim.getVisionSensorCharImage.

Cheers

rohanp
Posts: 3
Joined: 09 Feb 2018, 14:43

Re: How to detect spotlight object intensity by vision sensor of robot

Post by rohanp » 19 Feb 2018, 07:55

sorry but that is giving no different solution. And what i think is that the issue is not with the kilobot, but with the way the object is defined. I mean maybe, there is some setting of spotlight toggle required so that the spot light intensity is detectable by the vision sensor or something of that sort. Can this be an issue?

If not, then actually i need varying intensity of light at different regions of the scene that are successfully detected by the vision sensor as numeric value of intensity. How can I achieve that if not with spotlights?

Post Reply