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