当前位置:网站首页>ROS knowledge point - message_filters
ROS knowledge point - message_filters
2022-07-02 17:25:00 【Jerry_ Sea】
Reference resources :
1) Time synchronizer
https://blog.csdn.net/u012700322/article/details/51784412
https://blog.csdn.net/fana8010/article/details/23880067( This article is the original of the previous one )
2) Policy based synchronizer
https://blog.csdn.net/muyiyushan/article/details/118418040( Official translation , The first 7 part )
http://wiki.ros.org/message_filters#Policy-Based_Synchronizer_.5BROS_1.1.2B-.5D( Official website , The first 7 part )
The following is for Reference resources 1) The first article in :
bug1:3.1 Connect
Two sentences are equivalent to one , But why separate it into two sentences ? Because only one sentence can read one input and send it to the callback function , So you need to use two sentences , First, encapsulate multiple data with a separate sentence , Then use one sentence to pass multiple data to the callback function .
boost bind
bug2:4 Time synchronizer
The TimeSynchronizer filter synchronizes incoming channels by the timestamps contained in their headers
PointCloud2ROS Point cloud data message structure :header There's a stamp, Compare different data sources stamp For time synchronization .
The following is for Reference resources 2) Explanation in :
bug3: Yes “ own ” Code understanding
typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::PointCloud2, sensor_msgs::PointCloud2> SyncPolicyT;
// Define strategy ,message_filters::sync_policies::ApproximateTime The strategy uses an adaptive algorithm based on timestamp to match messages , Match two point clouds
void DualLidarCalib::start()
{
// Subscriber sub and pub
parent_cloud_sub_ = new message_filters::Subscriber<sensor_msgs::PointCloud2>(nh_, parent_cloud_topic_, 10);
child_cloud_sub_ = new message_filters::Subscriber<sensor_msgs::PointCloud2>(nh_, child_cloud_topic_, 10);
// Point cloud synchronizer ApproximateTime takes a queue size as its constructor argument, hence MySyncPolicy(100)
cloud_synchronizer_ = new message_filters::Synchronizer<SyncPolicyT>(SyncPolicyT(100), *parent_cloud_sub_, *child_cloud_sub_);
// Call callback function
cloud_synchronizer_->registerCallback(boost::bind(&DualLidarCalib::cloudCallback, this, _1, _2));
//registerCallback() Input is const boost::shared_ptr<M const>&
}
void DualLidarCalib::cloudCallback(const sensor_msgs::PointCloud2::ConstPtr& in_parent_cloud_msg,
const sensor_msgs::PointCloud2::ConstPtr& in_child_cloud_msg)
{
...
}
boost::bind() understand :
1)https://blog.csdn.net/holyjw/article/details/89883363( Just look “1. adopt functions and function pointers Use bind”)
2)https://blog.csdn.net/bj318318/article/details/116200356( Just look “1 Introduce ”)
边栏推荐
- TCP拥塞控制详解 | 2. 背景
- 从收集到输出:盘点那些强大的知识管理工具——优秀笔记软件盘点(四)
- Listing of chaozhuo Aviation Technology Co., Ltd.: raising 900million yuan, with a market value of more than 6billion yuan, becoming the first science and technology innovation board enterprise in Xia
- Leetcode question brushing record | 933_ Recent requests
- traceroute命令讲解
- The difference of message mechanism between MFC and QT
- SAP Commerce Cloud Storefront 框架选型:Accelerator 还是 Spartacus?
- Interpretation of key parameters in MOSFET device manual
- 伟立控股港交所上市:市值5亿港元 为湖北贡献一个IPO
- 使用知行之桥的API端口,提供资源供合作伙伴访问
猜你喜欢
宝宝巴士创业板IPO被终止:曾拟募资18亿 唐光宇控制47%股权
Weili holdings listed on the Hong Kong Stock Exchange: with a market value of HK $500million, it contributed an IPO to Hubei
Fuyuan medicine is listed on the Shanghai Stock Exchange: the market value is 10.5 billion, and Hu Baifan is worth more than 4billion
Goodbye, shucang. Alibaba's data Lake construction strategy is really awesome!
Eth data set download and related problems
2020 "Lenovo Cup" National College programming online Invitational Competition and the third Shanghai University of technology programming competition (a sign in, B sign in, C sign in, D thinking +mst
si446使用记录(一):基本资料获取
Use of openpose
Sword finger offer 25 Merge two sorted linked lists
伟立控股港交所上市:市值5亿港元 为湖北贡献一个IPO
随机推荐
相信自己,这次一把搞定JVM面试
Chapter 3 of hands on deep learning - (1) linear regression is realized from scratch_ Learning thinking and exercise answers
Introduce the scrollintoview() method attribute in detail
Niuke js3 separator
OpenHarmony如何启动FA(本地和远程)
Jiuxian's IPO was terminated: Sequoia and Dongfang Fuhai were shareholders who had planned to raise 1billion yuan
人生的开始
traceroute命令讲解
牛客 JS3 分隔符
Listing of chaozhuo Aviation Technology Co., Ltd.: raising 900million yuan, with a market value of more than 6billion yuan, becoming the first science and technology innovation board enterprise in Xia
Microservice architecture practice: using Jenkins to realize automatic construction
A few lines of code to complete RPC service registration and discovery
13、Darknet YOLO3
871. Minimum refueling times
Sword finger offer 25 Merge two sorted linked lists
Briefly introduce the use of base64encoder
The impact of telecommuting on all aspects of our experience | community essay solicitation
一年頂十年
剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
Exploration of mobile application performance tools