How do multiple turtles go to their own goal using input function?

asked 2020-11-24 12:57:41 -0500

elnazshe gravatar image

Hello everyone, I have used "go to goal" tutorial link text and i reused this code for 5 turtle and just have changed node,publisher and subscriber name (e.g turtle1,turtle2,...) and i have 4 C++ node for spawning them. I am using .launch file to run them but i am getting trouble because of using input() function in my python code for moving each of turtles to their own goal. Everything is fine when I define goals in my code for each one of them (e.g goal_pose.x = 1) but when I use goal_pose.x = float(input("Set your x goal: ")),it's not working. Could someone help me with this?

edit retag flag offensive close merge delete