Chassis v2.1.1
Chassisはロボコンでの足回り制御を行うためのC++ライブラリである。
Loading...
Searching...
No Matches
rct::SteerDrive< N > Struct Template Reference

N輪独立ステアリング駆動機 More...

#include <SteerDrive.h>

Public Member Functions

template<class F >
 SteerDrive (F &&f)
 コンストラクタ。callback関数をセットする。
 
void move (const Velocity &vel, float offset_rad=0.0)
 モータへのPWM出力を計算する。その後callback関数にPWM出力を渡す。
 

Static Public Member Functions

static constexpr int size () noexcept
 モータ数を返す。
 

Detailed Description

template<int N>
struct rct::SteerDrive< N >

N輪独立ステアリング駆動機

Template Parameters
Nステアリングホイール数。 N > 0であること。

Definition at line 23 of file SteerDrive.h.

Constructor & Destructor Documentation

◆ SteerDrive()

template<int N>
template<class F >
rct::SteerDrive< N >::SteerDrive ( F &&  f)

コンストラクタ。callback関数をセットする。

Template Parameters
F関数型。引数に std::array<std::complex<float>, N> を受け取り、返り値が void であること。
Parameters
fcallback関数

Definition at line 30 of file SteerDrive.h.

Member Function Documentation

◆ move()

template<int N>
void rct::SteerDrive< N >::move ( const Velocity vel,
float  offset_rad = 0.0 
)

モータへのPWM出力を計算する。その後callback関数にPWM出力を渡す。

Parameters
vel移動速度
offset_rad姿勢角

Definition at line 41 of file SteerDrive.h.

◆ size()

template<int N>
static constexpr int rct::SteerDrive< N >::size ( )
staticconstexprnoexcept

モータ数を返す。

Returns
SteerDrive クラスの templateパラメータである N 定数を返す。

Definition at line 34 of file SteerDrive.h.


The documentation for this struct was generated from the following file: