Raj Patel / Mbed 2 deprecated RoboticMappingControl

Dependencies:   mbed mbed-rtos Motor LSM9DS1_Library_cal X_NUCLEO_53L0A1

Committer:
rpatelpj
Date:
Thu Apr 25 03:21:17 2019 +0000
Revision:
14:0e6b26c1a7c5
Parent:
12:946f56f78d2b
Child:
17:e1a5d25218de
Added rotation error correction and lidar functionality to RobotController

Who changed what in which revision?

UserRevisionLine numberNew contents of line
abh15 6:c119cc5d48d6 1 #include "globals.h"
rpatelpj 3:1dce1ba5b8bd 2 #include "DataDistributor.h"
rpatelpj 3:1dce1ba5b8bd 3 #include "RobotController.h"
rpatelpj 0:66b7ea9af0dc 4
abh15 6:c119cc5d48d6 5 Serial pc(USBTX, USBRX);
rpatelpj 8:bfa4bf23522c 6 BusOut led(LED1, LED2, LED3, LED4);
rpatelpj 8:bfa4bf23522c 7 DigitalIn pb(p23);
rpatelpj 8:bfa4bf23522c 8
abh15 9:552805fac195 9 int* obstacles = new int[360];
rpatelpj 8:bfa4bf23522c 10 int trajectoryLength = 0;
abh15 9:552805fac195 11 int* trajectory = new int[0];
rpatelpj 0:66b7ea9af0dc 12
rpatelpj 0:66b7ea9af0dc 13 int main() {
rpatelpj 8:bfa4bf23522c 14 delete []trajectory;
rpatelpj 5:77c6821ae418 15 DataDistributor dataDistributor;
rpatelpj 14:0e6b26c1a7c5 16 RobotController robotController(p21, p15, p16, p22, p18, p19, p13, p14, p26, p28, p27);
rpatelpj 3:1dce1ba5b8bd 17
abh15 10:8f4183d640d8 18 while(1) {
abh15 10:8f4183d640d8 19 robotController.detectObstacles();
abh15 10:8f4183d640d8 20 dataDistributor.transmitObstacles();
rpatelpj 8:bfa4bf23522c 21 dataDistributor.receiveTrajectory();
abh15 10:8f4183d640d8 22 robotController.followTrajectory();
abh15 10:8f4183d640d8 23 }
rpatelpj 0:66b7ea9af0dc 24 }