octomap(1):octomap_server报错MessageFilter [target=odom_combined ]: Dropped 100.00% of messages so far

"本文讲述了在使用Octomap进行建图时遇到的坐标转换问题,原因在于默认的`odom_combined`帧与tf树无法连接。通过将Octomap坐标系改为激光雷达或定位系统坐标,如修改`<param name="frame_id">`为`velo_link`,解决了这一问题。提供了octomap_mapping.launch文件的调整示例,并给出了相关资源链接。"
摘要由CSDN通过智能技术生成

报错:

[ WARN] [1652516663.964101392]: MessageFilter [target=odom_combined ]: Dropped 100.00% of messages so far. Please turn the [ros.octomap_server.message_filter] rosconsole logger to DEBUG for more information.

报错原因:

        启动octomap建图时,ros系统中的坐标转换(tf,transform frame)不正确,默认的frame_id“odom_combined”(上图箭头处),不能与tf树建立联系。

这里参考了这个进行分析,不过它不针对octomap这个问题:https://blog.csdn.net/just_do_it567/article/details/115673347

解决方法:

        最简单的解决方法就是把octomap的坐标系直接换成激光雷达点云坐标系/其他传感器坐标系,或者定位、slam输出的坐标系,这里改成了kitti数据的坐标系

		<!-- <param name="frame_id" type="string" value="odom_combined" /> 修改坐标系-->
		<param name="frame_id" type="string" value="velo_link" />	

修改后的octomap_mapping.launch文件如下:

<!-- 
  Example launch file for octomap_server mapping: 
  Listens to incoming PointCloud2 data and incrementally builds an octomap. 
  The data is sent out in different representations. 

  Copy this file into your workspace and adjust as needed, see
  www.ros.org/wiki/octomap_server for details  
-->
<launch>
	<node pkg="octomap_server" type="octomap_server_node" name="octomap_server">
		<param name="resolution" value="0.05" />
		
		<!-- fixed map frame (set to 'map' if SLAM or localization running!) -->
		<!-- <param name="frame_id" type="string" value="odom_combined" /> 修改坐标系-->
		<param name="frame_id" type="string" value="velo_link" />	

		<!-- maximum range to integrate (speedup!) 传感器数据半径,可能需要修改,默认为5.0可能有些小-->
		<param name="sensor_model/max_range" value="35.0" />
		
		<!-- data source to integrate (PointCloud2) 输入点云-->
		<remap from="cloud_in" to="/points_ground" />
		<!-- <remap from="cloud_in" to="/points_no_ground" />	 -->
	</node>
</launch>

参考链接:

ros wiki octomap_server:octomap_server - ROS Wiki

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
bool MoveObject::goObject() { //connet to the Server, 5s limit while (!move_base.waitForServer(ros::Duration(5.0))) { ROS_INFO("Waiting for move_base action server..."); } ROS_INFO("Connected to move base server"); /t the targetpose move_base_msgs::MoveBaseGoal goal; goal.target_pose.header.frame_id = "map"; goal.target_pose.header.stamp = ros::Time::now(); // goal.target_pose.pose.position.x = Obj_pose.pose.position.x; // goal.target_pose.pose.position.y = Obj_pose.pose.position.y; // target_odom_point.pose.pose.position.x=goal.target_pose.pose.position.x // target_odom_point.pose.pose.position.y=goal.target_pose.pose.position.y target_odom_point.pose.pose.position.x=Obj_pose.pose.position.x; target_odom_point.pose.pose.position.y=Obj_pose.pose.position.y; cout << goal.target_pose.pose.position.x << endl; cout << goal.target_pose.pose.position.y << endl; //goal.target_pose.pose.orientation = tf::createQuaternionMsgFromYaw(g.response.yaw); goal.target_pose.pose.orientation.z = 0.0; goal.target_pose.pose.orientation.w = 1.0; tf::quaternionMsgToTF(target_odom_point.pose.orientation, quat); tf::Matrix3x3(quat).getRPY(roll, pitch, yaw);//进行转换 yaw +=1.5708;//旋转90 target_odom_point.pose.position.x -=keep_distance*cos(yaw); target_odom_point.pose.position.y -=keep_distance*sin(yaw); goal.target_pose.pose.position.x=target_odom_point.pose.pose.position.x goal.target_pose.pose.position.y=target_odom_point.pose.pose.position.y target_odom_point.pose.orientation = tf::createQuaternionMsgFromYaw(yaw); ROS_INFO("Sending goal"); move_base.sendGoal(goal); move_base.waitForResult(); if (move_base.getState() == actionlib::SimpleClientGoalState::SUCCEEDED) { ROS_INFO("Goal succeeded!"); return true; } else { ROS_INFO("Goal failed"); return false; } }
05-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值