From 000ecdb119afa29ab864b14c13a72b3f7a87f2f9 Mon Sep 17 00:00:00 2001 From: thirgy4 <thirgy4@googlemail.com> Date: Wed, 13 Oct 2021 19:22:40 +0100 Subject: [PATCH] Forgot to add the teleporting turtle --- labs/catkin_ws/src/l2e4/teleport_turtle3.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 labs/catkin_ws/src/l2e4/teleport_turtle3.py diff --git a/labs/catkin_ws/src/l2e4/teleport_turtle3.py b/labs/catkin_ws/src/l2e4/teleport_turtle3.py new file mode 100644 index 0000000..5d90683 --- /dev/null +++ b/labs/catkin_ws/src/l2e4/teleport_turtle3.py @@ -0,0 +1,7 @@ +from turtlesim.srv import TeleportAbsolute, Spawn + +spawn_client = rospy.ServiceProxy('/spawn', Spawn) +spawn_client(x_pos, y_pos, theta, "turtle3") + +teleport_client = rospy.ServiceProxy('/turtle3/teleport_absolute', TeleportAbsolute) +teleport_client(x_pos, y_pos, theta) \ No newline at end of file -- GitLab