In ps6 part 2, I'd like to check how other people handled wall-detection. The initial spec (page 2-3) implies that robots predict and avoid collision, but the spec on page 6 specifically says "when a robot hits a wall..." and this is what Roombas actually do. Prediction is easy; collision functions aren't. The spec says to handle ambiguity however you like, but this is self-contradiction, not ambiguity. Any advice before I waste time writing the wrong thing?
if the proposed movement is outside of the room then it hit a wall.
Hi bwCA, what I meant was, did other people have robots predict the collision, scrap that intended move, and calculate a new move instead from their starting point? Or did they have the robot move to the point of collision with the wall, then calculate a new move from that point using any remaining movement for that "turn"?
can't comment on other ppl ..... I did the predict/scrap/calculate new thing - but it would be interesting to see a solution that did the other. There won't be anyone 'grading' your solution for the OCW courses. You can do whatever you'ld like. I'm not sure 'they' would write a test suite that could tell the difference anyway.
Good to know that worked out. Yeah, I know it's self-graded, but it'll give different answers: I'm pretty sure collision is faster at cleaning, and without it you can break the program if your robots are too fast, because they can't move anywhere! An interesting problem to have. I might try a collision solution once I beat the predictive model into submission. So, not any time soon :S
Join our real-time social learning platform and learn together with your friends!