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
Diff: RobotControl/RobotControl.cpp
- Revision:
- 8:696c2f9dfc62
- Parent:
- 6:48eeb41188dd
- Child:
- 11:775ebb69d5e1
--- a/RobotControl/RobotControl.cpp Tue Mar 26 08:29:43 2013 +0000 +++ b/RobotControl/RobotControl.cpp Sat Mar 30 06:55:08 2013 +0000 @@ -24,6 +24,9 @@ motorControllerLeft->setPulses(0); motorControllerRight->setPulses(0); + motorControllerLeft->setVelocity(0.0f); + motorControllerRight->setVelocity(0.0f); + Desired.setAcceleration(ACCELERATION); Desired.setThetaAcceleration(THETA_ACCELERATION); } @@ -208,13 +211,13 @@ stateLeft.speed = motorControllerLeft->getActualSpeed() * 2.0f * WHEEL_RADIUS_LEFT * PI * GEAR; stateRight.speed = - motorControllerRight->getActualSpeed() * - 2.0f * WHEEL_RADIUS_RIGHT * PI * GEAR; + 2.0f * WHEEL_RADIUS_RIGHT * PI * GEAR ; /* translational speed of the Robot (average) */ - Actual.speed = ( stateRight.speed + stateLeft.speed ) / 2.0f; + Actual.speed = (stateRight.speed + stateLeft.speed) / 2.0f; /* rotational speed of the Robot */ - Actual.omega = ( stateRight.speed - stateLeft.speed ) / WHEEL_DISTANCE; + Actual.omega = (stateRight.speed - stateLeft.speed) / WHEEL_DISTANCE; /* rotational theta of the Robot integrate the omega with the time*/ Actual.theta += Actual.omega * period;