Chassis
v2.1.1
Chassisはロボコンでの足回り制御を行うためのC++ライブラリである。
Loading...
Searching...
No Matches
Omni.cpp
Go to the documentation of this file.
1
3
4
#include <../snippets/Motor.h>
5
#include <Arduino.h>
6
#include <
Omni.h
>
7
8
Motor motors[3] = {{D10, D11}, {D12, D13}, {D12, D13}};
9
Omni<3> omni{[](std::array<float, 3> pwm) {
10
for
(
int
i = 0; i < 3; ++i) {
11
motors[i] = pwm[i];
12
}
13
}};
14
15
void
setup() {
16
// put your setup code here, to run once:
17
}
18
19
void
loop() {
20
// put your main code here, to run repeatedly:
21
Velocity
vel = {0, 0.5, 0};
22
omni.move(vel);
23
}
24
25
int
main() {
26
setup();
27
while
(1) {
28
loop();
29
}
30
}
Omni.h
オムニの制御を行う Omni クラスを提供する。
rct::Velocity
CoordinateUnit<-1 > Velocity
速度を示す構造体
Definition
CoordinateUnit.h:71
examples
Arduino
Omni
Omni.cpp
Generated by
1.9.8