#include <curve_math.h>
|
| static double | ComputeCurvature (const double dx, const double d2x, const double dy, const double d2y) |
| | Compute the curvature (kappa) given curve X = (x(t), y(t)) which t is an arbitrary parameter.
|
| |
| static double | ComputeCurvatureDerivative (const double dx, const double d2x, const double d3x, const double dy, const double d2y, const double d3y) |
| | Compute the curvature change rate w.r.t.
|
| |
◆ CurveMath()
| apollo::planning::CurveMath::CurveMath |
( |
| ) |
|
|
delete |
◆ ComputeCurvature()
| double apollo::planning::CurveMath::ComputeCurvature |
( |
const double |
dx, |
|
|
const double |
d2x, |
|
|
const double |
dy, |
|
|
const double |
d2y |
|
) |
| |
|
static |
Compute the curvature (kappa) given curve X = (x(t), y(t)) which t is an arbitrary parameter.
- 参数
-
| dx | dx / dt |
| d2x | d(dx) / dt |
| dy | dy / dt |
| d2y | d(dy) / dt |
- 返回
- the curvature
在文件 curve_math.cc 第 29 行定义.
30 {
31 const double a = dx * d2y - dy * d2x;
32 auto norm_square = dx * dx + dy * dy;
33 auto norm = std::sqrt(norm_square);
34 const double b = norm * norm_square;
35 return a / b;
36}
◆ ComputeCurvatureDerivative()
| double apollo::planning::CurveMath::ComputeCurvatureDerivative |
( |
const double |
dx, |
|
|
const double |
d2x, |
|
|
const double |
d3x, |
|
|
const double |
dy, |
|
|
const double |
d2y, |
|
|
const double |
d3y |
|
) |
| |
|
static |
Compute the curvature change rate w.r.t.
curve length (dkappa) given curve X = (x(t), y(t)) which t is an arbitrary parameter.
- 参数
-
| dx | dx / dt |
| d2x | d(dx) / dt |
| dy | dy / dt |
| d2y | d(dy) / dt |
| d3x | d(d2x) / dt |
| d3y | d(d2y) / dt |
- 返回
- the curvature change rate
在文件 curve_math.cc 第 38 行定义.
41 {
42 const double a = dx * d2y - dy * d2x;
43 const double b = dx * d3y - dy * d3x;
44 const double c = dx * d2x + dy * d2y;
45 const double d = dx * dx + dy * dy;
46
47 return (b * d - 3.0 * a * c) / (d * d * d);
48}
该类的文档由以下文件生成: