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

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

Comments

Did anyone solve this issue?

techsid gravatar image techsid  ( 2022-10-25 13:55:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

Comments

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

Question Tools

3 followers

Stats

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

Seen: 311 times

Last updated: Jul 09 '18