14#ifndef MOTORSIMULATORS
15#define MOTORSIMULATORS
30 #define arcs_assert(a) (assert(a))
33 #define EventLogVar(a)
45 MotorSimulators(
const std::array<struct MotorParamDef, N>& Params,
const double SmplTime)
50 for(
size_t i = 0; i < N; ++i){
51 PlantSyss.at(i).SetParameters(Params.at(i).Kt, Params.at(i).Jm, Params.at(i).Dm, SmplTime);
58 : PlantSyss(std::move(r.PlantSyss))
73 for(
size_t i = 0; i < N; ++i){
74 PlantSyss.at(i).SetCurrentAndLoadTorque(Current.at(i), LoadTorque.at(i));
83 for(
size_t i = 0; i < N; ++i){
84 PlantSyss.at(i).GetVelocityAndPosition(Velocity.at(i), Position.at(i));
93 std::array<MotorSimulator, N> PlantSyss;
#define PassedLog()
イベントログ用マクロ(ファイルと行番号のみ記録版)
Definition ARCSeventlog.hh:26
モータシミュレータ(ベクトル対応版)
Definition MotorSimulators.hh:40
MotorSimulators(const std::array< struct MotorParamDef, N > &Params, const double SmplTime)
コンストラクタ
Definition MotorSimulators.hh:45
void SetCurrentAndLoadTorque(const std::array< double, N > Current, const std::array< double, N > LoadTorque)
予め電流と負荷トルクを設定する関数
Definition MotorSimulators.hh:71
~MotorSimulators()
デストラクタ
Definition MotorSimulators.hh:64
void GetVelocityAndPosition(std::array< double, N > &Velocity, std::array< double, N > &Position)
予めセットされたモータ電流と負荷トルクから速度と位置を計算する関数
Definition MotorSimulators.hh:81
MotorSimulators(MotorSimulators &&r)
ムーブコンストラクタ
Definition MotorSimulators.hh:57