
Re: Sentry Simulation 2 Has a ghost wall after obstacle is m
Hi Rich,
The "-1" that you're seeing isn't the result of an invisible barrier/ghost wall. The sonar sensor returns a value of -1 when it does not detect anything in it's field of vision.
On the "long" sides of the Sentry challenge, the sonar sensor picks up the side wall, since the sonar sensor has a field of view that widens as it goes out:

On the short side, the sensor doesn't pick up the wall, or anything else once the obstacle is gone, so it gets a value of -1. You can account for this in your code. For example, this program moves forward as long as the sonar sensor doesn't detect an object within 20 cm, or has a value of -1: