I emailed Gary about creating a light sensor for simlink, and he wishes that I would post here and stop emailing him. :)
I incorrectly thought that the RsTarget set the bounding range for the detection, but instead RsBodyTargetSensor does instead. In his email, Gary mentioned that a real sensor would have to account for reflection off walls, walls being in the way, etc.
If the range for detection with the sensor was increased, then you could presumable detect targets setup for light sensors from a distance away. As a first test, using the distance from the target returned by RsTargetSensorEvent and calculating the approximate light value would not be very hard. Since the target will not be detected behind a wall (as it shouldn't), you don't have to worry about that. However, like Gary mentioned in his email, a more correct method would need to calculate the reflections and such to see exactly how much light the sensor was recieving.
Thoughts?
Andy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> I emailed Gary about creating a light sensor for simlink,
> and he wishes that I would post here
> and stop emailing him. :)
[grinning] actually, what I asked Andy is that he put his
questions (which were really quite good ones) up on the
forum so that it could be answered and serve as a resource
for other users in the future.
Andy wanted to know about the "radius" specification for
the RsTarget object in a floor plan... specifically, whether it
affected the detection range for a sensor. The answer was
no, it did not... it was treated as a point source. Not the
most complete of solutions, to be sure, but good enough for
a first-order approximation....
A good light-detection simulation would model a light source
as an object with size and shape. Since RP1 is limited
to 2-dimensions anyway, the algorithms should be manageable,
it's just another task waiting for a developer.
gary
gary
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am going to try and make a simple sensor by using the distance from the event for the first release. When I get more time, I may go about creating a new light source for the map and a new sensor to use it.
Andy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I emailed Gary about creating a light sensor for simlink, and he wishes that I would post here and stop emailing him. :)
I incorrectly thought that the RsTarget set the bounding range for the detection, but instead RsBodyTargetSensor does instead. In his email, Gary mentioned that a real sensor would have to account for reflection off walls, walls being in the way, etc.
If the range for detection with the sensor was increased, then you could presumable detect targets setup for light sensors from a distance away. As a first test, using the distance from the target returned by RsTargetSensorEvent and calculating the approximate light value would not be very hard. Since the target will not be detected behind a wall (as it shouldn't), you don't have to worry about that. However, like Gary mentioned in his email, a more correct method would need to calculate the reflections and such to see exactly how much light the sensor was recieving.
Thoughts?
Andy
Andy G. wrote:
> I emailed Gary about creating a light sensor for simlink,
> and he wishes that I would post here
> and stop emailing him. :)
[grinning] actually, what I asked Andy is that he put his
questions (which were really quite good ones) up on the
forum so that it could be answered and serve as a resource
for other users in the future.
Andy wanted to know about the "radius" specification for
the RsTarget object in a floor plan... specifically, whether it
affected the detection range for a sensor. The answer was
no, it did not... it was treated as a point source. Not the
most complete of solutions, to be sure, but good enough for
a first-order approximation....
A good light-detection simulation would model a light source
as an object with size and shape. Since RP1 is limited
to 2-dimensions anyway, the algorithms should be manageable,
it's just another task waiting for a developer.
gary
gary
I am going to try and make a simple sensor by using the distance from the event for the first release. When I get more time, I may go about creating a new light source for the map and a new sensor to use it.
Andy