Solve Geometry Problem for Senior Design Project

  • Thread starter Abyss
  • Start date
  • Tags
    Geometry
In summary, the group is working on a method for locating their robot in a square arena using sensors on all four sides of the robot. They have tried various solutions and are looking for suggestions to improve their approach. They have also created an application to visualize the problem and test potential solutions. One possible solution is to write a function that calculates the distances to the walls and another function to approximate the robot's position. The group has also considered finding all possible solutions for a single sensor's distance and angle in each quadrant and intersecting them to determine the robot's location. They are still open to suggestions for a more elegant solution. They also acknowledge that keeping the angle accurate may be a challenge and may need to use measurements to correct it.
  • #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.
 

Attachments

  • Problem1.jpg
    Problem1.jpg
    23.4 KB · Views: 348
  • Problem2.jpg
    Problem2.jpg
    23.3 KB · Views: 357
Physics news on Phys.org
  • #2
A possible solution is to write a function that given an input (x,y,phi) calculates the 4 distances to the wall.
You can do this by intersecting the lines with all the walls.
In each heading you need the nearest intersection that lies in the proper direction.

Then write a second function that approximates your position.
That is:
1. start in the middle with your angle phi.
2. calculate the 4 distances
3. take a small step in the direction with the greatest mismatch
4. repeat 2 & 3 until you cannot get closer any more
5. if your mismatches are reasonably small you have found your position.
 
  • #3
Thanks for the suggestion, I agree that solution would work. In fact we use something similar in our inverse kinematic solution.

In the end after working with it some more I decided to find all the possible solutions that a single sensors distance/angle could return per quadrant (which look like two line segments connected in a right angle). Then intersect those elbows until a solution is found.

It isn't perfect but elegant enough for my tastes. I've included a screeny which looks quite complicated but alas no graphical depiction of this problem will be simple. The solution for sensor A (in direction of the robot depicted by a small circle a short distance away from the central circle) is in Red, the solution for sensor B is +90 off of sensor A and is green, the solution for C is 180 off of A and is blue and the solution for D is 270 off of A and is yellow. The region enclosed by each solution is shaded in the solutions color, which can help to highlight the different solutions.
 

Attachments

  • problem3.jpg
    problem3.jpg
    25.6 KB · Views: 326
  • #4
Abyss said:
Thanks for the suggestion, I agree that solution would work. In fact we use something similar in our inverse kinematic solution.

In the end after working with it some more I decided to find all the possible solutions that a single sensors distance/angle could return per quadrant (which look like two line segments connected in a right angle). Then intersect those elbows until a solution is found.

It isn't perfect but elegant enough for my tastes. I've included a screeny which looks quite complicated but alas no graphical depiction of this problem will be simple. The solution for sensor A (in direction of the robot depicted by a small circle a short distance away from the central circle) is in Red, the solution for sensor B is +90 off of sensor A and is green, the solution for C is 180 off of A and is blue and the solution for D is 270 off of A and is yellow. The region enclosed by each solution is shaded in the solutions color, which can help to highlight the different solutions.

That works too. As yet I don't see a more elegant solution.

Note that I expect that you won't be able to keep your phi accurate.
So I think you'll need to use your measurements too to correct phi back to the proper angle.
 
  • #5


Hello,

As a fellow scientist, I understand the importance of finding an elegant solution for your senior design project. Based on the information provided, it seems like you are trying to determine the location of your robot in a square arena using sensors and distance measurements.

One approach you could consider is using trigonometry to solve this problem. By knowing the lengths of the sides of the square arena and the angles at which the robot's sensors are positioned, you can use trigonometric functions such as sine, cosine, and tangent to calculate the distance between the robot and the walls. With this information, you can then triangulate the position of the robot within the arena.

Another approach could be to use a coordinate system and create equations to represent the distances between the robot and each wall. By solving these equations simultaneously, you can determine the coordinates of the robot's location.

I recommend consulting with your team and possibly seeking guidance from a mathematics or engineering professor at your university for further assistance in finding an elegant solution for your project. Best of luck!
 

1. What is the purpose of solving geometry problems for a senior design project?

The purpose of solving geometry problems for a senior design project is to apply mathematical concepts and problem-solving skills in a real-world context. This allows seniors to demonstrate their mastery of geometry and showcase their ability to solve complex problems.

2. How do you approach a geometry problem for a senior design project?

The first step in approaching a geometry problem for a senior design project is to carefully read and understand the given problem. Then, identify the relevant information and determine which geometric principles and formulas can be applied. Finally, create a step-by-step plan to solve the problem and check your solution for accuracy.

3. What are some common challenges when solving geometry problems for a senior design project?

Some common challenges when solving geometry problems for a senior design project include selecting the appropriate geometric principles and formulas, accurately interpreting and applying given information, and ensuring the final solution is correct and logical.

4. How can solving geometry problems for a senior design project benefit students?

Solving geometry problems for a senior design project can benefit students by improving their critical thinking and problem-solving skills, as well as their ability to apply mathematical concepts in real-world scenarios. It also allows students to showcase their knowledge and skills to potential employers or graduate schools.

5. Are there any resources or tools available to assist with solving geometry problems for a senior design project?

Yes, there are various online resources and tools that can aid in solving geometry problems for a senior design project. These include geometry problem-solving websites, math software, and online tutorials that provide step-by-step solutions and explanations for a variety of geometry problems.

Similar threads

Replies
3
Views
872
Replies
6
Views
960
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Programming and Computer Science
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
2K
  • Introductory Physics Homework Help
Replies
5
Views
788
  • Mechanical Engineering
Replies
18
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
868
  • STEM Academic Advising
Replies
8
Views
1K
Back
Top