imk
New member
- Joined
- Apr 7, 2023
- Messages
- 7
Hello,
I am building (3D Printing / Writing C/CPP Software for ) an autonomous wheeled robot which at this time is going pretty well. However I have got myself stuck on a bit of math (function) that will return the (Robot Exit Angle) In- Between two vectors/points. I have been at this for couple of days and now figure it is time I turned to better mathematical minds than mine.
I have done a little sketch of the problem for clarity just in case my description is not clear.
So the robot has identified two objects and my goal is that it will drive in-between these two objects in a straight line (Exit Angle) passing each object by the same lateral distance.
The objects are defined in my system by their x,y coordinates and a vector of angle and length.
Thus:
Object A is 25 Units Length by 45 Degrees
Object B is 50 Units Length by 90 Degrees
I have an approximation in my sketch of an Exit Angle of ~ 70 Degrees which gives about 14/15 Units Length on each side assuming Zero Robot Width. I figure the problem is basically Two Right Angled Triangles that share a common Hypotenuse, and then compute their Opposite Sides to get the lateral passing distance.
Problem I am having is finding the Exit Angle, can someone help please?
BTW I am not very good at reading math formula in terms of |x|.|y| etc. so a solution that I can enter into a calculator would really help me best.
Many thanks in advance IMK
I am building (3D Printing / Writing C/CPP Software for ) an autonomous wheeled robot which at this time is going pretty well. However I have got myself stuck on a bit of math (function) that will return the (Robot Exit Angle) In- Between two vectors/points. I have been at this for couple of days and now figure it is time I turned to better mathematical minds than mine.
I have done a little sketch of the problem for clarity just in case my description is not clear.
So the robot has identified two objects and my goal is that it will drive in-between these two objects in a straight line (Exit Angle) passing each object by the same lateral distance.
The objects are defined in my system by their x,y coordinates and a vector of angle and length.
Thus:
Object A is 25 Units Length by 45 Degrees
Object B is 50 Units Length by 90 Degrees
I have an approximation in my sketch of an Exit Angle of ~ 70 Degrees which gives about 14/15 Units Length on each side assuming Zero Robot Width. I figure the problem is basically Two Right Angled Triangles that share a common Hypotenuse, and then compute their Opposite Sides to get the lateral passing distance.
Problem I am having is finding the Exit Angle, can someone help please?
BTW I am not very good at reading math formula in terms of |x|.|y| etc. so a solution that I can enter into a calculator would really help me best.
Many thanks in advance IMK