Turtle2 keeps translating in the x-axis forever

When I try publishing a fixed frame referred to the iRobot (/turtle2 frame) that is translated by (1.0,0,3.0), the iRobot keeps moving in the x-axis infinitely. What could be the reason?

We might need more info but, in the exercises we use that tf to make the IRobot move. If you don’t change the TF published he thinks he is not arriving to the place and therefore continues moving. Please specify the exercise number and more details like that to be sure the people answer your question :wink:

Exercise 2.4 part 1.


And the broadcaster would be similar to this code right?

Ok understood, so in this exercises what you are doing is publishing always the same TF, and therefore the robot will move indefinitely . In the Next exercises you publish the TF of other element or even of the other moving turtle.

1 Like

But in this case, turtle2 stops at y=2.

Whereas in this case, it keeps moving in the x axis.


Here also it should stop at x=1.

Let me know if I’m missunderstanding but as far as I interpret your question, the transforms dont mean that. A tranform from turtle1 to fixed carrot, is not saying that the position of the carrot is in the worlds cordinates, but referred to the turtle1. This means that these transforms are only to trigger a movement in a certain direction but because the TF doesnt change, it wont stop. Please let me know if it was cleared up or you have some doubts. Will be glad to make examples or some minitutorial.

I am sorry but I did not understand clearly. Could you please explain using examples as you mentioned?
Thank you so much.

Going to your original question at the top, when you published the transform (1.0, 0, 3.0) from /turtle1 frame, this means that the fixed_carrot is located 1 meter to the front of the iRobot (x axis) and 3 meters up (z axis). This is indicating that the fixed_carrot is going to be always at that position, related to the iRobot. The key point here is the frame you are indicating the relation. Since you specified the frame /turtle1 that means that you are indicating a position from that frame. The frame /turtle1 is the center of the robot. So, if the robot moves, the center of the robot also moves, so the position of the carrot also moves in order to always maintain the relation you have specified with the static transform

You mean transform (1,0,3) from /turtle2 right as given in the question? You wrote /turtle1.

Sorry yes. I meant /turtle2 as indicated in the exercise.
Does the explanation make sense?