|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
paper: Driving a Robot — Fastest Path from A to B
Thread created automatically to discuss a document in CD-Media.
Driving a Robot — Fastest Path from A to B by Mr. N |
|
#2
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
What if you have a trajectory of three (or more) poses? It seems the simplifying assumption that "the robot reaches top speed very quickly" may create a false conclusion
Last edited by RyanCahoon : 16-08-2014 at 00:11. |
|
#3
|
|||||
|
|||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
I have such a strong desire to print this out and walk around pits handing it to other teams for two reasons one is because it honestly is an interesting read(I am a nerd leave me be) the other is because if it convinces teams this is true then defense became a whole lot easier.
|
|
#4
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Interesting read. A couple things I would point out: 1.) There is another scenario to consider: Drive, turn, drive (Back up to a point coincident with a point on your final pose vector, turn to face the vector, then drive forward to the point), and 2.) This doesn't take into account real accelerations. There is an underlying assumption that speed is instant, meaning it takes 0 time to get to speed/reverse directions. With a spline path, there are no reversals in direction, so it might be something worth looking at.
|
|
#5
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Quote:
This is simply analyzing a situation where there is no interference. |
|
#6
|
|||||
|
|||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Quote:
|
|
#7
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Thanks for reading the paper --- and for your feedback. You raise some very good points. Here are some additional thoughts in response to these points:
1) Acceleration Very true, the analysis assumes instantaneous accelerations to make the problem more tractable. However, the assumption is based on models developed from speed trial data using our 2013 robot. In a straight-line test, the robot reached 75% of maximum speed within the following times/distances: - In lo-speed gear (24:1): within 0.2 seconds/20 cm of travel - In hi-speed gear (9.4:1): within 0.7 seconds/140 cm of travel FRC robots, going full throttle from a standing start, do virtually all of their accelerating in a faction of a second. So, the assumption is reasonable when talking about paths lasting several seconds covering several meters. Conversely, it is a poor assumption for very short, very quick paths. 2) Reversing to Get from A to B This is a great point. When I developed a game simulator for the 2014 game using the "turn-straight-turn" strategy, I realized that the "delta theta" terms (i.e., the changes in heading) had an ambiguity for angles greater than 180 degrees. For example, you get to the same heading by turning +270 or -90. Clearly the second turn is faster. But it also requires the robot to travel backwards during its straight-line motion. Although not explicitly mentioned in the paper, this result is entirely consistent with the conclusion. Consider the 2013 game: it is faster to travel in reverse from the shooting position at the pyramid to the feeding station, rather than turning 180 degrees first. 3) Multi-Segmented Paths Given the qualifiers outline in (1), I would argue it is more efficient to plan a trip around a mid-field obstacle (e.g., a pyramid) as a series of straight segments rather than one curved, sweeping path. 4) Impact on Strategy vs. Tactics Clearly, the findings are more relevant when planning overall game strategy that involves moving between key locations ("way points" or "way poses"), as opposed to tactical moves on the field when contending with defenders. |
|
#8
|
|||
|
|||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Even assuming that, when accelerating as hard as possible, that acceleration is insignificant*, it should be noted that a human driver still has to control the robot for the in-place turn. And I doubt there are any drivers out there that can time it such that they switch from full acceleration to full deceleration at just the right time to turn a precise angle. The hardest part isn't accelerating as fast as possible; it's being as accurate as possible while moving at speed.
This still leaves the question of what the fastest path would be in autonomous, accounting for acceleration. Turn-Straight-Turn is certainly the simplest and reasonably fast if you get your control loops right. *Keep in mind that if each acceleration takes a fraction of a second, you still have to accelerate/decelerate three times in a given maneuver, which can add up to a couple seconds over the course of a maneuver and even a second per maneuver adds up quickly when doing multiple maneuvers per cycle and multiple cycles per match. Last edited by James Kuszmaul : 16-08-2014 at 13:54. |
|
#9
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Looks pretty cool.
That said, I don't agree. I have done a ton of work this summer with this sort of curve generation, and curve cannot be simplified to simple cubic curves. A trajectory can contain a large number of parametric quintic curves, which can have specified end headings, specified end heading derivatives, as well as (because they're parametric) dy/dt, which affects how sharp the curves are. If these are optimized, I believe it is faster to drive in a curve. It is also not accurate to disregard robot acceleration. I am also taking into account an actual robot's velocity, acceleration (both acceleration and deceleration, a robot can decelerate faster than it can accelerate), and jerk limits, as well as the actual speed the robot can take a turn at. [url=https://imgflip.com/gif/b7pa0] ![]() This path takes 1.77 seconds to drive, and travels 5 feet down and 5 feet to the left. Using the same exact acceleration, velocity, and jerk limits as well as the same code to generate the path, I made this path: [url=https://imgflip.com/gif/b7pex] ![]() It takes 1.67 to drive, and ends up in the same location. The straight path must do two 45 degree turns in addition to the straight line. This leaves .05 second for the robot to rotate 45 degrees. A 2 ft wide robot turns in a circle with a radius of 1 foot, so the distance the wheel must travel is 2*pi*1/4 = pi/2 feet = 1.571 feet in .05 seconds = 31 fps, with instantaneous acceleration. Not possible for a robot. What if I do something like this? (Total distance 60 feet, average speed 5.5 feet per second) ![]() To stop and turn at each waypoint would be really slow. Last edited by Jared : 16-08-2014 at 13:23. |
|
#10
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
To further back this up. Even if you are going to do a simple turn-straight-turn, it's going to be faster to turn about one drive side rather than the center of the robot because this moves your center further along the path, and doesn't require direction reversals for either drive side.
The curvilinear path, when considering the speeds of each side, is generalizing this by allowing each side of the drive to stay at a positive speed and minimized their accelerations while still accomplishing the heading changes and displacements needed. |
|
#11
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Quote:
Turning about a point other than the center does indeed made the center of the robot move faster. However, it simultaneously creates a longer path in every case. This is the central question: Does the increased speed compensate for the extra length? The answer is no (within the context of the working assumptions). |
|
#12
|
||||||
|
||||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Very nice work!
I think, in fact, we're in good agreement. Here are some points of clarification: Quote:
Quote:
Quote:
Quote:
Quote:
Can you re-run your example for 25x25 foot run (e.g., a cross-field maneuver) with similar rates of turn (remembering that the speed constraint must be imposed on the outermost bank of wheels during a turn, not the centroid). Quote:
--- --- --- All that said, it looks like your research and programming has led to a very powerful and useful modelling tool. Congrats! |
|
#13
|
|||||
|
|||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Quote:
[quote] Quote:
Quote:
Quote:
Quote:
Here's my setup for the bigger run Start Point: (0,0) End Point: (25, -25) Max Velocity: 10 ft/s Max Acceleration: 10 ft/s^2 Max Deceleration: 15 ft/s^2 Robot Width: 2 feet Trial 1: Start Heading: 0 (facing right) End Heading: 0 Path Type: Quintic Parametric Results: Code:
Time: 4.784024461201024
Distance: 37.531625864027085
Average Speed: 7.845199406569258
Start Heading: -pi/4 (diagonal down and to the right) End Heading: - pi/4 Path Type: Line Results: Code:
Time: 4.520517763673839
Distance: 35.3518031718333
Average Speed: 7.820299580706168
![]() ![]() A great example of where a line would be much faster: ![]() Code:
Time: 4.142848102721899
Distance: 23.413771473152483
Average Speed: 5.6516123431533405
Code:
Time: 1.5516701850414147
Distance: 6.099594833091013
Average Speed: 3.9309866825392485
|
|
#14
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Ha! Agreed!
Thanks very much for the detailed answer. Great work! One thing: The acceleration limit you used (10 ft/s/s) may be little low. Based on our speed trials, we were getting something more like 22 ft/s/s (Supershifter, hi-speed gear). I worked up a similar example using the math from my paper (I probably should have included this in the paper itself). I used a 25x25 foot path with a similarly shaped curve. I set my upper speed at 10ft/s and robot wheel base to 2 ft. Although I don't take acceleration into account, keep in mind that (a) the path is long enough that the effects of acceleration are minimized, and (b) both the linear and curved path benefit from the "instantaneous" acceleration assumption -- they are both slightly faster than real life, by about the same amount. Here are my results: - Turn-Straight-Turn: 3.69 seconds, total arc length = 35.36 feet, total heading adjustment = 90 degrees - Curve: 4.00 seconds, total arc length = 37.79, total heading adjustment = 126 degrees The curved path takes 8.3% (or 0.31 seconds) longer to execute. Although this doesn't sound like a lot, over 6 scoring cycles, that 1.84 seconds --- almost 2 seconds from optimizing just one part of a path. |
|
#15
|
||||
|
||||
|
Re: paper: Driving a Robot — Fastest Path from A to B
Swerve drive teams are laughing at this thread
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|