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
Revision 37:fd68b9e0be08, committed 2013-06-09
- Comitter:
- chrigelburri
- Date:
- Sun Jun 09 17:37:20 2013 +0000
- Parent:
- 36:4226e50a0bcd
- Child:
- 38:d76e488e725f
- Commit message:
- beim qr wird desabled um den winkelfehler in grenzen zu halten;
Changed in this revision
RobotControl/RobotControl.cpp | Show annotated file Show diff for this revision Revisions of this file |
defines.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/RobotControl/RobotControl.cpp Sat May 25 15:42:24 2013 +0000 +++ b/RobotControl/RobotControl.cpp Sun Jun 09 17:37:20 2013 +0000 @@ -216,8 +216,10 @@ Actual.yposition += (Actual.speed * period * sin(Actual.theta)); //motor control - if ( isEnabled() && ( getDistanceError() >= MIN_DISTANCE_ERROR ) ) { - + if ( /*isEnabled() && */ ( getDistanceError() >= MIN_DISTANCE_ERROR ) ) { + + motorControllerLeft->enable(true); + motorControllerRight->enable(true); //postition control speed = K1 * getDistanceError() * cos( getThetaErrorToGoal() ); omega = K2 * getThetaErrorToGoal() + @@ -240,6 +242,9 @@ ); } else { + + motorControllerLeft->enable(false); + motorControllerRight->enable(false); motorControllerLeft->setVelocity(0.0f); motorControllerRight->setVelocity(0.0f); }
--- a/defines.h Sat May 25 15:42:24 2013 +0000 +++ b/defines.h Sun Jun 09 17:37:20 2013 +0000 @@ -152,7 +152,7 @@ * @brief Min. Distance to switch the position controller off. * Because when Distance Error goes to zero the ATAN2 is not define, given in [m] */ -#define MIN_DISTANCE_ERROR 0.001f +#define MIN_DISTANCE_ERROR 0.045f /*! @} */ /** @@ -193,7 +193,7 @@ /** * @brief 10Hz Rate for the Android communication , given in [s] */ -#define PERIOD_ANDROID (0.025f*2) +#define PERIOD_ANDROID (0.035f*2) //(0.025f*2) /*! @} */