|
ETrobocon2017 - 片山研究所モデルベース開発推進事業部
|
2点間を結ぶ仮想直線をライントレースするクラス [詳解]
#include "Navigation.h"


公開メンバ関数 | |
| Navigation (std::int32_t, std::int32_t, bool isSave=true) | |
| bool | setLine (float, float, float, float) |
| float | getDiffLine (float, float) |
| bool | checkEndOfLine () |
| bool | calculateValue (std::int32_t, std::int32_t, bool) |
| bool | calculateAngle (std::int32_t, std::int32_t, bool) |
| void | calculate_line_angle (bool) |
基底クラス LineTracerWalker に属する継承公開メンバ関数 | |
| LineTracerWalker () | |
| void | runLine (int32_t countL, int32_t countR, int8_t light_value) |
| void | setForward (int8_t setValue) |
| void | setTurn (int8_t setValue) |
| int8_t | getForward () |
| int8_t | getTurn () |
| void | isLeftsideLine (bool b) |
公開変数類 | |
| SelfLocalization | sl |
| int | goal_angle |
| float | start_x |
| float | start_y |
| float | goal_x |
| float | goal_y |
| float | current_x |
| float | current_y |
| float | diff_line |
基底クラス LineTracerWalker に属する継承公開変数類 | |
| TurnControl | turnControl |
| SpeedControl | speedControl |
| int8_t | minus |
その他の継承メンバ | |
基底クラス LineTracerWalker に属する継承限定公開変数類 | |
| int8_t | forward |
| int8_t | turn |
| Navigation::Navigation | ( | std::int32_t | left_degree, |
| std::int32_t | right_degree, | ||
| bool | isSave = true |
||
| ) |
| void Navigation::calculate_line_angle | ( | bool | isBack | ) |
| bool Navigation::calculateAngle | ( | std::int32_t | left_degree, |
| std::int32_t | right_degree, | ||
| bool | isBack | ||
| ) |
| bool Navigation::calculateValue | ( | std::int32_t | left_degree, |
| std::int32_t | right_degree, | ||
| bool | isBack | ||
| ) |
| bool Navigation::checkEndOfLine | ( | ) |
| float Navigation::getDiffLine | ( | float | _current_x, |
| float | _current_y | ||
| ) |
走行体から仮想線までの最短距離を取得する関数
| 現在地のX座標 | |
| 現在地のY座標 |
Navigation.cpp の 24 行目に定義があります。


| bool Navigation::setLine | ( | float | _start_x, |
| float | _start_y, | ||
| float | _goal_x, | ||
| float | _goal_y | ||
| ) |
仮想線を定義する関数
| スタートのX座標 | |
| スタートのY座標 | |
| ゴールのX座標 | |
| ゴールのY座標 |
Navigation.cpp の 12 行目に定義があります。

| float Navigation::current_x |
現在のX座標
Navigation.h の 59 行目に定義があります。
| float Navigation::current_y |
現在のY座標
Navigation.h の 61 行目に定義があります。
| float Navigation::diff_line |
ラインまでの距離
Navigation.h の 63 行目に定義があります。
| int Navigation::goal_angle |
Navigation.h の 45 行目に定義があります。
| float Navigation::goal_x |
ゴールのX座標
Navigation.h の 55 行目に定義があります。
| float Navigation::goal_y |
ゴールのY座標
Navigation.h の 57 行目に定義があります。
| SelfLocalization Navigation::sl |
Navigation.h の 44 行目に定義があります。
| float Navigation::start_x |
0.1sで進んだ距離[mm/0.1s] スタートのX座標
Navigation.h の 51 行目に定義があります。
| float Navigation::start_y |
スタートのY座標
Navigation.h の 53 行目に定義があります。
1.8.13