This program is for an autonomous robot for the competition at the Hochschule Luzern. http://cruisingcrepe.wordpress.com/ We are one of the 32 teams. http://cruisingcrepe.wordpress.com/ 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: http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf
Fork of autonomous Robot Android by
Diff: Android/Android.h
- Revision:
- 2:d8e1613dc38b
- Parent:
- 1:6cd533a712c6
- Child:
- 3:92ba0254af87
--- a/Android/Android.h Sat Mar 02 09:39:34 2013 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -#ifndef _Android_H_ -#define _Android_H_ - -#include <cmath> -#include "mbed.h" -#include "RobotControl.h" -#include "AndroidAccessory.h" -#include "Task.h" -#include "defines.h" - -// Communication -#define OUTL 100 //The size of the read buffer -#define INBL 100 //The size of the write buffer -#define MANUFACTURER "ARM" //The manufacturer of the accessory -#define MODEL "mbed" //The model of the accessory -#define DESCRIPTION "mbed Terminal" //A short description of the accessory -#define VERSION "0.1" //The current version of the accessory -#define URI "http://www.mbed.org" //Some data to go with the accessory (URL or more description) -#define SERIAL "0000000012345678" //The serial number of the accessory - - -/** - * @author Christian Burri - * - * @section LICENSE - * - * Copyright (c) 2013 HSLU Pren Team #1 Cruising Crêpe - * All rights reserved. - * - * @section DESCRIPTION - * IMMPORTANT: OnLoadDevice(..) muss noch bei AndroidAccesory.cpp auskommentiert werden, weil es schon beim BLUE USB vorkommt. - * AUCH WICHTIG: Nach dem Löschen von BLUE USB Muss der USBHost neu importiert werden im Andoid/AndroidAccessory Es sind drei Dateinen - * Connect to an Android Smartphone...... - */ - -class Android : public AndroidAccessory, Task -{ - -private: - - state_t* s; - RobotControl* robotControl; - MaxonESCON* motorControllerLeft; - MaxonESCON* motorControllerRight; - float period; - -public: - - - /** - * Creates a Android object and initializes all private - * Android variables. - * @param RobotControl Objekt to read the State. - * @param motorControllerLeft a reference to the servo drive for the left motor. - * @param motorControllerRight a reference to the servo drive for the right motor. - * @param period the sampling period of the run loop of this controller, given in [s]. - */ - Android(state_t* s, RobotControl* robotControl,MaxonESCON* motorControllerLeft, MaxonESCON* motorControllerRight, float period); - - /** - * Destructor of the Object to destroy the Object. - **/ - virtual ~Android(); - - - /** Init the device - * This is meant to be implimented by the user of the class - * - * @param device Device number - * @param configuration Configuration - * @param interfaceNumber Inteface number - */ - ///////////////////////////// virtual void init (int device, int configuration, int interfaceNumber); - - /** Reset the device - * This is meant to be implimented by the user of the class - * - */ - virtual void resetDevice (); - - /** Setup the device - * This is meant to be implimented by the user of the class. Called when the device is first intialised - * - */ - virtual void setupDevice (); - - /** Callback on Read - * This is meant to be implimented by the user of the class. Called when some data has been read in. - * - * @param buff The buffered read in data - * @param len The length of the packet recived - * - */ - virtual int callbackRead (u8 *buff, int len); - - /** Callback after Write - * This is meant to be implimented by the user of the class. Called when the write has been finished. - * - */ - virtual int callbackWrite (); - - - void run(); - - -private: - - void serialIRQ(); - void onTick(); - void AttachTick(); - char buffer[INBL]; - int bcount; - Ticker tick; - float right,left,rl,ll; - int tl,tr; - Timeout n; - bool settick; - - -}; - -#endif