Ask Your Question

message_filters for Array of topic

asked 2018-07-09 05:16:21 -0500

pietrocolombo gravatar image

updated 2018-07-09 06:41:59 -0500

Hi there!

I am wondering if anyone have ever tried to create a vectorised version of the example provided here message_filters (7.3 ApproximateTime Policy).

In short what I am trying to do is to synchronise a list of topics defined in a launch file.

In my current implementation I have a vector of topics (in my case of sensor_msgs::LaserScan type) and currently I have a subscriber function inside e FOR loop, but this seems to me not optimal and it also does not allow me to ensure a synchronisation between the messages coming from the topics.

Thanks! in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-09 07:36:04 -0500

Ridhwanluthra gravatar image

Take a look here. As you can see message filters can take up to 9 topics, so you can just put them all in together.

Also, if you need more you can take a look at chain (8th of the message filter page)

edit flag offensive delete link more


tanks for the replay. But in my case the list of topics is define in a launch file, so I have to make a call-back for every number of topic. I'm looking for make only one call-back for every possibility with a vector as parameter.

pietrocolombo gravatar image pietrocolombo  ( 2018-07-10 04:47:01 -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



Asked: 2018-07-09 05:16:21 -0500

Seen: 119 times

Last updated: Jul 09 '18