SLAM系统中使用ROS系统的学习
我学习的时候主要FAST-LIO为例。
文章目录
1. ROS系统工作空间
ROS系统的工作空间下共有4个目录:
build : 编译空间,存储工作空间编译过程中产生的缓存信息和中间文件
devel: 开发空间,存放编译生成的可执行文件
install: 安装空间,(非必须)可选择安装
src : 代码空间,存放所有ROS功能的源码文件,一个个功能包
1.1 创建不包含任何功能的目录空间
mkdir -p test_ws/src
cd test_ws/src
cd ..
catkin_make
运行上述命令后,ROS工作空间如下:
2. 代码空间内容
下面说明代码空间src目录
的相关内容,也即撰写代码所在位置,也即所有功能包所在位置。
在运行 catkin_make
命令构建ROS软件包前后,代码空间src目录
如下所示:
src
|—功能包1
|—功能包2
|—功能包…
上面是前,下面是后
src
|—功能包1
|—功能包2
|—功能包…
CMakeLists.txt
2.1 空的功能包
一个空的功能包包含 package.xml
和 CMakeLists.txt
两份文件,src
和 include/功能包名
两个目录,分别表示:
include/功能包名 : 空目录,存放辅助程序
src : 空目录,存放主程序
package.xml : 提供功能包元信息(描述功能包,辅助创建ROS空间)
CMakeLists.txt : 记录功能包编译规则
2.1.1 创建空的功能包
cd src
# catkin_create_pkg 功能包名 功能包所需依赖1 功能包所需依赖2 功能包所需依赖3 ...
catkin_create_pkg learn_test std_msgs rospy roscpp
运行上述命令后,代码空间 src
内容如下:
2.2 功能包中文件说明
下面对功能包中的文件进行说明,以FAST-LIO程序为例。感谢开源工作者的分享。
2.2.1 package.xml
文件说明
FAST-LIO程序的 package.xml
文件内容和说明如下:
<?xml version="1.0"?>
<!--package package.xml文件开头-->
<package>
<!--name 软件包的名称 -->
<name>fast_lio</name>
<!--ersion 软件包的版本号 -->
<version>0.0.0</version>
<!--deccription 软件包的描述 -->
<description>
This is a modified version of LOAM which is original algorithm
is described in the following paper:
J. Zhang and S. Singh. LOAM: Lidar Odometry and Mapping in Real-time.
Robotics: Science and Systems Conference (RSS). Berkeley, CA, July 2014.
</description>
<!--maintainer 负责维护软件包的人的信息 -->
<maintainer email="dev@livoxtech.com">claydergc</maintainer>
<!--license 软件包使用的许可证 -->
<license>BSD</license>
<!--url 软件包的网址 -->
<url>https://github.com/hku-mars/FAST_LIO</url>
<!--author 软件包的作者 -->
<author email="zhangji@cmu.edu">Ji Zhang</author>
<!--buildtool_depend 构建软件包时所依赖的构建工具 -->
<buildtool_depend>catkin</buildtool_depend>
<!--build_depend 在构建软件包时需要的依赖关系 -->
<build_depend>geometry_msgs</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>tf</build_depend>
<build_depend>pcl_ros</build_depend>
<!-- livox_ros_driver软件包是fast_lio软件包的依赖,同时也是当前ROS空间内需要构建的软件包 -->
<!-- 这种同一空间下不同软件包的依赖关系需要在package.xml文件中说明 -->
<!-- 执行catkin_make命令在代码空间中生成的CMakeLists.txt文件依赖于package.xml文件内的信息 -->
<build_depend>livox_ros_driver</build_depend>
<build_depend>message_generation</build_depend>
<!--run_depend 在运行软件包时需要的依赖关系 -->
<run_depend>geometry_msgs</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>tf</run_depend>
<run_depend>pcl_ros</run_depend>
<run_depend>livox_ros_driver</run_depend>
<run_depend>message_runtime</run_depend>
<!--test_depend 在运行(部署)软件包测试时需要的依赖关系 -->
<test_depend>rostest</test_depend>
<test_depend>rosbag</test_depend>
<!--export 允许软件包导出特定的配置信息,如插件、启动文件等-->
<export>
</export>
<!--/package package.xml文件结尾-->
</package>
对于同一ROS空间下不同软件包之间的依赖关系需要在package.xml
文件中说明。
2.2.2 launch
文件说明
launch文件
存放在功能包目录下的launch目录
中,下面取FAST-LIO程序中mapping_mid360.launch
文件和LOAM-Livox程序中 rosbag_largescale.launch
文件进行说明,首先是mapping_mid360.launch
文件:
<!--launch launch文件的开头-->
<launch>
<!-- Launch file for Livox MID360 LiDAR -->
<!--arg:argument的简写,表示参数 -->
<!--类似于launch文件内部的局部变量,仅限于launch文件内使用,便于launch文件的重构,与ROS节点内部的实现没有关系 -->
<!--使用方法如下,调用时: $(arg arg-name)-->
<arg name="rviz" default="true" />
<!--rosparam:用来加载yaml文件中的参数 -->
<!--file为所要加载的yaml文件,$(find fast_lio)为指定功能包的路径 src/fast_lio(功能包名) -->
<!--command为所需要执行的操作,load(需要设置为load)表示加载yaml文件中的内容 -->
<!--ns为所加载参数的命名空间,可以不设置,指向common -->
<rosparam command="load" file="$(find fast_lio)/config/mid360.yaml" />
<!--param:parameter的简写,表示参数 -->
<!--是ROS系统运行中的参数,launch文件执行后,加载到参数服务器中 -->
<!--参数由三部分组成:name参数名、type参数类型、value参数值 -->
<!--在launch文件中调用方式为:$(param param-name) -->
<!--在C语言文件中获取方式:nh.param<bool>("feature_extract_enable", p_pre->feature_enabled, false);第三个false为默认值,找不到则赋值为此 -->
<!--在C语言文件中获取方式:std::string param_value; nh.getParam("/my_node/param_name", param_value)); -->
<param name="feature_extract_enable" type="bool" value="0"/>
<param name="point_filter_num" type="int" value="3"/>
<param name="max_iteration" type="int" value="3" />
<param name="filter_size_surf" type="double" value="0.5" />
<param name="filter_size_map" type="double" value="0.5" />
<param name="cube_side_length" type="double" value="1000" />
<param name="runtime_pos_log_enable" type="bool" value="0" />
<!--node:启动ROS节点,是启动文件的核心(非主要参数在后面例子中说明) -->
<!--主要参数由三部分组成:pkg定义节点所在的功能包名称,type定义节点的可执行文件名称,name定义节点运行的名称 -->
<!--tyep参数说明:type参数定义的可执行文件名需要能够在 devel/lib/fast_lio(功能包名) 文件夹下找到 -->
<!--可执行文件的生成指令在CMakeLists.txt文件夹内容: -->
<!--add_executable(fastlio_mapping src/laserMapping.cpp include/ikd-Tree/ikd_Tree.cpp src/preprocess.cpp) -->
<node pkg="fast_lio" type="fastlio_mapping" name="laserMapping" output="screen" />
<!--group用于将多个节点、参数、命名空间放在一起 -->
<!--可以定义命名空间:<group ns="robot1"> -->
<group if="$(arg rviz)">
<!--node:启动ROS节点 -->
<!--launch-prefix用于在启动节点时添加前缀,对节点进行限制或修饰 -->
<!--args为启动节点需要输入的参数 -->
<node launch-prefix="nice" pkg="rviz" type="rviz" name="rviz" args="-d $(find fast_lio)/rviz_cfg/loam_livox.rviz" />
</group>
<!--/launch launch文件的结尾-->
</launch>
接下来是rosbag_largescale.launch
文件:
<launch>
<rosparam command="load" file="$(find loam_livox)/config/performance_precision.yaml" />
<!--$(env HOME)命令可以找到当前环境的home目录,$(env HOME)/Loam_livox=~/Loam_livox -->
<param name="common/pcd_save_dir" type="string" value="$(env HOME)/Loam_livox" />
<param name="common/log_save_dir" type="string" value="$(env HOME)/Loam_livox" />
<param name="common/loop_save_dir" type="string" value="$(env HOME)/Loam_livox" />
<param name="common/if_verbose_screen_printf" type="int" value="1"/>
<param name="feature_extraction/mapping_line_resolution" type="double" value="0.05"/>
<param name="feature_extraction/mapping_plane_resolution" type="double" value="1.2"/>
<node pkg="loam_livox" type="livox_scanRegistration" name="livox_scanRegistration">
<!--将话题重映射,重映射不会影响原话题的存在 -->
<!--重映射只在运行时生效,不会修改节点源代码或修改ROS图形(Graph)中的话题名。-->
<!--原始话题 "/laser_points_0" 仍然存在于ROS系统中,但节点 "livox_scanRegistration" 在运行时连接到 "/livox/lidar"。-->
<remap from="/laser_points_0" to="/livox/lidar" />
</node>
<!--output="screen":将节点的标准输出打印到最终屏幕上,默认输出为日志文件 -->
<!--respawn="true":复位属性,该节点停止时,会自动启动,默认为false(一般用不到) -->
<!--required="true":必要节点,当该节点终止时,launch文件中的其他节点也被终止 -->
<!--ns="namespace":命名空间,对该节点内相对名称添加命名空间前缀 -->
<!--args="arguments":节点需要的输入参数 -->
<node pkg="loam_livox" type="livox_laserMapping" name="livox_laserMapping" output="screen" />
<arg name="rviz" default="true" />
<group if="$(arg rviz)">
<node launch-prefix="nice" pkg="rviz" type="rviz" name="rviz" args="-d $(find loam_livox)/rviz_cfg/rosbag.rviz" />
</group>
</launch>
不同的 launch
文件之间也可以存在调用关系:
<include file="$(find fast_lio)/launch/other.launch"/>
在ROS空间中启动节点=执行某一个(或多个)C语言程序,launch
文件的核心作用就是链接ROS节点和可执行程序,可执行程序生成方式在CMakeLists.txt文件中定义生成,如下:
add_executable(fastlio_mapping src/laserMapping.cpp include/ikd-Tree/ikd_Tree.cpp src/preprocess.cpp)
target_link_libraries(fastlio_mapping ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${PYTHON_LIBRARIES})
target_include_directories(fastlio_mapping PRIVATE ${PYTHON_INCLUDE_DIRS})
最后可执行程序会生成在开发空间devel
目录下devel/lib/fast_lio
最后为功能包名称:
2.2.3 CMakeLists.txt
文件说明
在执行catkin_make
命令后,代码空间src目录
下会生成一个CMakeLists.txt
文件,这个文件的作用是赋值ROS空间的编译,是根据功能包生成的,虽然意义重大,但对于SLAM开发意义不大。
在每个功能包中都会有CMakeLists.txt
文件,下面以FAST-LIO功能包中的CMakeLists.txt
文件为例进行说明:
cmake_minimum_required(VERSION 2.8.3)
project(fast_lio)
SET(CMAKE_BUILD_TYPE "Debug")
ADD_COMPILE_OPTIONS(-std=c++14 )
ADD_COMPILE_OPTIONS(-std=c++14 )
set( CMAKE_CXX_FLAGS "-std=c++14 -O3" )
add_definitions(-DROOT_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/\")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions" )
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread -std=c++0x -std=c++14 -fexceptions")
message("Current CPU archtecture: ${CMAKE_SYSTEM_PROCESSOR}")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" )
include(ProcessorCount)
ProcessorCount(N)
message("Processer number: ${N}")
if(N GREATER 4)
add_definitions(-DMP_EN)
add_definitions(-DMP_PROC_NUM=3)
message("core for MP: 3")
elseif(N GREATER 3)
add_definitions(-DMP_EN)
add_definitions(-DMP_PROC_NUM=2)
message("core for MP: 2")
else()
add_definitions(-DMP_PROC_NUM=1)
endif()
else()
add_definitions(-DMP_PROC_NUM=1)
endif()
find_package(OpenMP QUIET)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
find_package(PythonLibs REQUIRED)
find_path(MATPLOTLIB_CPP_INCLUDE_DIRS "matplotlibcpp.h")
# 下面的命令需要和package.xml中 <buildtool_depend>catkin</buildtool_depend> 指令协调使用
# 作用是:找到所需要的ROS中宏和功能包
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
sensor_msgs
roscpp
rospy
std_msgs
pcl_ros
tf
livox_ros_driver
message_generation
eigen_conversions
)
find_package(Eigen3 REQUIRED)
find_package(PCL 1.8 REQUIRED)
message(Eigen: ${EIGEN3_INCLUDE_DIR})
include_directories(
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${PCL_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
include)
# 告诉ROS构建系统有自定义消息文件
# 原始文件存放在功能包中msg目录下
# 生成的文件在开发空间内 devel/include/fast_lio(功能包名)
add_message_files(
FILES
Pose6D.msg
)
# 告诉ROS系统生成用于处理自定义消息的C++文件
# 这个自定义消息的依赖有 geometry_msgs 消息包
generate_messages(
DEPENDENCIES
geometry_msgs
)
# 告诉ROS系统软件包的依赖关系
# CATKIN_DEPENDS软件包所依赖的其他ROS软件包
# DEPENDS软件包所需要的其他依赖项
# INCLUDE_DIRS软件包所需要的头文件目录,这里没有
# 说明:find_package命名用于查找,catkin_package命令用于声明,二者互不相关但需要配合使用
catkin_package(
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy std_msgs message_runtime
DEPENDS EIGEN3 PCL
INCLUDE_DIRS
)
# 生成的可执行程序存放在开发空间内 devel/lib/fast_lio(功能包名)
add_executable(fastlio_mapping src/laserMapping.cpp include/ikd-Tree/ikd_Tree.cpp src/preprocess.cpp)
target_link_libraries(fastlio_mapping ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${PYTHON_LIBRARIES})
target_include_directories(fastlio_mapping PRIVATE ${PYTHON_INCLUDE_DIRS})
CMakeLists.txt
文件的其他使用和非ROS情况一致,不多说明。
2.2.4 yaml
文件说明
yaml
文件一般存放在功能包目录下的config目录
中,在launch
文件中,可以被<rosparam>
指令将所有内容以param参数形式
加载到ROS空间中,具体操作如下:
<rosparam command="load" file="$(find fast_lio)/config/mid360.yaml" />
因此,SLAM系统内,可以认为yaml文件
就是launch文件
中许多的param参数
。
yaml
文件内的参数可以是整数、浮点数、字符串、布尔等各种类型,格式一般如下:
my_node:
|— param1: 10
|— param2: “hello”
|— …
下面以FAST-LIO程序中的mid360.yaml
文件进行说明:
common:
lid_topic: "/livox/lidar"
imu_topic: "/livox/imu"
time_sync_en: false # ONLY turn on when external time synchronization is really not possible
time_offset_lidar_to_imu: 0.0 # Time offset between lidar and IMU calibrated by other algorithms, e.g. LI-Init (can be found in README).
# This param will take effect no matter what time_sync_en is. So if the time offset is not known exactly, please set as 0.0
preprocess:
lidar_type: 1 # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR,
scan_line: 4
blind: 0.5
mapping:
acc_cov: 0.1
gyr_cov: 0.1
b_acc_cov: 0.0001
b_gyr_cov: 0.0001
fov_degree: 360
det_range: 100.0
extrinsic_est_en: false # true: enable the online estimation of IMU-LiDAR extrinsic
extrinsic_T: [ -0.011, -0.02329, 0.04412 ]
# 向量和数组都是以vector序列的形式存放的
# c++程序:nh.param<vector<double>>("mapping/extrinsic_R", extrinR, vector<double>());
extrinsic_R: [ 1, 0, 0,
0, 1, 0,
0, 0, 1]
publish:
path_en: false
scan_publish_en: true # false: close all the point cloud output
dense_publish_en: true # false: low down the points number in a global-frame point clouds scan.
scan_bodyframe_pub_en: true # true: output the point cloud scans in IMU-body-frame
pcd_save:
pcd_save_en: true
interval: -1 # how many LiDAR frames saved in each pcd file;
# -1 : all frames will be saved in ONE pcd file, may lead to memory crash when having too much frames.
yaml文件
是比较重要的,一般包含标定的内、外参等,和程序的设计情况相关性很大。
2.2.5 rviz
文件说明
rviz
文件是启动rviz
节点时可以作为配置的文件,一般由rviz
程序导出,保存在功能包目录下的rviz_cfg
目录下。可以在launch文件
中引用rviz
,配置rviz
界面:
<node launch-prefix="nice" pkg="rviz" type="rviz" name="rviz" args="-d $(find fast_lio)/rviz_cfg/loam_livox.rviz" />
下面是FAST-LIO程序中,rviz文件
的具体内容,不重要:
Panels:
- Class: rviz/Displays
Help Height: 0
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /mapping1
- /mapping1/surround1
- /mapping1/currPoints1
- /mapping1/currPoints1/Autocompute Value Bounds1
- /Odometry1/Odometry1
- /Odometry1/Odometry1/Shape1
- /Odometry1/Odometry1/Covariance1
- /Odometry1/Odometry1/Covariance1/Position1
- /Odometry1/Odometry1/Covariance1/Orientation1
- /MarkerArray1/Namespaces1
Splitter Ratio: 0.6432291865348816
Tree Height: 811
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: surround
Preferences:
PromptSaveOnExit: true
Toolbars:
toolButtonStyle: 2
Visualization Manager:
Class: ""
Displays:
- Alpha: 1
Cell Size: 1000
Class: rviz/Grid
Color: 160; 160; 164
Enabled: false
Line Style:
Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 40
Reference Frame: <Fixed Frame>
Value: false
- Class: rviz/Axes
Enabled: false
Length: 0.699999988079071
Name: Axes
Radius: 0.05999999865889549
Reference Frame: <Fixed Frame>
Value: false
- Class: rviz/Group
Displays:
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 238; 238; 236
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Min Color: 238; 238; 236
Name: surround
Position Transformer: XYZ
Queue Size: 1
Selectable: false
Size (Pixels): 3
Size (m): 0.05000000074505806
Style: Points
Topic: /cloud_registered
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Alpha: 0.10000000149011612
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 15
Min Value: -5
Value: false
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 1000
Enabled: true
Invert Rainbow: true
Max Color: 255; 255; 255
Min Color: 0; 0; 0
Name: currPoints
Position Transformer: XYZ
Queue Size: 100000
Selectable: true
Size (Pixels): 1
Size (m): 0.009999999776482582
Style: Points
Topic: /cloud_registered
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 255; 0; 0
Color Transformer: FlatColor
Decay Time: 0
Enabled: false
Invert Rainbow: false
Max Color: 255; 255; 255
Min Color: 0; 0; 0
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.10000000149011612
Style: Flat Squares
Topic: /Laser_map
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: false
Enabled: true
Name: mapping
- Class: rviz/Group
Displays:
- Angle Tolerance: 0.009999999776482582
Class: rviz/Odometry
Covariance:
Orientation:
Alpha: 0.5
Color: 255; 255; 127
Color Style: Unique
Frame: Local
Offset: 1
Scale: 1
Value: true
Position:
Alpha: 0.30000001192092896
Color: 204; 51; 204
Scale: 1
Value: true
Value: true
Enabled: true
Keep: 1
Name: Odometry
Position Tolerance: 0.0010000000474974513
Shape:
Alpha: 1
Axes Length: 1
Axes Radius: 0.20000000298023224
Color: 255; 85; 0
Head Length: 0
Head Radius: 0
Shaft Length: 0.05000000074505806
Shaft Radius: 0.05000000074505806
Value: Axes
Topic: /Odometry
Unreliable: false
Value: true
Enabled: true
Name: Odometry
- Class: rviz/Axes
Enabled: true
Length: 0.699999988079071
Name: Axes
Radius: 0.10000000149011612
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 0
Buffer Length: 2
Class: rviz/Path
Color: 25; 255; 255
Enabled: true
Head Diameter: 0
Head Length: 0
Length: 0.30000001192092896
Line Style: Billboards
Line Width: 0.20000000298023224
Name: Path
Offset:
X: 0
Y: 0
Z: 0
Pose Color: 25; 255; 255
Pose Style: None
Radius: 0.029999999329447746
Shaft Diameter: 0.4000000059604645
Shaft Length: 0.4000000059604645
Topic: /path
Unreliable: false
Value: true
- Alpha: 1
Autocompute Intensity Bounds: false
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: false
Invert Rainbow: false
Max Color: 239; 41; 41
Max Intensity: 0
Min Color: 239; 41; 41
Min Intensity: 0
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 4
Size (m): 0.30000001192092896
Style: Spheres
Topic: /cloud_effected
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: false
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 13.139549255371094
Min Value: -32.08251953125
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 138; 226; 52
Color Transformer: FlatColor
Decay Time: 0
Enabled: false
Invert Rainbow: false
Max Color: 138; 226; 52
Min Color: 138; 226; 52
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.10000000149011612
Style: Flat Squares
Topic: /Laser_map
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: false
- Class: rviz/MarkerArray
Enabled: false
Marker Topic: /MarkerArray
Name: MarkerArray
Namespaces:
{}
Queue Size: 100
Value: false
Enabled: true
Global Options:
Background Color: 0; 0; 0
Default Light: true
Fixed Frame: camera_init
Frame Rate: 10
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Theta std deviation: 0.2617993950843811
Topic: /initialpose
X std deviation: 0.5
Y std deviation: 0.5
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 46.0853271484375
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: -4.982542037963867
Y: -15.83572006225586
Z: -3.063523054122925
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.399796724319458
Target Frame: global
Value: Orbit (rviz)
Yaw: 1.277182698249817
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1028
Hide Left Dock: false
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd0000000400000000000001c800000368fc020000000dfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000002700000368000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d0061006700650000000297000001dc0000000000000000fb0000000a0049006d0061006700650000000394000001600000000000000000fb0000000a0049006d00610067006501000002c5000000c70000000000000000fb0000000a0049006d00610067006501000002c5000000c70000000000000000fb0000000a0049006d00610067006501000002c5000000c700000000000000000000000100000152000004b7fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d000004b7000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000061f00000052fc0100000002fb0000000800540069006d006501000000000000061f000002eb00fffffffb0000000800540069006d00650100000000000004500000000000000000000004510000036800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: true
Width: 1567
X: 67
Y: 24
一般而言,复制粘贴就好。
2.2.6 msg
文件说明
msg
文件是自定义的消息文件,一般存放在功能包目录下的msg目录
中,一般根据程序需求设计,下面是FAST-LIO程序中的msg文件
内容:
# the preintegrated Lidar states at the time of IMU measurements in a frame
float64 offset_time # the offset time of IMU measurement w.r.t the first lidar point
float64[3] acc # the preintegrated total acceleration (global frame) at the Lidar origin
float64[3] gyr # the unbiased angular velocity (body frame) at the Lidar origin
float64[3] vel # the preintegrated velocity (global frame) at the Lidar origin
float64[3] pos # the preintegrated position (global frame) at the Lidar origin
float64[9] rot # the preintegrated rotation (global frame) at the Lidar origin
具体在后续学习中补充。