Curve Driving Generator
Ok, I've run into a great problem for all you math and programming guys. I've been working at it since December but I have made no progress. Any help would be so very appreciated. Here goes:
I am trying to create a code that will give the robot the ability to drive curves. Essentially I want to give the function a coordinate - namely a polar vector - and have it spit out the left and right speeds that the robot needs to travel to drive in a smooth curve. If there is any way possible to integrate a starting tangent line to the curve - as in say "I want a curve that crosses x and x+dx such that dy/dx @ x is equal to some number -say b" - that would be very advantageous in that I could link two curves together to have the robot not only drive in a smooth curve but also face a certain direction when it reaches its final point.
So far I have figured that we would need to consider a). the currents current speed, b). the robots current direction that it is facing and c). the arc length that the curve would need to be. I have also figured that the distance that right wheel would travel (Rd), the distance the left wheel would travel (Ld) and the speeds of the wheels (Rv and Lv) are related in this manner: Ld/Rd = Lv/Rv. ---> this relationship was based on assuming that the time for each wheel to travel a distance would be the same (and thus the velocities are different).
Note: I'm trying to keep the curves as simple as possible. For now I just want to deal with curves going to the 1st and 2nd quadrants - assuming the current robot's position is at the origin. I DO NOT want to deal with the robot driving to points to where it has to turn past (+-)PI/2 (90 degrees).
PS: Lets not discuss why we would or would not do this but instead, focus on how. Thanks!
Last edited by theNerd : 29-03-2012 at 21:30.
|