ROS::多话题消息同步

更新时间:2023-06-27 18:54:09 阅读: 评论:0

ROS::多话题消息同步
ROS::多话题消息同步
#include<ros/ros.h>
什么是域名
#include"nsor_msgs/LarScan.h"
#include"geometry_msgs/PoWithCovarianceStamped.h"
#include<message_filters/subscriber.h>
#include<message_filters/synchronizer.h>
#include<message_filters/sync_policies/approximate_time.h>
#include<message_filters/time_synchronizer.h>
#include<boost/thread/thread.hpp>
#include<iostream>
渴望爱
void multi_callback(const nsor_msgs::LarScanConstPtr& scan,const geometry_msgs::PoWithCovarianceStampedConstPtr& po)
{
std::cout <<"同步完成!"<< std::endl;
}
int main(int argc,char** argv)
{
多彩的校园生活
电子邮件股票买入卖出口诀ros::init(argc, argv,"multi_receiver");
ros::NodeHandle n;
message_filters::Subscriber<nsor_msgs::LarScan>subscriber_lar(n,"scan",1000,ros::TransportHints().tcpNoDelay());
message_filters::Subscriber<geometry_msgs::PoWithCovarianceStamped>subscriber_po(n,"car_po",1000,ros::TransportHints().tcpNoDelay());
typedef message_filters::sync_policies::ApproximateTime<nsor_msgs::LarScan, geometry_msgs::PoWithCovarianceStamped> syncPolicy;
//message_filters::TimeSynchronizer<nsor_msgs::LarScan,geometry_msgs::PoWithCovarianceStamped> sync(subscriber_lar, subscriber_pos e, 10);
message_filters::Synchronizer<syncPolicy>sync(syncPolicy(10), subscriber_lar, subscriber_po);
送人情
std::cout <<"hahah"<< std::endl;
ros::spin();
彪形大汉
return0;
}
>什么牌子的粉底液好

本文发布于:2023-06-27 18:54:09,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1053257.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:股票   口诀   卖出   买入   话题   粉底液   消息   牌子
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图