test morning

Dependencies:   ISR_Mini-explorer mbed

Fork of roboticLab_withclass_3_July by Georgios Tsamis

Revision:
1:20f48907c726
Parent:
0:9f7ee7ed13e4
Child:
2:11cd5173aa36
--- a/MiniExplorerCoimbra.hpp	Mon Jun 26 12:05:20 2017 +0000
+++ b/MiniExplorerCoimbra.hpp	Mon Jul 03 17:06:16 2017 +0000
@@ -36,6 +36,9 @@
 	float kb;
 	float kv;
 	float kh;
+	float kd;
+	float k_linear;
+	float k_angular;
 
 	float rangeForce;
 	float attractionConstantForce;
@@ -49,12 +52,19 @@
 	//move of targetXWorld and targetYWorld ending in a targetAngleWorld
 	void go_to_point_with_angle(float targetXWorld, float targetYWorld, float targetAngleWorld);
 	
+	//move of targetXWorld and targetYWorld ending in a targetAngleWorld without checking the sonars
+	void go_to_point_with_angle_first_lab(float targetXWorld, float targetYWorld, float targetAngleWorld);
+	
 	//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);
+	
 	private:
 	
 	void myOdometria();
@@ -70,6 +80,8 @@
 	//Distance computation function
 	float dist(float x1, float y1, float x2, float y2);
 	
+	float distFromLine(float robot_x, float robot_y, float line_a, float line_b, float line_c);
+	
 	/*angleToTarget is obtained through atan2 so it s:
 	< 0 if the angle is bettween PI and 2pi on a trigo circle
 	> 0 if it is between 0 and PI