Ask Your Question
0

Something wrong with TF tutorial

asked 2014-04-03 05:18:16 -0500

pinocchio gravatar image

Hi guys, I am learning to use TF on ROS hydro and Ubuntu 12.10, following the tutorial on http://wiki.ros.org/tf/Tutorials/Writ... and http://wiki.ros.org/tf/Tutorials/Writ... . It can be compiled well by using catkin_make, but when launch, some errors occur, and the second turtle does not follow the first. I find some solutions on http://answers.ros.org/question/45884... . However it is for fuerte, and it says that the tutorial has already been fixed for hydro. Could you please give me some suggestions? Many thanks.

Result of catkin_make

rical@rical-CF-19RHRAX1M:~/tf_ws$ catkin_make
Base path: /home/rical/tf_ws
Source space: /home/rical/tf_ws/src
Build space: /home/rical/tf_ws/build
Devel space: /home/rical/tf_ws/devel
Install space: /home/rical/tf_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/rical/tf_ws/build"
####
####
#### Running command: "make -j4 -l4" in "/home/rical/tf_ws/build"
####
Scanning dependencies of target turtle_tf_broadcaster
[ 50%] Built target turtle_tf_listener
[100%] Building CXX object learning_tf/CMakeFiles/turtle_tf_broadcaster.dir/src/turtle_tf_broadcaster.cpp.o
Linking CXX executable /home/rical/tf_ws/devel/lib/learning_tf/turtle_tf_broadcaster
[100%] Built target turtle_tf_broadcaster

Result of roslaunch

rical@rical-CF-19RHRAX1M:~/tf_ws$ roslaunch learning_tf start_demo.launch
... logging to /home/rical/.ros/log/6972d1aa-bb3e-11e3-9b8c-58946b7e05e0/roslaunch-rical-CF-19RHRAX1M-3943.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://rical-CF-19RHRAX1M:40439/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /scale_angular
 * /scale_linear

NODES
  /
    listener (learning_tf/turtle_tf_listener)
    sim (turtlesim/turtlesim_node)
    teleop (turtlesim/turtle_teleop_key)
    turtle1_tf_broadcaster (learning_tf/turtle_tf_broadcaster)
    turtle2_tf_broadcaster (learning_tf/turtle_tf_broadcaster)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[sim-1]: started with pid [3961]
process[teleop-2]: started with pid [3964]
Reading from keyboard
---------------------------
Use arrow keys to move the turtle.
process[turtle1_tf_broadcaster-3]: started with pid [3991]
process[turtle2_tf_broadcaster-4]: started with pid [4018]
process[listener-5]: started with pid [4029]
[ERROR] [1396537658.018576492]: "turtle2" passed to lookupTransform argument target_frame does not exist. 
[ERROR] [1396537658.118410208]: "turtle2" passed to lookupTransform argument target_frame does not exist. 
[ERROR] [1396537658.218442276]: "turtle2" passed to lookupTransform argument target_frame does not exist. 
[ERROR] [1396537658.318519743]: "turtle2" passed to lookupTransform argument target_frame does not exist. 
[ERROR] [1396537658.418561966]: "turtle2" passed to lookupTransform argument target_frame does not exist.
edit retag flag offensive close merge delete

Comments

I can control the first turtle with keyboard, but the second one does not follow the first.

pinocchio gravatar image pinocchio  ( 2014-04-03 05:19:20 -0500 )edit

What is happening to the second one? Is it not moving at all, or not moving correclty?

demmeln gravatar image demmeln  ( 2014-04-03 05:32:37 -0500 )edit

Maybe the tutorial is not fixed after all. Please review the suggested solutions in the old question about fuerte that you linked to, and check if they might still apply here.

demmeln gravatar image demmeln  ( 2014-04-03 05:33:20 -0500 )edit

Hi, @demmeln, The second turtle just goes straightly from one side of window to the other, and then back. I am afraid the old question is just for fuerte, because I follow its suggestion but nothing changes.

pinocchio gravatar image pinocchio  ( 2014-04-03 08:55:54 -0500 )edit

Actually, I faced the same problem that the turtle kept going straightly and figured it out just now. Change "q.setRPY(msg->theta, 0, 0)" to "q.setRPY(0, 0, msg->theta)", and re-catkin_make. This a little different from Fuerte, which is in the transform.setRotation Function.

Jack Fu gravatar image Jack Fu  ( 2014-04-16 22:40:15 -0500 )edit

Could you please update the tutorial accirdingly?

demmeln gravatar image demmeln  ( 2014-04-17 03:42:39 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-08-13 21:06:52 -0500

PaulBouchier gravatar image

It has been updated.

edit flag offensive delete link more

Comments

Still did not work for indigo. anotherTim's fix worked though. (adding waitForTransform; see below)

Marcel Usai gravatar image Marcel Usai  ( 2016-01-13 04:56:47 -0500 )edit
0

answered 2014-04-03 16:43:53 -0500

Hi,I meet the same wrong with you.if you have solved the problem,can you tell me how to do for it? Thank you very much !My Email :workby15@126.com.I am waiting for your answer my friend!

edit flag offensive delete link more

Comments

This is not a chat. Your "answer" does not answer the question. Either use the comment feature or open a sperate question. And please don't ask for personal email advice, but rather check back here to see if progress has been made.

demmeln gravatar image demmeln  ( 2014-04-04 01:07:22 -0500 )edit
3

i am sorry very much for this. I have fixed out this problem.you can add this code [-----listener.waitForTransform("/turtle2", "/turtle1", ros::Time(0), ros::Duration(3.0));----] above your lookupTransform function.it will be all right~

anotherTim gravatar image anotherTim  ( 2014-04-04 03:04:52 -0500 )edit
2

Now this on the other hand does answer the question, so it would be best to edit your original answer above to include what you have found out so others find it easily. Thanks ;-)

demmeln gravatar image demmeln  ( 2014-04-04 04:05:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-04-03 05:18:16 -0500

Seen: 2,412 times

Last updated: Apr 03 '14