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

Dependencies:   mbed

Fork of autonomous Robot Android by Christian Burri

Revision:
0:31f7be68e52d
Child:
1:6cd533a712c6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Task/Task.h	Thu Feb 07 17:43:19 2013 +0000
@@ -0,0 +1,77 @@
+#ifndef _TASK_H_
+#define _TASK_H_
+
+#include "mbed.h"
+
+/**
+ * @author Christian Burri
+ *
+ * @section LICENSE
+ *
+ * Copyright (c) 2013 HSLU Pren Team #1 Cruising Crêpe
+ * All rights reserved.
+ * @section DESCRIPTION
+ * The <code>Task</code> class allows to install periodic, time-triggered
+ * tasks. An example of a simple user-defined task is given below:
+ * <pre><code>
+ * class MyTask : public Task {
+ *   public:
+ *     void run();
+ * };
+ *
+ * void MyTask::run() {
+ *   <span style="color:#FF0000">// code to be executed periodically</span>
+ * }
+ * </code></pre>
+ * This task can then be created and started as follows:
+ * <pre><code>
+ * MyTask myTask(0.1);    <span style="color:#FF0000">// period in seconds</span>
+ * myTask.start();
+ * ...
+ *
+ * myTask.stop();
+ * </code></pre>
+ */
+class Task
+{
+
+private:
+
+    /** specifiying the interval in seconds */
+    float       period;
+    /** The Ticker interface is used to setup a recurring interrupt to repeatedly call a function at a specified rate. */
+    Ticker      ticker;
+
+public:
+
+    /**    
+     * Creates a task object with a given period.
+     * @param period the period of this task in seconds.
+     */
+    Task(float period);
+    
+    virtual ~Task();
+
+    /**
+    * Gets the period of this task.
+    * @return the period in seconds.
+    */
+    float           getPeriod();
+
+    /**
+    * Starts this task.
+    */
+    void            start();
+
+    /**
+    * Stops this task.
+    */
+    void            stop();
+
+    /**
+    * This method needs to be implemented by a user task.
+    */
+    virtual void    run();
+};
+
+#endif