test morning

Dependencies:   ISR_Mini-explorer mbed

Fork of roboticLab_withclass_3_July by Georgios Tsamis

Revision:
2:11cd5173aa36
Parent:
1:20f48907c726
Child:
5:19f24c363418
--- a/MiniExplorerCoimbra.hpp	Mon Jul 03 17:06:16 2017 +0000
+++ b/MiniExplorerCoimbra.hpp	Wed Jul 05 08:56:12 2017 +0000
@@ -16,6 +16,11 @@
 angles from pi/2 to -pi/2->0 to -pi				angles from pi to 2pi-> -pi to 0
 
 	The idea is that for every command to the robot we use to world coodinate system 
+	
+	The target are relative to the robot position, so if the robot is in 100,80
+	and the target is -20,30
+	the robot will go to 80,110
+	TODO I m pretty sure that a target angle is not relative to the current robot angle
 */
 
 class MiniExplorerCoimbra {
@@ -44,7 +49,9 @@
 	float attractionConstantForce;
 	float repulsionConstantForce;
 
-	MiniExplorerCoimbra(float defaultXWorld, float defaultYWorld, float defaultThetaWorld);
+	MiniExplorerCoimbra(float defaultXWorld, float defaultYWorld, float defaultThetaWorld, float widthRealMap, float heightRealMap);
+	
+	void test_procedure_lab2(int nbIteration);
 	
 	//generate a position randomly and makes the robot go there while updating the map
 	void randomize_and_map();
@@ -58,13 +65,16 @@
 	//use virtual force field
 	void try_to_reach_target(float targetXWorld,float targetYWorld);
 	
-	
-	void test_procedure_lab_4();
-	
 	void go_to_point(float targetXWorld, float targetYWorld);
 	
 	void go_to_line_first_lab(float line_a, float line_b, float line_c);
 	
+	void print_map_with_robot_position_and_target(float targetXWorld, float targetYWorld);
+	
+	void print_map_with_robot_position();
+	
+	void test_sonars_and_map(int nbIteration);
+	
 	private:
 	
 	void myOdometria();
@@ -88,8 +98,6 @@
 	*/
 	void turn_to_target(float angleToTarget);
 	
-	void print_map_with_robot_position_and_target(float targetXWorld, float targetYWorld);
-	
 	void vff(bool* reached, float targetXWorld, float targetYWorld);
 	
 	//compute the force on X and Y