-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to understand light sensors #31
Comments
Not getting invested into this, but you might want to check out robogen-simulator/src/model/sensors/LightSensor.cpp line 210 ff. |
1: Yes binary value (for this year version of the software). To see the output add the following lines to LightSensor.cpp: 2: You should have a slight tolerance for detecting the light, depending of the amplitude of your sensor moves it should be ok. Make sure to adapte the height of the light source in ChasingScenario.cpp (line 61). When you'll be able to read the sensor value you can verify this. I think that for this project, the simpler is your robot the more chance you have to see it working... |
Wait... what does the ambient light do then? Is there a threshold somehwere? |
The ambient light allow you to see the environment in simulation (as user). But don't expect it to change anything for the light sensors. They only detect light source pointed directly at them.
But then the value is binarized. |
if your robot is having difficulty seeing the light source, it may also help to increase the radius of the light source in LightSource.cpp. 0.05 seems to work for us. |
Yeah, actually this output ranges from 0 to 1. And since it returns an int, it gets binarised. I think if we want we can change the behaviour by returning a double. But I wonder if the real light sensors work like that. From the behaviour we saw, while testing ours, we think they are rather binary too. |
Hello,
I am running the chasing scenario on a flat terrain with obstacle avoidance. My robot has a light detector with a variable height (a motor is changing it). Having seen quite a fuzz around the theme of optic detection, I would like to ask the opinion of those who already investigated the light detector about two issues:
Thanks
The text was updated successfully, but these errors were encountered: