MicroMouse Control Module  v1.3.2-2-ge2c6882
公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
ctrl::slalom::Trajectory クラス

slalom::Trajectory スラローム軌道を生成するクラス [詳解]

#include <trajectory.h>

ctrl::slalom::Trajectory 連携図
Collaboration graph
[凡例]

公開メンバ関数

 Trajectory (const Shape &shape, const bool mirror_x=false)
 コンストラクタ [詳解]
 
void reset (const float velocity, const float th_start=0, const float t_start=0)
 並進速度を設定して軌道を初期化する関数 [詳解]
 
void update (State &state, const float t, const float Ts, const float k_slip=0) const
 軌道の更新 [詳解]
 
float getVelocity () const
 並進速度を取得 [詳解]
 
float getTimeCurve () const
 ターンの合計時間を取得 [詳解]
 
const ShapegetShape () const
 スラローム形状を取得 [詳解]
 
const AccelDesignergetAccelDesigner () const
 角速度設計器を取得 [詳解]
 

限定公開変数類

Shape shape
 スラロームの形状 [詳解]
 
AccelDesigner ad
 角速度用の曲線加速生成器 [詳解]
 
float velocity
 並進速度 [詳解]
 

詳解

slalom::Trajectory スラローム軌道を生成するクラス

スラローム形状 Shape と並進速度をもとに、各時刻における位置や速度を提供する。

構築子と解体子

◆ Trajectory()

ctrl::slalom::Trajectory::Trajectory ( const Shape shape,
const bool  mirror_x = false 
)
inline

コンストラクタ

引数
[in]shapeスラローム形状
[in]mirror_xスラローム形状を$x$軸反転(進行方向に対して左右反転)する
35  : shape(shape) {
36  if (mirror_x) {
37  this->shape.curve = shape.curve.mirror_x();
38  this->shape.total = shape.total.mirror_x();
39  }
40  }
Shape shape
スラロームの形状
Definition: trajectory.h:85
Pose mirror_x() const
Definition: pose.h:27
Pose total
前後の直線を含めた移動位置姿勢
Definition: slalom.h:49
Pose curve
カーブ部分の移動位置姿勢
Definition: slalom.h:50
呼び出し関係図:

関数詳解

◆ getAccelDesigner()

const AccelDesigner& ctrl::slalom::Trajectory::getAccelDesigner ( ) const
inline

角速度設計器を取得

82 { return ad; }
AccelDesigner ad
角速度用の曲線加速生成器
Definition: trajectory.h:86

◆ getShape()

const Shape& ctrl::slalom::Trajectory::getShape ( ) const
inline

スラローム形状を取得

78 { return shape; }

◆ getTimeCurve()

float ctrl::slalom::Trajectory::getTimeCurve ( ) const
inline

ターンの合計時間を取得

74 { return ad.t_end(); }
float t_end() const
終点時刻 [s]
Definition: accel_designer.h:209
呼び出し関係図:

◆ getVelocity()

float ctrl::slalom::Trajectory::getVelocity ( ) const
inline

並進速度を取得

70 { return velocity; }
float velocity
並進速度
Definition: trajectory.h:87

◆ reset()

void ctrl::slalom::Trajectory::reset ( const float  velocity,
const float  th_start = 0,
const float  t_start = 0 
)
inline

並進速度を設定して軌道を初期化する関数

引数
velocity並進速度 [m/s]
th_start初期姿勢 [rad] (オプション)
t_start初期時刻 [s] (オプション)
49  {
50  this->velocity = velocity;
51  const float gain = velocity / shape.v_ref;
52  ad.reset(gain * gain * gain * shape.dddth_max, gain * gain * shape.ddth_max,
53  gain * shape.dth_max, 0, 0, shape.total.th, th_start, t_start);
54  }
void reset(const float j_max, const float a_max, const float v_max, const float v_start, const float v_target, const float dist, const float x_start=0, const float t_start=0)
引数の拘束条件から曲線を生成する関数
Definition: accel_designer.h:70
float th
theta 成分 [rad]
Definition: pose.h:21
float v_ref
カーブ部分の基準速度 [m/s]
Definition: slalom.h:53
float dddth_max
最大角躍度の大きさ [rad/s/s/s]
Definition: slalom.h:54
float ddth_max
最大角加速度の大きさ [rad/s/s]
Definition: slalom.h:55
float dth_max
最大角速度の大きさ [rad/s]
Definition: slalom.h:56
呼び出し関係図:

◆ update()

void ctrl::slalom::Trajectory::update ( State state,
const float  t,
const float  Ts,
const float  k_slip = 0 
) const
inline

軌道の更新

引数
[in,out]state次の時刻に更新する現在状態
[in]t現在時刻 [s]
[in]Ts積分時間 [s]
[in]k_slipスリップ角の比例定数
64  {
65  return Shape::integrate(ad, state, velocity, t, Ts, k_slip);
66  }
static void integrate(const AccelDesigner &ad, State &s, const float v, const float t, const float Ts, const float k_slip=0)
軌道の積分を行う関数。ルンゲクッタ法を使用して数値積分を行う。
Definition: slalom.h:144
呼び出し関係図:

メンバ詳解

◆ ad

AccelDesigner ctrl::slalom::Trajectory::ad
protected

角速度用の曲線加速生成器

◆ shape

Shape ctrl::slalom::Trajectory::shape
protected

スラロームの形状

◆ velocity

float ctrl::slalom::Trajectory::velocity
protected

並進速度


このクラス詳解は次のファイルから抽出されました: