ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How can I sync massages from two different topics?

asked 2017-02-22 21:36:05 -0600

rose1360 gravatar image

Hi, I am working with Baxter robot and I am trying to synchronize robot_joints which is running in first terminal,and endpoint_state which is running in the second terminal. In other word, I want to see in special end-effector position, what are the relevant joints angles. I can see them separately in two terminals but I dont know how can I see all of them synced together?

Thanks, Rose

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-23 04:58:44 -0600

TTDM gravatar image

updated 2017-02-23 05:03:58 -0600

One solution is to create a node which read both messages and use message filter to extract simultanious messages or at least message with close time stamps ( depending on your filtering options ).

You can then simply use the node to print thoses 2 messages next to each others.

As a personnal note I must say that despite this solution being what should be use to solve your issue, i had troubles using it because it dropped way too many messages. At least one of my collegues told me that he doesn't think highly of this feature too. Depending on the reactions about this note in the comments, i might erase it. Also, by chance, if someone had a dropped message issue ( even with the approximate time option ) and managed to solve it, I can instead add his comments to this answer.

edit flag offensive delete link more


I think the note about the msg filters is fair: it's not a magic solution, and will depend on the time sources and how you use them in your publishers. It basically just looks at the timestamps and if two timestamps match (according to the configured policy) it passes on the msgs.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-23 05:36:02 -0600 )edit

Have you tried experimenting with the buffer length (ie: queue_size)?

gvdhoorn gravatar image gvdhoorn  ( 2017-02-23 05:39:33 -0600 )edit

I did but I couldn't reach satisfactory results. Anyway,it was just a refinment for me and I finally ignore this synchronisation matter.

TTDM gravatar image TTDM  ( 2017-02-23 06:13:07 -0600 )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



Asked: 2017-02-22 21:36:05 -0600

Seen: 114 times

Last updated: Feb 23 '17