Ask Your Question
1

turtle_tf_demo.launch goes wrong when replaced with c++ compiled nodes

asked 2012-10-12 19:15:07 -0500

Albert K gravatar image

I tried to run the TF tutorial and fist launch:

roslaunch turtle_tf turtle_tf_demo.launch

and it worked fine.

And then I noticed that the launch file would run nodes written in python. So I replaced them with the C++ ones and launched it again. However, turtle2 got frantic....

https://www.dropbox.com/s/mw2ds061oprzgx0/TF_problem

I've checked the C++ code of the broadcaster and listener in turtle_tf, as long as the Python ones. In terms of their functionality, there weren't any difference between the C++ and Python ones, but the demo results turned out to be a lot different.

How can I solve this problem? Thanks~

edit retag flag offensive close merge delete

Comments

Can you post the launch file you edited?

Po-Jen Lai gravatar imagePo-Jen Lai ( 2012-11-08 01:34:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-11-09 03:10:53 -0500

tbh gravatar image

@Tones answered this same issue over at this question.

Basically, the API appears to have changed in the tf::Quaternion constructor with RPY as parameters to YPR as parameters. So the broadcaster is broadcasting the wrong rotation in its transform.

You shouldn't use that constructor anymore, though, as it's been deprecated. Use something else from the API to set your rotation, and make sure the order is right, and it should work fine.

edit flag offensive delete link more

Comments

Thanks. It looks exactly the same problem. I'll try it.

Albert K gravatar imageAlbert K ( 2012-11-12 18:25:32 -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

Stats

Asked: 2012-10-12 19:15:07 -0500

Seen: 244 times

Last updated: Nov 09 '12