![]() |
Re: swerve math quiz
Here is my attempt at the angles, I'm not sure if it's fully simplified. I assumed the zero angle to be when the wheel is pointing upward, and that it has an angular range of -pi to pi.
Corner 1: 2*arctan(-cot(ωt/2+arctan(b/c))) Corner 2: 2*arctan(-cot(ωt/2+arctan(a/c))) Corner 3: 2*arctan(-cot(ωt/2+arctan(a/d))) Corner 4: 2*arctan(-cot(ωt/2+arctan(b/d))) |
Re: swerve math quiz
I'm headed out the door to work, so no time to do the math. One clue though, is that once you've found an answer that will work, there are 15 others that will also work. Each wheel can be rotated in azimuth by pi (180 degrees) and the spin rate can be inverted, producing the same physical result. That's four independent binary decisions, for 16 results.
G2 |
Re: swerve math quiz
Quote:
The corresponding formulas for the wheel steering angles for that set of positive wheel speeds can be derived and expressed quite simply if the right trig function is used. The wheel steering angles should all be 0 when the wheel is steered to the "straight forward" (with respect to the robot) direction. The angle range should be +/- pi radians, where positive angles are steering to the right (clockwise as viewed from above) and negative angles are steering to the left (counterclockwise as viewed from above). |
Re: swerve math quiz
Quote:
Also: only the wheel speeds are a function of ω, not the steering angles. |
Re: swerve math quiz
How are angles measured by? for ex, is 0 in standard forward facing configuration, or is 0 supposed to be zero on the unit circle?
Also any bonus points for including time into the calculation to give the angle at any given second after 0? :P EDIT: ignore the first part of this post, forgot to read the whole thread xD |
Re: swerve math quiz
Quote:
|
Re: swerve math quiz
Quote:
|
Re: swerve math quiz
Quote:
|
Re: swerve math quiz
Quote:
Quote:
After reading this first post I think I understood what I did wrong. I thought that the side of the robot with corners 1 and 4 would be the front, so I left the answer I got working out as is. Now all I need to do is subtract each measurement from pi/2. Therefore, Corner 1 has an angle of -arctan(c/b) in radians. Corner 2 has an angle of -arctan(c/a) in radians. Corner 3 has an angle of -arctan(d/a) in radians. Corner 4 has an angle of -arctan(d/b) in radians. If the wheels were inverted (if they were moving backwards and facing the opposite direction), Corner 1 has a speed of -ω√(b²+c²) in meters per second and angle of arctan(c/b)+π/2 in radians. Corner 2 has a speed of -ω√(a²+c²) in meters per second and angle of arctan(c/a)+π/2 in radians. Corner 3 has a speed of -ω√(a²+d²) in meters per second and angle of arctan(d/a)+π/2 in radians. Corner 4 has a speed of -ω√(b²+d²) in meters per second and angle of arctan(d/b)+π/2 in radians. |
Re: swerve math quiz
OK, I’m going to work this through from the beginning, with the later conventions Ether established It turns out my "symbol" fonts didn't work, so I'll use w for omega (angular speed), and f for phi (steering angle).
To simplify, I’m going to think about the problem in pathologically robot-centric terms. That is, I’ll imagine that the robot is stationary and we’re rotating the floor in the opposite direction. (I also sometimes imagine I’m pushing the whole earth down when I climb the stairs, so maybe it’s just me.) The only real difference comes in when you actually try to figure forces and torques and such – as long as we stick to speeds and lengths, all is good. SO, I’m a unicorn swerve drive robot that wants to spin the floor counterclockwise from above (widdershins) about a point located at (b,c) referenced from my right front wheel’s pivot, (b,d) from my right rear, (a,c) from my left front, and (a, d) from my left rear. First, let’s just think about a one-wheeled problem, say the right front, which Ether has called wheel number one; subscript 1 on f and w refer to the azimuth angle and angular speed of this wheel, likewise for the other three corners. Here, I am imagining the floor as a crown gear with infinitely small teeth, and my wheel as a spur gear engaging it with infinitely small teeth. When I rotate my wheels in the positive direction with speed w1 which is oriented at angle f1, the floor could be rotating around any point on the line of bearing w1 (out to the right, along my axle) with angular speed w0 = hw1/r1, where h is the height of my axle of the floor (or equivalenly, the radius of my wheel), r1 is the horizontal distance to the point, that is √(b2+c2), so w1 = w0√(b2+c2)/h. Actually, Ether has asked for the answer in tangential speed, which is hw1, and which I’ll call s1. Then, s1 = w0√(b2+c2). One down. Since the bearing of the axis of rotation is at angle f1, and it’s location is at (b,c), we know that atan2(b,c) = f1. Since Ether defined angles in the “nautical” convention (positive to the right), and I’m using Euclidean coordinates so far [and me an Navy Oceanographer in my day job!], or positive angles to the left, this becomes f1 = -atan2(b,c). Going through the same motions for the other three corners, we have f1 =-atan2(b,c) ; s1 = w0√(b2+c2) f2 =-atan2(a,c) ; s2 = w0√(a2+c2) f3 =-atan2(a,d) ; s3 = w0√(a2+d2) f4 =-atan2(b,d) ; s4 = w0√(b2+d2) Going back, I see my speeds do agree with Cyan View. My angles all seem to give correct values in each quadrant. The only value that is weird is when the turn point is to the left of the wheel, and I get –pi instead of pi, which does not actually violate Ether’s rules. I’m calling this a solution. G2 |
Re: swerve math quiz
1 Attachment(s)
Quote:
You have the arguments of atan2 interchanged. (See Figure3 attached). Quote:
|
Re: swerve math quiz
FYI...the usually infallible JVN made a misstep in my opinion when he coined the term "unicorn drive."
4 wheel independent steered and driven swerve drive was around long before he attempted to coin this term. These drives were commonly referred to as "King Crab." IIRC FRC47 was the first to do this with 4 wheels in 2001...though they had done it with two wheels in 2000. IMHO this was much harder to achieve in 2001 because of the strange motors variety available...to ice the cake, it wasn't even wheels. It had tri-treads for climbing!!! FRC79 continued the 4 wheel version for some time and has published some white papers on their controls concepts. This helps explain the name as well...King Krab. http://www.chiefdelphi.com/media/papers/download/1596 Just saying. It's not new and it's not "unicorn drive." Perhaps I've missed some subtle distinction here, but I don't think so. :) #FRCHISTORY |
Re: swerve math quiz
Quote:
4-wheel independent-steering and independent-driven drivetrain, with unlimited rotation of the wheels and sensors, and no gaps in the sensor feedback http://www.chiefdelphi.com/forums/sh...07&postcount=9 Quote:
|
Re: swerve math quiz
I concede that by this strict definition the FRC47 robots from 2000 and 2001 probably didn't qualify as they likely didn't have gapless sensor data....they could of had infinite rotation but it ultimately would have been limited by wire twist at some point.
They likely used potentiometers. I stand down. Thinking through the history was fun nonetheless. |
Re: swerve math quiz
Quote:
G2 |
| All times are GMT -5. The time now is 22:07. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi