This program is for an autonomous robot for the competition at the Hochschule Luzern. We are one of the 32 teams. <a href="http://cruisingcrepe.wordpress.com/">http://cruisingcrepe.wordpress.com/</a> The postition control is based on this Documentation: Control of Wheeled Mobile Robots: An Experimental Overview from Alessandro De Luca, Giuseppe Oriolo, Marilena Vendittelli. For more information see here: <a href="http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf">http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf</a>
Fork of autonomousRobotAndroid by
MicroBridge/androidADB.h@27:a13ede88e75f, 2013-05-20 (annotated)
- Committer:
- chrigelburri
- Date:
- Mon May 20 11:51:33 2013 +0000
- Revision:
- 27:a13ede88e75f
- Parent:
- 21:48248c5b8992
- Child:
- 32:767044a3e421
mit led methode
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chrigelburri | 18:306d362d692b | 1 | #ifndef _ANDROIDADB_H_ |
chrigelburri | 18:306d362d692b | 2 | #define _ANDROIDADB_H_ |
chrigelburri | 18:306d362d692b | 3 | |
chrigelburri | 18:306d362d692b | 4 | #include "mbed.h" |
chrigelburri | 18:306d362d692b | 5 | #include "Adb.h" |
chrigelburri | 20:01b233b0e606 | 6 | #include "defines.h" |
chrigelburri | 20:01b233b0e606 | 7 | #include "RobotControl.h" |
chrigelburri | 18:306d362d692b | 8 | |
chrigelburri | 18:306d362d692b | 9 | #include <string> |
chrigelburri | 18:306d362d692b | 10 | #include <sstream> |
chrigelburri | 18:306d362d692b | 11 | #include <vector> |
chrigelburri | 18:306d362d692b | 12 | #include <iostream> |
chrigelburri | 18:306d362d692b | 13 | #include <stdlib.h> |
chrigelburri | 18:306d362d692b | 14 | |
chrigelburri | 18:306d362d692b | 15 | /** |
chrigelburri | 21:48248c5b8992 | 16 | * @brief Takes an string, a vector of strings for the delimited tokens, and a with the |
chrigelburri | 21:48248c5b8992 | 17 | * @param str |
chrigelburri | 21:48248c5b8992 | 18 | * @param tokens |
chrigelburri | 21:48248c5b8992 | 19 | * @param delimiters |
chrigelburri | 21:48248c5b8992 | 20 | */ |
chrigelburri | 18:306d362d692b | 21 | void Tokenize(const string& str, |
chrigelburri | 18:306d362d692b | 22 | vector<string>& tokens, |
chrigelburri | 18:306d362d692b | 23 | const string& delimiters = " "); |
chrigelburri | 21:48248c5b8992 | 24 | |
chrigelburri | 21:48248c5b8992 | 25 | /** |
chrigelburri | 21:48248c5b8992 | 26 | * @brief @todo |
chrigelburri | 21:48248c5b8992 | 27 | * @param length |
chrigelburri | 21:48248c5b8992 | 28 | * @param data |
chrigelburri | 21:48248c5b8992 | 29 | */ |
chrigelburri | 21:48248c5b8992 | 30 | void parseMessage(uint16_t length, uint8_t * data); |
chrigelburri | 21:48248c5b8992 | 31 | |
chrigelburri | 21:48248c5b8992 | 32 | /** |
chrigelburri | 21:48248c5b8992 | 33 | * @brief @todo |
chrigelburri | 21:48248c5b8992 | 34 | * Connecting to android. |
chrigelburri | 21:48248c5b8992 | 35 | */ |
chrigelburri | 18:306d362d692b | 36 | void connect(); |
chrigelburri | 18:306d362d692b | 37 | |
chrigelburri | 21:48248c5b8992 | 38 | /** |
chrigelburri | 21:48248c5b8992 | 39 | * @brief Gets the desired θ value. |
chrigelburri | 21:48248c5b8992 | 40 | * @return the desired θ, given in [°] GRad oder rad?????????????????? |
chrigelburri | 21:48248c5b8992 | 41 | */ |
chrigelburri | 19:b2f76b0fe4c8 | 42 | float getDesiredTheta(); |
chrigelburri | 21:48248c5b8992 | 43 | |
chrigelburri | 21:48248c5b8992 | 44 | /** |
chrigelburri | 21:48248c5b8992 | 45 | * @brief Gets the desired X-postition. |
chrigelburri | 21:48248c5b8992 | 46 | * @return the desired X-postition, given in [m] |
chrigelburri | 21:48248c5b8992 | 47 | */ |
chrigelburri | 19:b2f76b0fe4c8 | 48 | float getDesiredX(); |
chrigelburri | 21:48248c5b8992 | 49 | |
chrigelburri | 21:48248c5b8992 | 50 | /** |
chrigelburri | 21:48248c5b8992 | 51 | * @brief Gets the desired Y-postition. |
chrigelburri | 21:48248c5b8992 | 52 | * @return the desired Y-postition, given in [m] |
chrigelburri | 21:48248c5b8992 | 53 | */ |
chrigelburri | 19:b2f76b0fe4c8 | 54 | float getDesiredY(); |
chrigelburri | 19:b2f76b0fe4c8 | 55 | |
chrigelburri | 21:48248c5b8992 | 56 | /** |
chrigelburri | 27:a13ede88e75f | 57 | * @brief Sets the desired θ value. |
chrigelburri | 27:a13ede88e75f | 58 | * @param t desired θ value, given in [°] |
chrigelburri | 27:a13ede88e75f | 59 | */ |
chrigelburri | 27:a13ede88e75f | 60 | void setDesiredTheta(float t); |
chrigelburri | 27:a13ede88e75f | 61 | |
chrigelburri | 27:a13ede88e75f | 62 | /** |
chrigelburri | 21:48248c5b8992 | 63 | * @brief Initialise the ADB subsystem. Open an ADB stream on tcp port 4568. |
chrigelburri | 21:48248c5b8992 | 64 | */ |
chrigelburri | 19:b2f76b0fe4c8 | 65 | void init(); |
chrigelburri | 19:b2f76b0fe4c8 | 66 | |
chrigelburri | 21:48248c5b8992 | 67 | /** |
chrigelburri | 21:48248c5b8992 | 68 | * @brief @todo |
chrigelburri | 21:48248c5b8992 | 69 | * @param str |
chrigelburri | 21:48248c5b8992 | 70 | */ |
chrigelburri | 19:b2f76b0fe4c8 | 71 | void write2Android(char str [32]); |
chrigelburri | 19:b2f76b0fe4c8 | 72 | |
chrigelburri | 21:48248c5b8992 | 73 | /** |
chrigelburri | 21:48248c5b8992 | 74 | * @brief Write the Parameterlist to the android smartphone. |
chrigelburri | 21:48248c5b8992 | 75 | * @param x |
chrigelburri | 21:48248c5b8992 | 76 | * @param y |
chrigelburri | 21:48248c5b8992 | 77 | * @param t |
chrigelburri | 21:48248c5b8992 | 78 | * @param state_u |
chrigelburri | 21:48248c5b8992 | 79 | * @param state_r |
chrigelburri | 21:48248c5b8992 | 80 | * @param volt_b |
chrigelburri | 21:48248c5b8992 | 81 | */ |
chrigelburri | 20:01b233b0e606 | 82 | void writeActualPosition(float x, float y, float t, int state_u, int state_l, int state_r, float volt_b); |
chrigelburri | 19:b2f76b0fe4c8 | 83 | |
chrigelburri | 18:306d362d692b | 84 | #endif |