Light sensor with different colored lights

Requests regarding how to set up experiments in ARGoS.
jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Light sensor with different colored lights

Postby jharwell » Mon Jun 03, 2019 10:50 pm

Hi Carlo!

I'm currently trying to figure out how to be able to selectively diffuse towards/away from a light of a given color suspended in the air above the arena with the footbot robot. As far as I can tell, the footbot light sensor is color agnostic, so that won't work without modification to the readings returned by the light sensor (I think), which I don't think is a good idea. The colored blob omnidirectional sensor IS able to distinguish between lights of different types, but has a very short range compared to the light sensor, so I can't really do attraction/repulsion from a light source of a given color from across the arena (like I can in the foraging example).

Is there a way to increase the range of the colored blob camera/am I missing something on how to do this with default-ish configuration? If not, what would you suggest for getting this to work? I'm hesitant to modify the light sensor (which has the range I need for phototaxis) to support color discrimination, when I don't think the physical footbot robot's light sensor can do that.

UPDATE: So I found additional omnidirectional colored blob camera config that will let me do what I want (I think): changing the aperture size to almost 90 degrees, giving me a reasonable range. Is using this sensor much more computationally expensive that the light sensor for doing phototaxis as I'm intending?



- John

jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Re: Light sensor with different colored lights

Postby jharwell » Tue Jun 04, 2019 5:50 pm

Also, I have gotten the blob camera sensor to launch in ARGoS, and have enabled it in the robot controllers, BUT I am currently unable to detect ANY leds in the arena. I have a simple single light setup with the following XML:

Code: Select all

<controllers> <crw_controller id="ffc" library="libfordyca"> <actuators> <differential_steering implementation="default" /> <leds implementation="default" medium="leds" /> </actuators> <sensors> <footbot_light implementation="rot_z_only" show_rays="false" /> <footbot_motor_ground implementation="rot_z_only" /> <colored_blob_omnidirectional_camera implementation="rot_z_only" medium="leds" /> <media> <led id="leds" /> </media> ... <distribute> <position method="uniform" min="1,1,0" max="10,5,0" /> <orientation method="uniform" min="0,0,0" max="360,0,0" /> <entity quantity="16" max_trials="1000"> <foot-bot id="fb" omnidirectional_camera_aperture="89"> <controller config="ffc" /> </foot-bot> </entity> </distribute> <light id="light_0" position="10,1.5,1.0" orientation="0,0,0" color="yellow" intensity="10.0" medium="leds" />
In the ARGoS code, I have traced the issue to (I think) the light entity not being added to the index for the LED medium during its Init() function, and I have no idea why. Any ideas what I might be doing wrong?

- John

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

Re: Light sensor with different colored lights

Postby pincy » Wed Jun 05, 2019 4:24 am

Hello John,

The light sensor in real life is just a simple IR sensor, so it's correct for it not to be able to detect different light colors.

Using the camera is the right alternative. To make sure the camera can see all the blobs you want, you need to make sure that the light entities (as well as the LEDs of the robots) are all in the same medium. This medium must be referenced by the camera, too. This part is correct.

The part in your setup that is wrong is that your light is at a 1 meter altitude. The omnidirectional camera can only see the ground, so that won't work.

If you want to be able to distinguish different types of sources, a possible idea could be to use special robots as beacons and use the range and bearing sensor to communicate with them. This will also work in a real setting.
I made ARGoS.

jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Re: Light sensor with different colored lights

Postby jharwell » Sun Jun 09, 2019 4:47 pm

Ah I did not realize that! Changing the light to have its position at z=0.0 worked great! Robots are able to find the lights without issue now and do phototaxis.

noah24
Posts: 1
Joined: Mon Feb 07, 2022 2:55 pm

Re: Light sensor with different colored lights

Postby noah24 » Mon Feb 14, 2022 11:50 pm

This kind of sensor is often used in LED lighting in the house's interior. I used to use them, and I still use them as the main light source in my house because they are very cost-effective. LED lighting is a viable option for those who also see conventional bulbs as complete separation from the economy. I see it too, and that's why I decided to switch completely to LED lighting. One option is https://www.amazon.com/smart-light-bulb-bulbs-color/dp/B0922Q43LY/
I love this lighting because it is the most atmospheric I have ever used.


Return to “How to... ?”



cron