@@ -110,17 +110,19 @@ def transformation_matrix(x, y, theta):
110110
111111
112112def main ():
113- x_start = 20 * random ()
114- y_start = 20 * random ()
115- theta_start = 2 * np .pi * random () - np .pi
116- x_goal = 20 * random ()
117- y_goal = 20 * random ()
118- theta_goal = 2 * np .pi * random () - np .pi
119- print ("Initial x: %.2f m\n Initial y: %.2f m\n Initial theta: %.2f rad\n " %
120- (x_start , y_start , theta_start ))
121- print ("Goal x: %.2f m\n Goal y: %.2f m\n Goal theta: %.2f rad\n " %
122- (x_goal , y_goal , theta_goal ))
123- move_to_pose (x_start , y_start , theta_start , x_goal , y_goal , theta_goal )
113+
114+ for i in range (5 ):
115+ x_start = 20 * random ()
116+ y_start = 20 * random ()
117+ theta_start = 2 * np .pi * random () - np .pi
118+ x_goal = 20 * random ()
119+ y_goal = 20 * random ()
120+ theta_goal = 2 * np .pi * random () - np .pi
121+ print ("Initial x: %.2f m\n Initial y: %.2f m\n Initial theta: %.2f rad\n " %
122+ (x_start , y_start , theta_start ))
123+ print ("Goal x: %.2f m\n Goal y: %.2f m\n Goal theta: %.2f rad\n " %
124+ (x_goal , y_goal , theta_goal ))
125+ move_to_pose (x_start , y_start , theta_start , x_goal , y_goal , theta_goal )
124126
125127
126128if __name__ == '__main__' :
0 commit comments