We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rmoss_cam 中CamClient 对ROS消息进行了进行了封装,只暴露如下接口:
rmoss_cam
CamClient
typedef std::function<void (const cv::Mat &, const rclcpp::Time &)> Callback; virtual bool connect(const std::string & camera_name, Callback cb);
这种隐藏ROS层细节能够使开发者专心于图像开发,而不用关心ROS消息处理过程,但是这样导致无法使用Message Filter中消息同步等工具,而消息同步在某些RM场景中可能十分有用,比如RM中的相机和IMU的同步。
方案一:扩展CamClient 类,适配message_filters接口,只需要继承message_filters::SimpleFilter即可 (可实现类似message_filters::Subscriber的效果),然后使用message_filters::TimeSynchronizer 即可。
message_filters::SimpleFilter
message_filters::Subscriber
message_filters::TimeSynchronizer
方案二:针对特定场景封装特定消息同步类,无需扩展CamClient ,而是另起炉灶,如创建CamImuSyncClient,内部集成message_filters::TimeSynchronizer 等方法实现特定消息同步.
CamImuSyncClient
The text was updated successfully, but these errors were encountered:
消息同步不建议直接使用ros的message_filters,使用buffer自行处理会更加灵活。在rmoss设计模式中,ROS2主要作为消息通讯的中间件,topic数据的读取尽可能保持原生形式,并采用自己的算法进行同步等处理,不依赖于ROS。
Sorry, something went wrong.
No branches or pull requests
Feature request
Feature description
rmoss_cam
中CamClient
对ROS消息进行了进行了封装,只暴露如下接口:这种隐藏ROS层细节能够使开发者专心于图像开发,而不用关心ROS消息处理过程,但是这样导致无法使用Message Filter中消息同步等工具,而消息同步在某些RM场景中可能十分有用,比如RM中的相机和IMU的同步。
Implementation considerations
方案一:扩展
CamClient
类,适配message_filters接口,只需要继承message_filters::SimpleFilter
即可 (可实现类似message_filters::Subscriber
的效果),然后使用message_filters::TimeSynchronizer
即可。CamClient
功能,缺点是相比于直接使用message_filters::Subscriber
订阅ROS消息方法,显得多余,容易使开发者产生困惑。方案二:针对特定场景封装特定消息同步类,无需扩展
CamClient
,而是另起炉灶,如创建CamImuSyncClient
,内部集成message_filters::TimeSynchronizer
等方法实现特定消息同步.CamClient
中重复代码。The text was updated successfully, but these errors were encountered: