Robot's source code
Dependencies: mbed
Diff: main.cpp
- Revision:
- 41:c04c2ec37aad
- Parent:
- 40:83ce8d1072ef
- Child:
- 42:fcb48e2fc426
--- a/main.cpp Tue Mar 17 14:38:54 2015 +0000 +++ b/main.cpp Wed Mar 18 12:25:33 2015 +0000 @@ -91,16 +91,16 @@ Asserv<float> instanceAsserv(&odometry); /*----------------------------------------------------------------------------------------------*/ - instanceAsserv.setGoal( (float)10,(float)0, (float)PI/2); + instanceAsserv.setGoal( (float)10,(float)0, (float)0); logger.printf("Debut boucle.\r\n"); while(1) { //Asservissement : - logger.printf("1\r\n"); + t.start(); - logger.printf("2\r\n"); + instanceAsserv.update((float)t.read()); logger.printf("2\r\n"); Mat<float> X( instanceAsserv.getX() ); @@ -113,7 +113,9 @@ //blue.printf("State : \n\r"); //(instanceAsserv.getX()).afficherMblue(); //blue.printf("Odometry : \n\r"); - //z.afficherMblue(); + //z.afficherMblue(); + motorR.setSpeed(phi_r/phi_max); + motorL.setSpeed(phi_l/phi_max); //Timer Handling : t.stop();