资源简介
ROS:实现串口解析GPS协议,并发布到话题(以GPFPD为例)
ROS:实现串口解析GPS协议,并发布到话题(以GPFPD为例)
积分不够私信我

代码片段和文件信息
#include “ros/ros.h“
#include “gps/gps.h“
#include
void gpsCallback(const gps::gps::ConstPtr &msg)
{
ROS_INFO(“Header:%s“msg->Header.c_str());
ROS_INFO(“GPSWeek:%s“msg->GPSWeek.c_str());
ROS_INFO(“GPSTime:%s“msg->GPSTime.c_str());
ROS_INFO(“Heading:%s“msg->Heading.c_str());
ROS_INFO(“Pitch:%s“msg->Pitch.c_str());
ROS_INFO(“Roll:%s“msg->Roll.c_str());
ROS_INFO(“Lattitude:%s“msg->Lattitude.c_str());
ROS_INFO(“Longitude:%s“msg->Longitude.c_str());
ROS_INFO(“Altitude:%s“msg->Altitude.c_str());
ROS_INFO(“Ve:%s“msg->Ve.c_str());
ROS_INFO(“Vn:%s“msg->Vn.c_str());
ROS_INFO(“Vu:%s“msg->Vu.c_str());
ROS_INFO(“baseline:%s“msg->baseline.c_str());
ROS_INFO(“NSV1:%s“msg->NSV1.c_str());
ROS_INFO(“NSV2:%s“msg->NSV2.c_str());
ROS_INFO(“Status:%s“msg->Status.c_str());
ROS_INFO(“Cs:%s“msg->Cs.c_str());
ROS_INFO(“CrLf:%s“msg->CrLf.c_str());
}
int main(int argc char **argv)
{
ros::init(argc argv “listener“); //
ros::NodeHandle n; //
ros::Subscriber sub = n.subscribe(“gps_info“ 1 gpsCallback); //创建subscriber
ros::spin(); //反复调用当前可触发的回调函数,阻塞
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-10-14 10:03 gps\
文件 7432 2019-10-14 10:03 gps\CMakeLists.txt
目录 0 2019-10-14 10:04 gps\include\
目录 0 2019-10-26 09:38 gps\include\gps\
目录 0 2019-10-09 05:43 gps\msg\
文件 240 2019-10-09 05:43 gps\msg\gps.msg
文件 3022 2019-10-14 10:03 gps\package.xm
目录 0 2019-10-14 10:07 gps\src\
文件 1194 2019-10-14 10:07 gps\src\listener.cpp
文件 8794 2019-10-15 02:59 gps\src\talker.cpp
- 上一篇:Flash兔子跳铃铛
- 下一篇:卡尔曼在高度估计中的应用
相关资源
- Rational Rose Common破解文件
- 武汉大学 科傻GPS 静态后处理软件
- 开源的nmealib
- Microsoft基本类库 (MFC)(C 库)
- 相干与非相干实现捕获与跟踪GPS
- 天文钟GPS对时程序
- 软件工程课程设计【网上选课系统】
- MikroTik RouterOS密码破解 mtpass.exe
- 机器人操作系统ROS2
- wifi电路调试经验之谈
- Oxford Industries 采用 Microsoft.NET 平台实
- IBM CAW for Microsoft Cluster Server 简介
- IBM.Rational.Rose.Enterprise的license.upd
- Symantec AntiVirus for Microsoft SharePoint产品
- 用切比雪夫多项式标准化GPS卫星轨道
- 起算点点位不同对GPS-RTK测高的影响
- GPS-RTK技术在公婆泉矿区详查中的应用
- Microservice patterns
- Microsoft Visio 2013 Professional 64位简体中
- Microsoft Project 2016
-
A web-ba
sed interview platform with geospat - 根据GPS数据计算航向公式
- Excel在GPS坐标转换计算中的应用
- 含Microsoft.Office.Interop.Owc11
- The Existence and Stability of Nontrivial St
- DS4000存储系统上Microsoft Exchange 2003的存
- Microsoft Visual Studio 2017 Installer Project
- 通过 Microsoft Services for UNIX 将 UNIX 应用
- Microsoft Windows Services for UNIX 3.5 版中的
- Ross-Konno手术后左心室流出道梗阻
评论
共有 条评论