Robot's source code
Dependencies: mbed
Diff: Asserv_Plan_B/Scratch.h
- Revision:
- 108:890094ee202a
diff -r 05096985d1b2 -r 890094ee202a Asserv_Plan_B/Scratch.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Asserv_Plan_B/Scratch.h Tue May 05 16:35:42 2015 +0000 @@ -0,0 +1,20 @@ +/*float erreur_distance_g = distance_g-(m_odometry.getDistLeft()-memo_g); //- distance parcourue par la roue gauche depuis l'état 2 +float erreur_distance_d = distance_d-(m_odometry.getDistRight()-memo_d); +cmd_g = erreur_distance_g*Kp_distance; +cmd_d = erreur_distance_d*Kp_distance; +m_motorL.setSpeed(cmd_g); +m_motorR.setSpeed(cmd_d);*/ + +/*void aserv_planB::control_speed() +{ + vitesse_d = m_odometry.getVitRight(); + vitesse_g = m_odometry.getVitLeft(); + + erreur_g = consigne_g - vitesse_g; + cmd_g = erreur_g*Kp; + erreur_d = consigne_d - vitesse_d; + cmd_d = erreur_d*Kp; + + m_motorL.setSpeed(cmd_g); + m_motorR.setSpeed(cmd_d); +}*/ \ No newline at end of file