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: Actuators/MaxonESCON/MaxonESCON.cpp
- Revision:
- 2:d8e1613dc38b
- Parent:
- 1:6cd533a712c6
diff -r 6cd533a712c6 -r d8e1613dc38b Actuators/MaxonESCON/MaxonESCON.cpp --- a/Actuators/MaxonESCON/MaxonESCON.cpp Sat Mar 02 09:39:34 2013 +0000 +++ b/Actuators/MaxonESCON/MaxonESCON.cpp Sun Mar 03 16:26:47 2013 +0000 @@ -27,7 +27,7 @@ // Set the pulses to zero _pulses = 0; - + // Set the Pull Up Resistor _isenb.mode(PullUp); } @@ -66,10 +66,10 @@ bool MaxonESCON::isEnabled() { if(_isenb.read() == 1) { - return true; - } else { - return false; - } + return true; + } else { + return false; + } } int MaxonESCON::getPulses(void) @@ -84,45 +84,3 @@ _pulses = _hall->getPulses(); return _pulses; } - - -///// Für Polling muss mit unter Code gearbeitet werden. - -/* -int MaxonESCON::getHallPosition(void) -{ - return HALL_POSITION[(_hall1.read() ? 1 : 0)+(_hall2.read() ? 2 : 0)+(_hall3.read() ? 4 : 0)]; -} - -int MaxonESCON::getPosition(void) -{ - position calculation - -int actualHallPosition = getHallPosition(); - -if (actualHallPosition > 0) { - if ((actualHallPosition == 1) && (hallPosition >= 5)) { - turns++; - } else if ((actualHallPosition == 2) && (hallPosition == 6)) { - turns++; - } else if ((actualHallPosition == 5) && (hallPosition == 1)) { - turns--; - } else if ((actualHallPosition == 6) && (hallPosition <= 2)) { - turns--; - } - hallPosition = actualHallPosition; -} -return turns; -} - -float MaxonESCON::getTransPosition(void) -{ -return (turns * 2 * _wheelRadius * pi) / (_gear * _polePairs); // PULSES_PER_STEP muss weg da nach 6 hallimpus ein turn gibt -} - -int MaxonESCON::setPosition(int setPos) -{ -turns = setPos; -return turns; -} -*/