
Mapping for TP2
Dependencies: ISR_Mini-explorer mbed
Fork of GoToPointWithAngle by
Revision 10:a7fd80e79e80, committed 2017-03-27
- Comitter:
- geotsam
- Date:
- Mon Mar 27 16:31:41 2017 +0000
- Parent:
- 9:b7138acdf4ac
- Commit message:
- deleted theta from function inputs
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Mar 27 16:26:41 2017 +0000 +++ b/main.cpp Mon Mar 27 16:31:41 2017 +0000 @@ -5,7 +5,7 @@ Timer t; float dist(float robot_x, float robot_y, float target_x, float target_y); -int goToPointWithAngle(float target_x, float target_y, float target_angle, int theta); +int goToPointWithAngle(float target_x, float target_y, float target_angle); float alpha; //angle error float rho; //distance from target @@ -18,6 +18,8 @@ float temp; float d2; +float map[40][40]; + //Diameter of a wheel and distance between the 2 float r=3.25, b=7.2; @@ -57,7 +59,7 @@ return sqrt(pow(target_y-robot_y,2) + pow(target_x-robot_x,2)); } -int goToPointWithAngle(float target_x, float target_y, float target_angle, int theta) { +int goToPointWithAngle(float target_x, float target_y, float target_angle) { do { pc.printf("\n\n\r entered while");