Menu

Creating a light sensor

2002-01-26
2002-01-27
  • Andy Gombos

    Andy Gombos - 2002-01-26

    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

     
    • G. W. Lucas

      G. W. Lucas - 2002-01-26

      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

       
      • Andy Gombos

        Andy Gombos - 2002-01-27

        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

         

Log in to post a comment.