- #1
Abyss
- 6
- 0
Hi guys, I'm doing my senior design project and we've decided upon a method for finding the location of our robot in the square arena that we have built. The method we are using involves sensors on all four sides of the robot (each at 90 degrees of the two adjacent) that return the distance to one of the straight walls of the arena.
I am sure that given the 4 lengths from the robot to the walls of the arena, and knowing the angle that the robot is at, that it is possible to find the location the robot is at. I've spent a couple days on this problem though, and I haven't been able to come up with a general solution.
I know that with about 200 if-else statements I could program a solution but we need our code to be as elegant as possible.
I have a dozen pages of notes, and I have written an application to help me visualize the problem and test potential solutions, if anyone has any ideas I'd love to hear them.
I attached two pictures of the app, but they really aren't necessary, they may help explain the problem more clearly though.
I am sure that given the 4 lengths from the robot to the walls of the arena, and knowing the angle that the robot is at, that it is possible to find the location the robot is at. I've spent a couple days on this problem though, and I haven't been able to come up with a general solution.
I know that with about 200 if-else statements I could program a solution but we need our code to be as elegant as possible.
I have a dozen pages of notes, and I have written an application to help me visualize the problem and test potential solutions, if anyone has any ideas I'd love to hear them.
I attached two pictures of the app, but they really aren't necessary, they may help explain the problem more clearly though.