UdonLibrary 1.0.0
機械システム研究部 C++ ライブラリ
読み取り中…
検索中…
一致する文字列を見つけられません
Udon::RoboMasterBase クラスabstract

RoboMaster 基底クラス [詳解]

#include <Udon/Driver/RoboMasterMotor.hpp>

Udon::RoboMasterBase の継承関係図
Udon::RoboMasterC610 Udon::RoboMasterC620

公開メンバ関数

 RoboMasterBase (Udon::ICanBus &bus, int motorId, Udon::Direction direction=Udon::Direction::Forward)
 コンストラクタ
 
 RoboMasterBase (const RoboMasterBase &)=delete
 コピーコンストラクタ
 
 RoboMasterBase (RoboMasterBase &&other)
 ムーブコンストラクタ
 
double getAngle () const
 モーターの角度を取得
 
double getRawAngle () const
 モーターの角度を取得
 
int16_t getVelocity () const
 モーターの速度を取得
 
int16_t getTorqueCurrent () const
 モーターのトルク電流を取得
 
uint8_t getTemperature () const
 モーターの温度を取得
 
virtual void setCurrent (int16_t current)=0
 モーターの電流を設定
 
virtual Udon::Range< int16_t > getCurrentRange () const =0
 指定可能電流範囲
 

限定公開メンバ関数

void setRawCurrent (int16_t rawCurrent)
 

詳解

RoboMaster 基底クラス

覚え書き
このクラスは多態性のための基底クラスで、直接インスタンス化することはできません。Udon::RoboMasterC610 または Udon::RoboMasterC620 クラスを使用してください。

構築子と解体子

◆ RoboMasterBase() [1/3]

Udon::RoboMasterBase::RoboMasterBase ( Udon::ICanBus & bus,
int motorId,
Udon::Direction direction = Udon::Direction::Forward )
inline

コンストラクタ

引数
busCAN通信バス
motorIdモーターID (1~8)
direction回転方向

◆ RoboMasterBase() [2/3]

Udon::RoboMasterBase::RoboMasterBase ( const RoboMasterBase & )
delete

コピーコンストラクタ

覚え書き
この関数は明示的に削除されています。

◆ RoboMasterBase() [3/3]

Udon::RoboMasterBase::RoboMasterBase ( RoboMasterBase && other)
inline

ムーブコンストラクタ

関数詳解

◆ getAngle()

double Udon::RoboMasterBase::getAngle ( ) const
inline

モーターの角度を取得

覚え書き
無限の範囲の角度を扱える
戻り値
角度 [rad]

◆ getCurrentRange()

virtual Udon::Range< int16_t > Udon::RoboMasterBase::getCurrentRange ( ) const
pure virtual

指定可能電流範囲

戻り値
電流範囲

Udon::RoboMasterC610, Udon::RoboMasterC620で実装されています。

◆ getRawAngle()

double Udon::RoboMasterBase::getRawAngle ( ) const
inline

モーターの角度を取得

覚え書き
無限の角度を扱えない
戻り値
角度 [rad]

◆ getTemperature()

uint8_t Udon::RoboMasterBase::getTemperature ( ) const
inline

モーターの温度を取得

戻り値
温度 [℃]

◆ getTorqueCurrent()

int16_t Udon::RoboMasterBase::getTorqueCurrent ( ) const
inline

モーターのトルク電流を取得

戻り値
トルク電流 [mA]

◆ getVelocity()

int16_t Udon::RoboMasterBase::getVelocity ( ) const
inline

モーターの速度を取得

戻り値
速度 [rpm]

◆ setCurrent()

virtual void Udon::RoboMasterBase::setCurrent ( int16_t current)
pure virtual

モーターの電流を設定

引数
current電流値

Udon::RoboMasterC610, Udon::RoboMasterC620で実装されています。

◆ setRawCurrent()

void Udon::RoboMasterBase::setRawCurrent ( int16_t rawCurrent)
inlineprotected

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