ros

How do I map a non-binary Occupancy Grid with several values to a cost map in ROS?

孤者浪人 提交于 2020-06-15 07:09:01
问题 I'm looking for a way to map a non-binary occupancy grid to a global cost map. The occupancy grid has the values -1 for undefined, 0 for non-collision and 1-100 for collision areas. There is a similar question here for which the given answer doesn't offer a concrete solution: https://answers.ros.org/question/335530/what-range-of-costs-does-ros-navigation-support/ For a better overview: I'm using ROS Melodic. My occupancy grid looks like this: Image of Occupancy grid My global_costmap_params

How do I map a non-binary Occupancy Grid with several values to a cost map in ROS?

前提是你 提交于 2020-06-15 07:08:51
问题 I'm looking for a way to map a non-binary occupancy grid to a global cost map. The occupancy grid has the values -1 for undefined, 0 for non-collision and 1-100 for collision areas. There is a similar question here for which the given answer doesn't offer a concrete solution: https://answers.ros.org/question/335530/what-range-of-costs-does-ros-navigation-support/ For a better overview: I'm using ROS Melodic. My occupancy grid looks like this: Image of Occupancy grid My global_costmap_params

How to include ROS message filter in c++ project

懵懂的女人 提交于 2020-06-13 09:37:12
问题 I want to use the ROS message filter code (http://wiki.ros.org/message_filters) in a C++ project I have but I am pretty new to C++ and am confused how exactly to install and include this into my C++ project. Any help would be greatly appreciated. 回答1: Since you're 'new to C++`, I'll take it from the top, & assume new to cmake as well. cd ~/path_to/catkin_ws catkin_create_pkg my_new_pkg roscpp cd my_new_pkg sudo apt-get install ros-[version]-message-filters In package.xml , clean it up and add

How to include ROS message filter in c++ project

帅比萌擦擦* 提交于 2020-06-13 09:37:10
问题 I want to use the ROS message filter code (http://wiki.ros.org/message_filters) in a C++ project I have but I am pretty new to C++ and am confused how exactly to install and include this into my C++ project. Any help would be greatly appreciated. 回答1: Since you're 'new to C++`, I'll take it from the top, & assume new to cmake as well. cd ~/path_to/catkin_ws catkin_create_pkg my_new_pkg roscpp cd my_new_pkg sudo apt-get install ros-[version]-message-filters In package.xml , clean it up and add

gazebo&ROS URDF 名词解释

旧街凉风 提交于 2020-05-09 10:33:08
连杆(link)标签的属性,参考书籍P416 <link name=” base”/> <joint name="fixed" type="fixed"> <parent link="base"/> <child link="link1"/> </joint> <link name="link1"> <collision> <origin xyz="0 0 0.25" rpy="0 0 0"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> </collision> <visual> <origin xyz="0 0 0.25" rpy="0 0 0"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> <material name="black"/> </visual> <inertial> <origin xyz="0 0 0.25" rpy="0 0 0"/> <mass value="1"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> </link> <link33>: 连杆的可视化、碰撞和惯性信息设置 <collision>:

SLAM+语音机器人DIY系列:(五)树莓派3开发环境搭建——1.安装系统ubuntu_mate_16.04

爷,独闯天下 提交于 2020-05-06 03:40:17
摘要 通过前面一系列的铺垫,相信大家对整个miiboo机器人的DIY有了一个清晰整体的认识。接下来就正式进入 机器人大脑 (嵌入式主板:树莓派3)的开发。本章将从 树莓派3 的开发环境搭建入手,为后续ros开发、slam导航及语音交互算法做准备。本章内容: 1.安装系统ubuntu_mate_16.04 2.安装ros-kinetic 3.装机后一些实用软件安装和系统设置 4.PC端与robot端ROS网络通信 5.Android手机端与robot端ROS网络通信 6.树莓派USB与tty串口号绑定 7.开机自启动ROS节点 1.安装系统ubuntu_mate_16.04 安装前先准备好需要用到的材料,在树莓派 3 上安装 ubuntu_mate_16.04 需要用到的工具和材料,如图 1 。 (图 1 )材料准备 1.1. 格式化 microSD 卡 在向 microSD 卡烧入系统之前,需要先格式化好 microSD 卡。我这里使用 DiskGenius 工具将卡格式化为 FAT32 文件系统。 DiskGenius 下载地址: http://www.diskgenius.cn/download.php 1.2. 下载 ubuntu-mate-16.04 系统镜像 直接前往 ubuntu-mate 的官网 https://ubuntu-mate.org/download/

Ethzasl MSF源码阅读(2):百川汇海

笑着哭i 提交于 2020-05-05 23:28:47
这里有个感觉,就是百川汇海。即IMU数据和相机的消息数据都汇集到msf_core进行处理。接上一篇, 1. 查看IMUHandler_ROS::IMUCallback和IMUHandler_ROS::StateCallback回调函数。 MUHandler_ROS::IMUCallback,传入的消息sensor_msgs::ImuConstPtr。 1 void IMUCallback( const sensor_msgs::ImuConstPtr & msg) 2 { 3 static int lastseq = constants::INVALID_SEQUENCE; 4 if (static_cast< int >(msg->header.seq) != lastseq + 1 5 && lastseq != constants::INVALID_SEQUENCE) { 6 MSF_WARN_STREAM( 7 " msf_core: imu message drop curr seq: " << msg-> header.seq 8 << " expected: " << lastseq + 1 ); 9 } 10 lastseq = msg-> header.seq; 11 12 msf_core::Vector3 linacc; 13 linacc << msg-

Ethzasl MSF源码阅读(1):程序入口和主题订阅

折月煮酒 提交于 2020-05-05 23:23:03
关于IMU融合知乎上的一篇问答: 有哪些开源项目是关于单目+imu做slam的? Ethz的Stephen Weiss的工作,是一个IMU松耦合的方法。 1.程序入口:ethzasl_msf\msf_updates\src\pose_msf\main.cpp 1 #include " pose_sensormanager.h " 2 3 int main( int argc, char ** argv) 4 { 5 ros::init(argc, argv, " msf_pose_sensor " ); 6 msf_pose_sensor::PoseSensorManager manager; 7 ros::spin(); 8 return 0 ; 9 } PoseSensorManager类,查看构造函数。PoseSensorManager继承自msf_core::MSF_SensorManagerROS,继承自msf_core::MSF_SensorManager<EKFState_T> 1 PoseSensorManager(ros::NodeHandle pnh = ros::NodeHandle( " ~/pose_sensor " )) 2 { 3 bool distortmeas = false ; // < Distort the pose measurements

踩坑rosbag --clock(上、下集)

不羁的心 提交于 2020-05-05 18:39:59
上集 将rosbag的数据feed给lego-loam,输出地图。另外写了一个滤波节点,订阅地图,进行滤波操作,再发布出来。 由于输入给lego-loam的数据来自于rosbag,所以需要rosbag提供时间信息。 rosbag play --clock recorded1.bag 由于rosbag的数据发布频率比较快,导致了一个结果。rosbag播放完毕,时钟停止,滤波节点中缓存了几个数据还没有处理完毕。失去了时钟信息,滤波节点停止运行, 但是没有输出报错信息!!! 个人心得 :滤波节点有两个独立的线程,一个是callback函数线程,一个是main函数线程,进而导致print出来的信息排布混乱。没有花时间整理print出来的信息,也就没能及时发现main函数线程因为缺失了时间信息而停止运行。因此,但凡遇到莫名其妙的bug,即使没有报错信息,首要任务是结合print出来的信息整理代码的逻辑,快速缩小范围再逐步排查原因。 解决方案 1. 最佳 -k, --keep-alive rosbag play -k --clock recorded1.bag bag文件中的数据播放完毕以后,继续提供时间信息。 2. 次佳 -r FACTOR, --rate=FACTOR rosbag play -r 0.1 --clock recorded1.bag 将发布频率降低为原来的10%

lego loam 跑镭神32线激光雷达

我怕爱的太早我们不能终老 提交于 2020-05-05 18:39:40
师弟反应镭神32线激光雷达(32C)录制的数据包不能跑lego loam,这里就总结一下。 首先lego loam默认的接受的topic name是velodyne_points,点云的frame_id是velodyne,镭神驱动发布的topic name为point_raw,frame_id为world这里需要写一个程序转一下: #include " ros/ros.h " #include " std_msgs/String.h " #include " sensor_msgs/PointCloud2.h " #include < string > #include <sstream> /* * * This tutorial demonstrates simple sending of messages over the ROS system. */ static ros::Publisher g_scan_pub; static void main_topic_callback( const sensor_msgs::PointCloud2::ConstPtr& input) { sensor_msgs::PointCloud2 msg = * input; msg.header.frame_id = " velodyne " ; g_scan_pub.publish