12 float theta = angle / 2.0f;
15 x += distance * std::cos(
arg + theta);
16 y += distance * std::sin(
arg + theta);
46 float transform = 3.14f *
property.radius_wheel / 180.0f;
50 return transform * angle /
property.dt;
63 float transform =
property.radius_wheel /
property.between_wheels;
68 return transform * angle /
property.dt;
92 float distance =
velocity(left_motor, right_motor) *
property.dt;
96 coordinate.
update(distance, angle);
110 float transform = 2.0f *
property.radius_wheel /
property.between_wheels;
119 return transform * mean;
float relativeAngleMean(std::int32_t current_left_motor, std::int32_t current_right_motor)
左右モータの相対角度の平均値を計算する
float getPointX()
走行体の位置x座標を返す
float angularVelocity(std::int32_t left_motor, std::int32_t right_motor)
走行体の旋回角速度を求める
void reset()
左右モータ角度の過去値を0にリセットする
const Coordinate & getCoordinate()
走行体の位置情報を返す
float getRotationAngle(std::int32_t left_motor, std::int32_t right_motor)
走行体の回転角度を返す
float angularDifference(std::int32_t left_motor, std::int32_t right_motor)
左右モータ角度の差を計算する(右手系/反時計回りが正)
std::int32_t absoluteValueOfAngle(std::int32_t motor)
モータ角度の絶対値を計算する
void reset()
走行体の位置情報を初期化する
const Coordinate & update(std::int32_t left_motor, std::int32_t right_motor)
走行体の位置情報を更新する
float absoluteAngleMean(std::int32_t left_motor, std::int32_t right_motor)
左右モータの絶対角度の平均値を計算する
float velocity(std::int32_t left_motor, std::int32_t right_motor)
走行体の旋回速度を求める
const Coordinate & reset()
走行体の位置情報を初期化する
void update(float distance, float angle)
走行体の位置情報を更新する
float getPointY()
走行体の位置y座標を返す
オドメトリ(Wheel odometry)手法を用いた速度/角度/自己位置推定