catchrobo2022 / Mbed 2 deprecated catchrobo2022_mbed

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

AccelCurve Class Reference

加速曲線を生成するクラス More...

#include <accel_curve.h>

Public Member Functions

 AccelCurve (const float j_max, const float a_max, const float v_start, const float v_end)
 初期化付きのコンストラクタ.
 AccelCurve ()
 空のコンストラクタ.あとで reset() により初期化すること.
void reset (const float j_max, const float a_max, const float v_start, const float v_end)
 引数の拘束条件から曲線を生成する. この関数によって,すべての変数が初期化される.(漏れはない)
float j (const float t) const
 時刻 t [s] における躍度 j [m/s/s/s]
float a (const float t) const
 時刻 t [s] における加速度 a [m/s/s]
float v (const float t) const
 時刻 t [s] における速度 v [m/s]
float x (const float t) const
 時刻 t [s] における位置 x [m]
float t_end () const
 終点時刻 [s]
float v_end () const
 終点速度 [m/s]
float x_end () const
 終点位置 [m]
float t_0 () const
 境界の時刻 [s]
void printCsv (std::ostream &os, const float t_interval=1e-3f) const
 境界のタイムスタンプを取得

Static Public Member Functions

static float calcReachableVelocityEnd (const float j_max, const float a_max, const float vs, const float vt, const float d)
 走行距離から達しうる終点速度を算出する関数
static float calcReachableVelocityMax (const float j_max, const float a_max, const float vs, const float ve, const float d)
 走行距離から達しうる最大速度を算出する関数
static float calcDistanceFromVelocityStartToEnd (const float j_max, const float a_max, const float v_start, const float v_end)
 速度差から変位を算出する関数

Protected Attributes

float jm
 躍度定数 [m/s/s/s]
float am
 加速度定数 [m/s/s]
float t3
 時刻定数 [s]
float v3
 速度定数 [m/s]
float x3
 位置定数 [m]

Friends

std::ostream & operator<< (std::ostream &os, const AccelCurve &obj)
 情報の表示

Detailed Description

加速曲線を生成するクラス

  • 引数の拘束に従って加速曲線を生成する
  • 始点速度と終点速度を滑らかにつなぐ
  • 移動距離の拘束はない
  • 始点速度および終点速度は,正でも負でも可

Definition at line 64 of file accel_curve.h.


Constructor & Destructor Documentation

AccelCurve ( const float  j_max,
const float  a_max,
const float  v_start,
const float  v_end 
)

初期化付きのコンストラクタ.

Parameters:
j_max最大躍度の大きさ [m/s/s/s], 正であること
a_max最大加速度の大きさ [m/s/s], 正であること
v_start始点速度 [m/s]
v_end終点速度 [m/s]

Definition at line 75 of file accel_curve.h.

AccelCurve (  )

空のコンストラクタ.あとで reset() により初期化すること.

Definition at line 83 of file accel_curve.h.


Member Function Documentation

float a ( const float  t ) const

時刻 t [s] における加速度 a [m/s/s]

Definition at line 154 of file accel_curve.h.

static float calcDistanceFromVelocityStartToEnd ( const float  j_max,
const float  a_max,
const float  v_start,
const float  v_end 
) [static]

速度差から変位を算出する関数

Parameters:
j_max最大躍度の大きさ [m/s/s/s], 正であること
a_max最大加速度の大きさ [m/s/s], 正であること
v_start始点速度 [m/s]
v_end終点速度 [m/s]
Returns:
d 変位 [m]

Definition at line 351 of file accel_curve.h.

static float calcReachableVelocityEnd ( const float  j_max,
const float  a_max,
const float  vs,
const float  vt,
const float  d 
) [static]

走行距離から達しうる終点速度を算出する関数

Parameters:
j_max最大躍度の大きさ [m/s/s/s], 正であること
a_max最大加速度の大きさ [m/s/s], 正であること
vs始点速度 [m/s]
vt目標速度 [m/s]
d走行距離 [m]
Returns:
ve 終点速度 [m/s]

Definition at line 260 of file accel_curve.h.

static float calcReachableVelocityMax ( const float  j_max,
const float  a_max,
const float  vs,
const float  ve,
const float  d 
) [static]

走行距離から達しうる最大速度を算出する関数

Parameters:
j_max最大躍度の大きさ [m/s/s/s], 正であること
a_max最大加速度の大きさ [m/s/s], 正であること
vs始点速度 [m/s]
ve終点速度 [m/s]
d走行距離 [m]
Returns:
vm 最大速度 [m/s]

Definition at line 319 of file accel_curve.h.

float j ( const float  t ) const

時刻 t [s] における躍度 j [m/s/s/s]

Definition at line 138 of file accel_curve.h.

void printCsv ( std::ostream &  os,
const float  t_interval = 1e-3f 
) const

境界のタイムスタンプを取得

std::ostream に軌道のcsvを出力する関数.

Definition at line 225 of file accel_curve.h.

void reset ( const float  j_max,
const float  a_max,
const float  v_start,
const float  v_end 
)

引数の拘束条件から曲線を生成する. この関数によって,すべての変数が初期化される.(漏れはない)

Parameters:
j_max最大躍度の大きさ [m/s/s/s], 正であること
a_max最大加速度の大きさ [m/s/s], 正であること
v_start始点速度 [m/s]
v_end終点速度 [m/s]

Definition at line 96 of file accel_curve.h.

float t_0 (  ) const

境界の時刻 [s]

Definition at line 214 of file accel_curve.h.

float t_end (  ) const

終点時刻 [s]

Definition at line 202 of file accel_curve.h.

float v ( const float  t ) const

時刻 t [s] における速度 v [m/s]

Definition at line 170 of file accel_curve.h.

float v_end (  ) const

終点速度 [m/s]

Definition at line 206 of file accel_curve.h.

float x ( const float  t ) const

時刻 t [s] における位置 x [m]

Definition at line 186 of file accel_curve.h.

float x_end (  ) const

終点位置 [m]

Definition at line 210 of file accel_curve.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const AccelCurve obj 
) [friend]

情報の表示

Definition at line 236 of file accel_curve.h.


Field Documentation

float am [protected]

加速度定数 [m/s/s]

Definition at line 371 of file accel_curve.h.

float jm [protected]

躍度定数 [m/s/s/s]

Definition at line 370 of file accel_curve.h.

float t3 [protected]

時刻定数 [s]

Definition at line 372 of file accel_curve.h.

float v3 [protected]

速度定数 [m/s]

Definition at line 373 of file accel_curve.h.

float x3 [protected]

位置定数 [m]

Definition at line 374 of file accel_curve.h.