I’ve created a broadcaster for the “fixed” carrot. Since it is always ahead of robot 2, I assumed it would cause the robot to “chase” it endlessly. I start both the original broadcaster (with the 2 robots and the coke can) and my fixed carrot broadcaster. I can see the fixed_carrot tf in RVIZ, so I know the publisher is working. However, when I do rosrun tf tf_echo , I do see the expected transform, but I also get an error message initially:
Exception thrown:“fixed_carrot” passed to lookupTransform argument source_frame does not exist.
The current list of frames is:
Frame turtle1 exists with parent world.
Frame turtle2 exists with parent world.
Frame coke_can exists with parent world.
When I try to run the tf_listener and pass in fixed_carrot as the frame to be followed, nothing happens - the “try” fails, so no cmd_vel is published for robot2. I’m guessing that has to do with the error I see in tf_echo.
My fixed_carrot publisher is the same as the example, except the values for the br.sendTransform are different to match what’s needed for the exercise.
Any hints?
Thanks,
/K
Just tested the moving_carrot. Same deal - I can see the tf in RVIZ moving as expected around the coke_can, but nothing happens in Gazebo.