ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

learning_tf turtlesim tutorial: second turtle twirling

asked 2013-01-16 17:50:19 -0500

updated 2013-01-16 18:08:39 -0500

Hi guys,

I have followed the tf tutorials and implemented all the instructions to get the second turtle to follow the first turtle which in turn is controlled via the keyboard, however, when I launch the start_demo.launch, the second turtle starts twirling continuously even without moving the first turtle.

When I move the first turtle, I can see that the second turtle changes its movement slightly while still rotating. I am not sure what the problem is. I have attached an image showing the pdf file created by rosrun tf view_frames and the turtlesim. Heres what I get:

$ rosrun tf view_frames Listening to /tf for 5.000000 seconds Done Listening Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading'="" from="" '="" usr="" lib="" python2.7="" threading.pyc'=""> ignored dot - graphviz version 2.26.3 (20100126.1600)

Detected dot version 2.26.3 Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading'="" from="" '="" usr="" lib="" python2.7="" threading.pyc'=""> ignored frames.pdf generated

Any help would be much appreciated.

regards,

Khalid

image description

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-01-17 02:08:35 -0500

thebyohazard gravatar image

updated 2013-01-17 02:16:09 -0500

This is the same issue as in this question and this question.

The dummy thread stuff is just a python bug that does no harm. Here's the ticket. Supposedly, ubuntu will distribute the fix in the future. There's a patch for it out there if you really want to fix it, though.

edit flag offensive delete link more

Comments

Thanks alot. the problem is fixed now by replacing transform.setRotation( tf::Quaternion(msg->theta,0, 0) ); with transform.setRotation( tf::Quaternion(0, 0, msg->theta) ); in the turtle_tf_broadcaster.cpp

K_Yousif gravatar image K_Yousif  ( 2013-01-17 17:33:04 -0500 )edit
0

answered 2013-01-16 23:28:49 -0500

damjan gravatar image

To me, it looks like you have an error either in the part of the code where you are publishing the transforms (i.e. copying pose data to the tf brodcaster), or (more likely) in the code that is computing turtle2 velocities from received tf data.

Did you copy/paste the tutorial code, or did you type it in by hand?

Btw. please indicate if you are following the C++ or the Python version of the tutorials.

edit flag offensive delete link more

Comments

I am using C++, the problem is fixed now as suggested above. I appreciate your assistance.

K_Yousif gravatar image K_Yousif  ( 2013-01-17 17:34:53 -0500 )edit

Question Tools

Stats

Asked: 2013-01-16 17:50:19 -0500

Seen: 974 times

Last updated: Jan 17 '13