Simulated getObstacle() flipped

Issue #179 resolved
Keith O'Hara created an issue

getObstacle() returns the distance to an obstacle, but the Fluke's IR sensors (which measures the # of reflections) decreases with distance.

Comments (7)

  1. Doug Blank

    Do you happen to have a sample range of values? Even better:

    When obstacle is this far way, it gives this value: ...

    close distance: medium distance: far (maximum):

  2. Doug Blank

    And what are those actual distances for far, close, and near? (You can use "scribbler" units---the length of one scribbler, or I can convert from cm/in)

  3. Doug Blank

    Try this code to check both length of IR and values:

    from Myro import *
    init("sim")
    robot = getRobot()
    robot.setOption("show-sensors", True)
    joystick()
    print(getObstacle())
    
  4. Log in to comment