Skip to the lesson
FixTheRobot Explore Robotics / Navigation / M5 Trajectories and Path Following / M5-T3

Navigation · Theory · M5

M5-T3 — Curvature, Velocity and Acceleration Limits

How fast may Scout go here? The answer depends on the bend, on what the motors can do, and on what lies ahead.

  • Lesson 3 of 7
  • Module 5: Trajectories and Path Following
  • Theory
  • About 7 minutes to read

A bend of radius 1.5 m can be driven at 0.87 m/s or at 1.4 m/s. At the second speed the tray tips. The limit is set by the shape of the path, the motors and the brakes, and the last of these means a speed profile has to look ahead: Scout must already be slow when it reaches a bend it cannot see yet.

Learning objectives

After this lesson, you should be able to:

  • Compute the curvature of a sampled path and the speed limit it implies.
  • Add a wheel-speed limit for a differential-drive robot and say which limit wins.
  • Build a profile with a forward pass and a backward pass, and stop at the end of the path.
  • Compute braking distance and the time to drive a profile.

The intuition

Driving a bend you do three things. You slow down for it before you reach it. You go through at a speed the car, and your passengers, can take. You speed up again when it opens out. A speed profile does exactly this, in two stages: first decide the highest speed allowed at every point on its own, then repair the profile so that the robot can actually get from one speed to the next.

The second step is where most mistakes are. If Scout needs to be at 0.8 m/s at a bend, it must start braking earlier. And if it starts from rest, it cannot be at 1.4 m/s one half-metre later. The profile has to be reachable going forwards and stoppable going backwards, and no single pass over the points does both.

Speed limits and the forward and backward passesSpeed against distance for nine points. A dashed curvature limit dips at points 3 and 4. A thin forward-pass curve climbs from rest and ends fast. The final orange profile follows it then falls to zero at the last point. bendcurvature / top speed limit forward passbackward pass distance along the path (points 0 to 8, 0.5 m apart)v
The limit curve dips at the bend. The forward pass limits acceleration; the backward pass from the end limits braking and makes the robot stop at the door.

The mathematics

Curvature of a sampled path

Curvature is 1/R, the reciprocal of the radius of the circle through the path. For three consecutive points a, b, c it can be computed without angles:

Curvature from three points (Menger)
κ=2⋅∣(b−a)×(c−a) ∣/(∣a b∣⋅∣b c∣⋅∣c a∣)\kappa =2\cdot \lvert (b-a)\times (c-a)\,\rvert /(\lvert a\,b\rvert \cdot \lvert b\,c\rvert \cdot \lvert c\,a\rvert )
(×=2D cross product)(\times =2D\,\text{cross product})

A turning angle at a point is not a curvature. Curvature is the turning angle per metre, so a heading change per point must be divided by the distance between points.

Speed limits from curvature

At speed v on a circle of radius R the sideways (lateral) acceleration is v²/R = v²·κ. Limit it to alat, which depends on the load (a tray of instruments, a patient on a stretcher) and the grip, and keep the wheel speeds in range:

Speed limits at a point
v≤alat/∣κ∣  lateral accelerationv\le \sqrt{a_{\text{lat}}/\lvert \kappa \rvert }\;\mathrm{lateral\ acceleration}
v≤v{wheel}max⁡1+∣κ∣⋅b2v\le \frac{v_{\{\text{wheel}\}\max }}{1+\lvert \kappa \rvert \frac{\cdot b}{2}}
fast wheel on the outside of a bend
v≤vmax⁡v\le v_{\max}
the robot’s own limit
alat
allowed sideways acceleration, in m/s².
b
track width, the distance between the drive wheels.
vwheel_max
top speed of a drive wheel; on a bend the outer wheel runs at v·(1 + κ·b/2).

Acceleration and braking: two passes

Between two points a distance ds apart, constant acceleration a changes the speed by v₂² = v₁² + 2·a·ds. Work in v², so each step is exact:

  1. Forward pass. Start at rest. For each next point: v² = min( limit², vprev² + 2·amax·ds ).
  2. Backward pass. Force v = 0 at the last point. Going back: v² = min( v², vnext² + 2·dmax·ds ).

The result is the highest profile that respects every limit at once: no feasible profile is higher at any point. Time follows from the mean speed of each segment, T = Σ 2·ds / (v₁ + v₂).

Stopping and jerk

Braking distance and jerk
braking distance=v22⋅dmax⁡\text{braking distance}=\frac{v^{2}}{2\cdot d_{\max}}
ramp time for a jerk limit j=aj\text{ramp time for}\,a\,\text{jerk limit}\,j=\frac{a}{j}

A jerk limit rounds the corners of the acceleration, which gives the smooth S-curve profile and costs a little time. It is worth adding when the load is fragile.

A worked example

One bend. Take alat = 0.5 m/s², track width b = 0.4 m and wheel limit 1.4 m/s.

Speed limits on bends
Radius Ralat limitWheel limitBinding
3.0 m1.22 m/s1.31 m/slateral acceleration
1.5 m0.87 m/s1.24 m/slateral acceleration
0.5 m0.50 m/s1.00 m/slateral acceleration

Here the sideways acceleration always wins, so the wheel limit never binds. A robot with a lighter load or a wider track changes that.

Nine points. Points are 0.5 m apart. The limits are 1.4 m/s except 0.8 m/s at points 3 and 4 (a bend). The robot accelerates at 0.6 m/s², brakes at 0.8 m/s², and must stop at point 8 (the door).

Profile over nine points
Point012345678
Limit1.401.401.400.800.801.401.401.401.40
Forward pass00.7751.0950.800.801.1141.3561.401.40
After backward pass00.7751.0950.800.801.1141.2650.8940

The forward value at point 1 is sqrt(2 × 0.6 × 0.5) = 0.775 m/s. The backward value at point 7 is sqrt(2 × 0.8 × 0.5) = 0.894 m/s: any faster and Scout cannot stop in the last half-metre. Times: 2 × 0.5 / (0 + 0.775) = 1.29 s for the first segment, and the last, 2 × 0.5 / (0.894 + 0) = 1.12 s, so the whole run takes 5.50 s. Starting from 1.2 m/s with dmax = 0.8 m/s², braking needs 1.2² / 1.6 = 0.90 m; with dmax = 0.5 m/s² it needs 1.44 m.

The forward pass alone ends at 1.4 m/s at the door. That is the bug of lab M5-L2, stage 2.

Engineering implications and limitations

Look ahead along the path, not only at the point

A controller that sets its speed from the curvature under the robot reacts too late. The profile must be built from the whole path ahead, or the controller must look as far as the braking distance.

Pick limits that the hardware keeps

Use acceleration and braking limits below the real capability, and braking slightly stronger than acceleration only if the robot can really brake that hard with a load. A wet floor halves the usable limits.

Spacing of the samples

Curvature from three neighbouring points is noisy on a finely sampled, noisy path and blind on a coarse one. Resample at a spacing of a few tens of centimetres on a smoothed path (lesson M5-T2) before computing it.

Slow down for more than bends

The same two-pass logic handles other speed limits: a speed zone near a ward, a slower pace near the goal, a limit near people (lesson M6-T6). Each is another limit curve fed into the same forward and backward passes.

Common misconceptions

“Curvature is the angle the path turns.”

It is the angle per metre. The same bend sampled twice as densely has half the angle per point and the same curvature.

“A speed limit on the bend is enough.”

Without a backward pass the speed drops from 1.4 to 0.8 m/s in half a metre, which needs a braking of 1.3 m/s².

“Braking distance is v²/a for any a.”

It is v²/(2·d). Doubling the speed quadruples the distance.

“The motor limit is the only limit.”

Lateral acceleration, a tipping load, wheel speeds and the sensing range all limit speed, and the lowest wins.

Engineering takeaways

  1. Curvature is 1/R; compute it from three points with κ = 2|cross| / (|ab||bc||ca|).
  2. Lateral acceleration v²κ gives v ≤ sqrt(alat/κ); the outer wheel adds v ≤ vwheel/(1 + κb/2).
  3. Build the profile in v² with a forward pass (acceleration) and a backward pass from the stop (braking).
  4. Braking distance is v²/(2d); trip time is the sum of 2·ds/(v₁ + v₂).
  5. The profile must be recomputed whenever the path changes.

References and further reading

Time-optimal path parameterisation and the velocity-planning methods that the forward and backward passes simplify.

  • J. E. Bobrow, S. Dubowsky and J. S. Gibson, “Time-Optimal Control of Robotic Manipulators Along Specified Paths”, The International Journal of Robotics Research, 4(3), 1985.
  • Q.-C. Pham, “A General, Fast, and Robust Implementation of the Time-Optimal Path Parameterization Algorithm”, IEEE Transactions on Robotics, 30(6), 2014.
  • K. Kant and S. Zucker, “Toward Efficient Trajectory Planning: The Path-Velocity Decomposition”, The International Journal of Robotics Research, 5(3), 1986.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

A bend has radius 2.0 m and alat = 0.5 m/s². What is the speed limit?

Explanation

sqrt(0.5 × 2.0) = 1.0 m/s.

Question 2

Scout travels at 1.0 m/s and must stop at a door. It can brake at 0.5 m/s². At which distance before the door must braking start?

Explanation

1.0² / (2 × 0.5) = 1.0 m.

Question 3

Two points are 0.5 m apart, Scout is at 0.4 m/s at the first, and amax = 0.6 m/s². What is the highest speed at the second point?

Explanation

sqrt(0.4² + 2 × 0.6 × 0.5) = sqrt(0.16 + 0.6) = 0.872 m/s.

What’s next

Next: the simplest controller that follows a path at these speeds.

Practice this lesson

Build a Velocity Profile

Give a path a speed at every point so Scout slows for corners and stops exactly at the door.

Next lesson

M5-T4 — Pure Pursuit

Derive the pure-pursuit steering command and explain how lookahead distance trades smoothness for corner cutting.

Nothing below is required to finish this lesson.