Merge branch 'main' into ControlledMotor
This commit is contained in:
commit
0e11b0db5f
@ -48,7 +48,6 @@ add_library(RoboidControl STATIC
|
|||||||
"Motor.cpp"
|
"Motor.cpp"
|
||||||
"DifferentialDrive.cpp"
|
"DifferentialDrive.cpp"
|
||||||
"DistanceSensor.cpp"
|
"DistanceSensor.cpp"
|
||||||
"Placement.cpp"
|
|
||||||
"Sensor.cpp"
|
"Sensor.cpp"
|
||||||
"Switch.cpp"
|
"Switch.cpp"
|
||||||
"Thing.cpp"
|
"Thing.cpp"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#if GTEST
|
// #if GTEST
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "DifferentialDrive.h"
|
#include "DifferentialDrive.h"
|
||||||
@ -10,15 +10,15 @@ TEST(BB2B, Basics) {
|
|||||||
Motor *motorRight = new Motor();
|
Motor *motorRight = new Motor();
|
||||||
|
|
||||||
DistanceSensor *sensorLeft = new DistanceSensor();
|
DistanceSensor *sensorLeft = new DistanceSensor();
|
||||||
|
sensorLeft->position.angle = -30;
|
||||||
DistanceSensor *sensorRight = new DistanceSensor();
|
DistanceSensor *sensorRight = new DistanceSensor();
|
||||||
|
sensorRight->position.angle = 30;
|
||||||
|
|
||||||
|
Sensor *sensors[] = {sensorLeft, sensorRight};
|
||||||
|
|
||||||
Placement sensors[] = {Placement(sensorLeft, -30),
|
|
||||||
Placement(sensorRight, 30)};
|
|
||||||
Perception *perception = new Perception(sensors, 2);
|
Perception *perception = new Perception(sensors, 2);
|
||||||
|
|
||||||
DifferentialDrive *propulsion =
|
DifferentialDrive *propulsion = new DifferentialDrive(motorLeft, motorRight);
|
||||||
new DifferentialDrive(Placement(motorLeft, Vector3(-1, 0, 0)),
|
|
||||||
Placement(motorRight, Vector3(1, 0, 0)));
|
|
||||||
|
|
||||||
Roboid *roboid = new Roboid(perception, propulsion);
|
Roboid *roboid = new Roboid(perception, propulsion);
|
||||||
|
|
||||||
@ -36,4 +36,4 @@ TEST(BB2B, Basics) {
|
|||||||
|
|
||||||
// cannot chek verlocity in this branch?
|
// cannot chek verlocity in this branch?
|
||||||
}
|
}
|
||||||
#endif
|
// #endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user