Localization

Dependencies:   BNO055_fusion mbed

Committer:
12104404
Date:
Tue Mar 29 02:12:08 2016 +0000
Revision:
18:f9012e93edb8
Parent:
17:2f89826b5679
ROBOT CLEANS THE PATH;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
12104404 6:0602a9e8118b 1 #ifndef LOCOMOTION_H
12104404 6:0602a9e8118b 2 #define LOCOMOTION_H
12104404 6:0602a9e8118b 3
12104404 6:0602a9e8118b 4 #include "mbed.h"
12104404 17:2f89826b5679 5 #include "LOCALIZE.h"
12104404 6:0602a9e8118b 6
12104404 16:d6f15a13c3aa 7 #define SPEED_TURN_MIN 0.20
12104404 16:d6f15a13c3aa 8 #define SPEED_TURN_MAX 0.65
12104404 15:7729da55873a 9
12104404 15:7729da55873a 10 enum {
12104404 15:7729da55873a 11 ANGLE_TURN = 0,
12104404 15:7729da55873a 12 ANGLE_BIAS = 1,
12104404 15:7729da55873a 13 };
12104404 6:0602a9e8118b 14
12104404 6:0602a9e8118b 15 class LOCOMOTION
12104404 6:0602a9e8118b 16 {
12104404 6:0602a9e8118b 17 public:
12104404 15:7729da55873a 18 LOCOMOTION(PinName motor1F, PinName motor1B,PinName motor2F, PinName motor2B, PinName forward1, PinName forward2);
12104404 15:7729da55873a 19 PwmOut _m1f;
12104404 15:7729da55873a 20 PwmOut _m1b;
12104404 15:7729da55873a 21 PwmOut _m2f;
12104404 15:7729da55873a 22 PwmOut _m2b;
12104404 15:7729da55873a 23 DigitalOut _m1dir;
12104404 15:7729da55873a 24 DigitalOut _m2dir;
12104404 18:f9012e93edb8 25 bool setXPos(int target, int current, int error, int angle);
12104404 18:f9012e93edb8 26 bool setYPos(int target, int current, int error, int angle);
12104404 15:7729da55873a 27 bool setAngle(int target, int current, int error, int mode);
12104404 15:7729da55873a 28 int wrap(int num);
12104404 15:7729da55873a 29
12104404 15:7729da55873a 30 protected:
12104404 17:2f89826b5679 31 float s;
12104404 6:0602a9e8118b 32 };
12104404 6:0602a9e8118b 33 #endif