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

Should you use ros::Subscribe or message_filters::Subscribe ?

asked 2022-05-03 03:56:45 -0600

tomkimsour gravatar image

As I was browsing different github repositories I came accross these two type of way to write a node in ros. Why do people use these two and which one is preferable ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2022-05-05 09:56:49 -0600

Alex-SSoM gravatar image

ros::Subscribe is the standard way to subscribe to a topic.

message_filters::Subscribe can be used when you need to sync two or more topics. For example an RGB and a Depth image from a Kinect like camera. You can use ApproxSync or ExactSync depending on your specific application.

edit flag offensive delete link more
1

answered 2022-05-04 03:08:40 -0600

Petros ADLATUS gravatar image

Hello,

did you read the entries to the specific documentation for both (http://wiki.ros.org/message_filters and http://wiki.ros.org/ROS/Tutorials/Wri...). I mean for my understanding you can use both and it's fine.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-05-03 03:56:45 -0600

Seen: 141 times

Last updated: May 05 '22