ROS官网有一个叫robot_pose_ekf的包,是专门处理传感器融合的包,具体介绍:http://wiki.ros.org/robot_pose_ekf

其中主要功能是订阅主题包括odom(里程计)、imu_data(姿态传感器)、vo(视觉里程计)输入,三者或是其中两者融合后,输出合成的里程计主题odom_combined并发布出去。第二是提供一个TF变化。

配置文件如下和注释如下:

<launch>
<node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
<param name="output_frame" value="odom_combined"/> #表示输出的主题:odom_combined
<param name="freq" value="30.0"/> #表示发布主题的频率 30hz
<param name="sensor_timeout" value="1.0"/> #表示超时时间,1.0表示1秒,如果1秒内没有传感器输入,会报错。
<param name="odom_used" value="true"/> #表示里程计使能
<param name="imu_used" value="true"/> #表示imu使能
<param name="vo_used" value="false"/> #视觉里程计
<param name="debug" value="true"/>
<param name="self_diagnose" value="false"/>
</node>
</launch> odom (nav_msgs/Odometry)
imu_data (sensor_msgs/Imu)
vo (nav_msgs/Odometry) 其中imu发布函数为
sensor_msgs::Imu imu;
imu.header.stamp = measurement_time;
imu.header.frame_id = imu_frame_id;
quaternionTFToMsg(differential_rotation, imu.orientation);
// i do not know the orientation covariance
imu.orientation_covariance[0] = 1000000;
imu.orientation_covariance[1] = 0;
imu.orientation_covariance[2] = 0;
imu.orientation_covariance[3] = 0;
imu.orientation_covariance[4] = 1000000;
imu.orientation_covariance[5] = 0;
imu.orientation_covariance[6] = 0;
imu.orientation_covariance[7] = 0;
imu.orientation_covariance[8] = 0.000001;
// angular velocity is not provided
// imu.angular_velocity_covariance[0] = 10000000; imu.angular_velocity.x = 0.0;
imu.angular_velocity.y = 0.0;
imu.angular_velocity.z = (double)-1*(angleRate*3.14/(180*100)); imu.linear_acceleration.x = (double)(-1*((acc_x+10) * 9.80665/1000.f));
imu.linear_acceleration.y = (double)(-1*((acc_y+24) * 9.80665/1000.f));
imu.linear_acceleration.z = (double)(-1*((acc_z-1070) * 9.80665/1000.f)); // imu.linear_acceleration_covariance[0] = -1 ;
imu_pub.publish(imu); 其中TF变换:odom_combinedbase_footprint
static tf::TransformBroadcaster br;
tf::Transform transform;
transform.setRotation(differential_rotation);
br.sendTransform(tf::StampedTransform(transform, measurement_time, tf_parent_frame_id, tf_frame_id));
加入TF树:
<node pkg="tf" type="static_transform_publisher" name="imu_broadcaster" args="0 0 0 0 0 0 base_footprint imu_base 100" respawn="true" />
												

ROS融合IMU笔记的更多相关文章

  1. SLAM+语音机器人DIY系列:(三)感知与大脑——2.带自校准九轴数据融合IMU惯性传感器

    摘要 在我的想象中机器人首先应该能自由的走来走去,然后应该能流利的与主人对话.朝着这个理想,我准备设计一个能自由行走,并且可以与人语音对话的机器人.实现的关键是让机器人能通过传感器感知周围环境,并通过 ...

  2. ROS进阶学习笔记(11)- Turtlebot Navigation and SLAM - ROSMapModify - ROS地图修改

    ROS进阶学习笔记(11)- Turtlebot Navigation and SLAM - 2 - MapModify地图修改 We can use gmapping model to genera ...

  3. python ros 订阅imu数据,实时显示欧拉角

    #!/usr/bin/env python # -*- coding: utf- -*- import rospy import math from sensor_msgs.msg import Im ...

  4. 在多台PC上进行ROS通讯-学习笔记

    首先,致谢易科(ExBot)和ROSWiki中文社区. 重要参考文献: Running ROS across multiple machines http://wiki.ros.org/ROS/Tut ...

  5. pl-svo在ROS下运行笔记

    一.程序更改的思路(参考svo_ros的做法): 1.在ROS下将pl-svo链接成库需要更改相应的CMakeLists.txt文件,添加package.xml文件: 2.注册一个ROS节点使用svo ...

  6. ROS 进阶学习笔记(13) - Combine Subscriber and Publisher in Python, ROS

    Combine Subscriber and Publisher in Python, ROS This article will describe an example of Combining S ...

  7. ROS 进阶学习笔记(12) - Communication with ROS through USART Serial Port

    Communication with ROS through USART Serial Port We always need to communicate with ROS through seri ...

  8. ROS进阶学习笔记(11)- Turtlebot Navigation and SLAM

    (写在前面: 这里参考rbx书中第八章和ROS社区教程进行学习,先看社区教程) ===  Doing the Turtlebot Navigation   === ref ros wiki: http ...

  9. ROS进阶学习笔记(10)- 搭建自己的Turtlebot(5) - Interactive Makers

    用interactive_makers控制Turtlebot移动 interactive_makers 是Willow Garage公司开发的一个虚拟控制工具,可通过鼠标在虚拟环境中的操作,完成实际机 ...

随机推荐

  1. python基础之Matplotlib库的使用一(平面图)

    在我们过去的几篇博客中,说到了Numpy的使用,我们可以生成一些数据了,下面我们来看看怎么让这些数据呈现在图画上,让我们更加直观的来分析数据. 安装过程我就不再说了,不会安装的,回去补补python最 ...

  2. IntelliJ IDEA2018激活码

    使用前提: 在hosts文件里面添加一行,hosts文件在Windows系统中的路径:C:\Windows\System32\drivers\etc\,Linux系统存放在/etc目录下. 0.0.0 ...

  3. MySQL 8.0.18安装教程(windows 64位)

    目录 1-先去官网下载点击的MySQL的下载​ 2-配置初始化的my.ini文件的文件3-初始化MySQL4-安装MySQL服务 + 启动MySQL 服务5-连接MySQL + 修改密码 * 第一项 ...

  4. js实现复制功能兼容ios

    html: <div id="copyBT">这是要复制的1内容</div> <a id="contentas">这是复制按 ...

  5. 关于创建node服务

    1.环境条件准备: A.确定node已经创建 B.npm或cnpm已经下载,npm和cnpm其实是一个道理 C.mysql或者使用其他数据库已经安装(本例使用mysql) 2.开始创建,首先新建一个文 ...

  6. SAP MM Purchase Order History Category

    SAP MM Purchase Order History Category 1) ,These are different categories of PO history which is con ...

  7. 利用Injecttion优化编辑的速度,你不是缺一台性能优化的电脑而是缺一个快速编译的工具~

    请前往如下的链接查看优化编译速度: https://www.jianshu.com/p/b2a2f15a3283

  8. Android Studio Gradle被墙bug总结

    1 Unknown host 'd29vzk4ow07wi7.cloudfront.net'. You may need to adjust the proxy settings in Gradle ...

  9. python中lambda

    lambda_expr ::= "lambda" [parameter_list]: expression python中lambda可以理解为一个匿名函数,它的要求是函数的运算部 ...

  10. CentOS6.7安装Oracle数据库