#include <runCtrl.h>


Classes | |
| struct | runCommand_t |
| struct | runParams_t |
| struct | runState_t |
Public Types | |
| enum | { LineOver = +1, LineNotOver = -1, DefaultTimeout = -1 } |
Public Member Functions | |
| const char * | what (void) |
| エラー状態を示す文字列を返す | |
| virtual int | connect (int argc, char *argv[]) |
| 引数の内容を評価して接続を行う | |
| virtual int | connect (const char *device, long baudrate=Baudrate) |
| ポート指定の接続を行う | |
| virtual int | connect (void) |
| 設定ファイルの内容を評価して接続を行う | |
| int | connectSocket (const char *host, long port=SimulatorPort) |
| ソケットに対して接続 | |
| virtual void | disconnect (void) |
| ポートとの接続を切断する | |
| virtual bool | isConnected (void) |
| 接続されているかどうかを返す | |
| void | push_runState (void) |
| 走行状態の待避 | |
| void | pop_runState (void) |
| 走行状態の復帰 | |
| void | set_sendRetryTimes (int times) |
| 通信エラー時の再送回数設定 | |
| void | set_recvTimeout (int timeout=DefaultTimeout) |
| 受信時のタイムアウトを指定 | |
| void | set_watchDogTimer (unsigned long msec) |
| msec Watch Dog Timer 時間の設定 | |
| virtual VXV::Position3D | getLocalPosition (void) |
| モジュール内座標系における推定自己位置を返す | |
| VXV::Position | getRunPosition (const CoordinateCtrl *crd=VXV::GL) |
| 推定自己位置を返す | |
| void | adjustRunPosition (const VXV::Position &position, const CoordinateCtrl *crd=VXV::GL) |
| 推定自己位置の更新 | |
| void | coordinateUpdateDetect (bool on) |
| 座標系変更の影響を設定 | |
| virtual void | stop (void) |
| 移動停止 | |
| virtual void | followLine (const VXV::Position &position, const CoordinateCtrl *crd=VXV::GL) |
| 直線追従 | |
| virtual void | followCircle (const VXV::Grid ¢er, int radius, const CoordinateCtrl *crd=VXV::GL) |
| 円弧追従 | |
| void | followCircleOnTangent (const VXV::Position &position, int radius, const CoordinateCtrl *crd=VXV::GL) |
| 接線指定の円弧に追従 | |
| virtual void | stopToLine (const VXV::Position &position, const CoordinateCtrl *crd=VXV::GL) |
| 停止直線の指定 | |
| virtual void | rotateToDirection (const VXV::Direction &direction, const CoordinateCtrl *crd=VXV::GL) |
| 指定角度方向に回転 | |
| virtual void | rotateAngle (const VXV::Direction &direction) |
| 指定角度だけ回転 | |
| virtual void | spin (const VXV::Direction &velocity) |
| 連続転回 | |
| virtual void | lastMoveCommand (const CoordinateCtrl *crd=VXV::GL) |
| 過去の移動コマンドを再発行 | |
| virtual bool | isStable (void) |
| 移動の制御状態が安定しているかを返す | |
| int | getLengthToGrid (const VXV::Grid &grid, const CoordinateCtrl *crd=VXV::GL) |
| int | getLengthToBody (const VXV::Grid &grid, const CoordinateCtrl *crd=VXV::GL) |
| 指定位置と推定自己位置との距離を返す | |
| int | getLengthToLine (const VXV::Position &line, const CoordinateCtrl *crd=VXV::GL) |
| 指定直線に垂直な直線と推定自己位置との距離を返す | |
| VXV::Direction | getAngleToDirection (const VXV::Direction &t, const CoordinateCtrl *crd=VXV::GL) |
| 指定角度との差を返す | |
| int | getStraightVelDiff (int mm_vel=0) |
| 指定並進速度との差を返す | |
| VXV::Direction | getRotateVelDiff (const VXV::Direction &t=VXV::Direction()) |
| 指定回転速度との差を返す | |
| void | setStraightRefVel (int mm_sec) |
| 目標並進速度を設定 | |
| void | setStraightRefAcc (int mm_acc) |
| 目標並進加速度を設定 | |
| void | setRotateRefVel (const VXV::Direction &rotate_vel) |
| 目標角速度を設定 | |
| void | setRotateRefAcc (const VXV::Direction &rotate_acc) |
| 目標角加速度を設定 | |
| void | setCurveRadius (int mm) |
| 追従時の曲率を設定 | |
| int | getStraightVel (void) |
| 並進速度の取得 | |
| VXV::Direction | getRotateVel (void) |
| 回転速度の取得 | |
| int | getCurveRadius (void) |
| 追従時の曲率の設定を取得 | |
| virtual void | servoCtrl (bool on) |
| サーボ制御 | |
| void | setMotorPwm (int id, unsigned char duty) |
| PWM の直接指定. | |
| void | setMotorPwm (int id, unsigned char duty[], int num) |
| void | setMotorMode (int id, unsigned char mode) |
| モータの回転モードを直接指定 | |
| void | setMotorMode (int id, unsigned char mode[], int num) |
| void | getEncoderVel (int id, int *cnt) |
| エンコーダ速度の取得 | |
| void | getEncoderVel (int id, int cnt[], int num) |
| void | getEncoderValue (int id, unsigned short *cnt) |
| エンコーダカウンタ値の取得 | |
| void | getEncoderValue (int id, unsigned short cnt[], int num) |
| void | setWheelVel (int id, int mm_vel) |
| 車輪の移動速度を直接指定 | |
| void | setWheelVel (int id, int mm_vel[], int num) |
| VXV::Position | getNoResetRunPosition (void) |
| int | getBodyRotateCount (void) |
| void | getEncoderRotateCount (int id, int count[], int num=1) |
Public Attributes | |
| CoordinateCtrl & | FS |
Protected Types | |
| enum | { SimulatorPort = 49754 } |
| enum | Default { Baudrate = 115200, StraightVel = 300, StraightAcc = 600, RotateVel = 0x10000 >> 1, RotateAcc = 0x10000 >> 1, FollowRadius = 500 } |
| 初期設定 More... | |
Protected Member Functions | |
| int | to_div16 (const VXV::Direction &t) |
| Direction 値を div16 角度に変換. | |
| virtual int | raw_connect (ConnectionDevice *conObj, const char *device, long baudrate) |
| 接続処理 | |
| virtual unsigned long | getHostTicks (void) |
| ホスト側のタイムスタンプ取得 | |
| virtual void | initTicksInfo (void) |
| 時刻合わせ処理の初期化 | |
Protected Attributes | |
| VXV::Position | local_offset |
| runCtrl_t * | tbl |
| runCtrl_t | tblResource |
Friends | |
| class | PacketHandleHostTest |
| class | tRunCtrl_Simulator |
| class | MonitorTask |
Definition at line 25 of file runCtrl.h.
enum RunCtrl::Default [protected] |
| int RunCtrl::to_div16 | ( | const VXV::Direction & | t | ) | [protected] |
Direction 値を div16 角度に変換.
走行制御コントローラに角度を渡す際の変換に使用
| t | [i] 角度 [VXV::Direction] |
| div16 | 値 |
Definition at line 10 of file moveCtrl.cpp.
References VXV::Direction::to_rad().
Referenced by followLine(), rotateToDirection(), setRotateRefAcc(), setRotateRefVel(), spin(), and stopToLine().
| int RunCtrl::raw_connect | ( | ConnectionDevice * | conObj, | |
| const char * | device, | |||
| long | baudrate | |||
| ) | [protected, virtual] |
接続処理
接続処理を行う
| conObj | [i] 接続オブジェクト | |
| device | [i] 接続デバイス | |
| baudrate | [i] 接続ボーレート |
| 0 | 正常終了 | |
| 戻り値 | < 0 エラー |
Definition at line 178 of file runCtrl.cpp.
References ConnectionDevice::connect(), disconnect(), and ConnectionDevice::what().
Referenced by connect(), and mRunCtrl::connect().
VXV::Position RunCtrl::local_offset [protected] |
ロボット位置の修正用
Definition at line 56 of file runCtrl.h.
Referenced by adjustRunPosition(), getLocalPosition(), and mRunCtrl::getLocalPosition().
runCtrl_t* RunCtrl::tbl [protected] |
| CoordinateCtrl& RunCtrl::FS |
1.5.7.1