图片链接生成器软件,成都网站优化服务,网站建设分金手指专业二八,开发公司自平衡文章目录 软件版本错误编译运行轨迹路径保存运行TUM数据集 附录针对svo slam的/svo/pose_imu转为tum格式代码 软件版本
ubuntu 20 rosnoeticSVO SLAM虚拟机 windows 11
错误
常见的git clone问题可以使用DevSidecar解决#xff0c;在 加速服务-基本设置-绑定IP 设置为0.0.0… 文章目录 软件版本错误编译运行轨迹路径保存运行TUM数据集 附录针对svo slam的/svo/pose_imu转为tum格式代码 软件版本
ubuntu 20 rosnoeticSVO SLAM虚拟机 windows 11
错误
常见的git clone问题可以使用DevSidecar解决在 加速服务-基本设置-绑定IP 设置为0.0.0.0虚拟机网络连接设置为桥接之后在虚拟机中设置网络中的 Network ProxyIP为WindowsIP地址端口为DevSidecar代理端口。server certificate verification failed. CAfile: none CRLfile: none。参考CSDN博客Cloning into ‘dbow2_src’…ssh: connect to host github.com port 22: Connection timed out。参考CSDN博客
cd svo_ws/src
git clone https://github.com/dorian3d/DBoW2.git
tar -cvf DBoW2.tar DBoW2
# 修改svo_ws/src/dbow2_catkin/CMakeLists.txt
ExternalProject_Add(dbow2_srcGIT_REPOSITORY gitgithub.com:dorian3d/DBoW2.gitCMAKE_ARGS -DCMAKE_INSTALL_PREFIX${CATKIN_DEVEL_PREFIX}BUILD_COMMAND CXXFLAGS-i${CATKIN_DEVEL_PREFIX}/include makeINSTALL_COMMAND make install
)
# 改为 XXXXXX为DBoW2.tar所在路径
ExternalProject_Add(dbow2_srcURL XXXXXX/DBoW2.tarCMAKE_ARGS -DCMAKE_INSTALL_PREFIX${CATKIN_DEVEL_PREFIX}BUILD_COMMAND CXXFLAGS-i${CATKIN_DEVEL_PREFIX}/include makeINSTALL_COMMAND make install
) 编译 创建工作空间克隆代码
mkdir -p svo_ws/src cd svo_ws/src
cd ..
catkin config --init --mkdirs --extend /opt/ros/noetic --cmake-args -DCMAKE_BUILD_TYPERelease -DEIGEN3_INCLUDE_DIR/usr/include/eigen3
cd src
git clone https://github.com/uzh-rpg/rpg_svo_pro_open.git依赖下载
# 该步骤任选其一执行
# 1
vcs-import ./rpg_svo_pro_open/dependencies.yaml
# 1 结束# 2
git clone https://github.com/catkin/catkin_simple.git \
git clone https://github.com/zurich-eye/cmake_external_project_catkin.git \
git clone https://github.com/ethz-asl/eigen_catkin.git \
git clone https://github.com/ethz-asl/eigen_checks.git \
git clone https://github.com/uzh-rpg/fast_neon.git \
git clone https://github.com/ethz-asl/gflags_catkin.git \
git clone https://github.com/ethz-asl/glog_catkin.git \
git clone https://github.com/ethz-asl/minkindr.git \
git clone https://github.com/ethz-asl/opengv.git \
git clone https://github.com/ethz-asl/minkindr_ros.git \
git clone https://github.com/ethz-asl/ceres_catkin.git \
git clone https://github.com/uzh-rpg/dbow2_catkin.git \
git clone https://github.com/uzh-rpg/rpg_trajectory_evaluation.git
# 2结束编译
touch minkindr/minkindr_python/CATKIN_IGNORE
cd rpg_svo_pro_open/svo_online_loopclosing/vocabularies ./download_voc.sh
cd ../../..
catkin build运行 启动SVO核心ROS节点
source XXXXXX/devel/setup.bash
roslaunch svo_ros euroc_mono_frontend_imu.launch播放数据集
rosbag play XXXXXX/DataSets/MH_01_easy.bag运行图片
轨迹路径保存 svo轨迹数据通过 /svo/points 话题发布该话题为visualization_msgs/Marker(中文参考)类型。旋转数据通过 /svo/pose_imu 发布该话题为geometry_msgs/PoseWithCovarianceStamped(中文参考)类型。 轨迹路径保存主要分为以下几步
启动svo_ros播放bag包在开始后按下空格暂停新开两个终端记录话题信息/svo/points和/svo/pose_imu继续播放bag包将/svo/pose_imu数据转化为 进行轨迹对比时使用tum格式进行对比。EUROC转tum命令如下
evo_traj euroc groundtruth.csv --save_as_tum/svo/pose_imu原始数据转化为tum格式代码见附录 获取到真实轨迹与实际轨迹后进行对比代码与结果如下(感觉结果有点不对希望知道的人指出)data为真实轨迹svo_result为ros结果
evo_traj tum data.tum svo_result.txt -p -s --align_origin -a --plot_modexyz --refdata.tum运行TUM数据集
待补充
附录
针对svo slam的/svo/pose_imu转为tum格式代码
in_file_path svo_pose_data.txt
out_file_path svo_result.txt rfp open(in_file_path)
wfp open(out_file_path,w)
file_end False
while file_end ! True:time 0tx 0ty 0tz 0qx 0qy 0qz 0qw 0for i in range(19):line rfp.readline()if line :file_end Truebreakif i 3:time float(line.split(:)[1])elif i 4:time float(line.split(:)[1])/1e9elif i 9:tx float(line.split(:)[1])elif i 10:ty float(line.split(:)[1])elif i 11:tz float(line.split(:)[1])elif i 13:qx float(line.split(:)[1])elif i 14:qy float(line.split(:)[1])elif i 15:qz float(line.split(:)[1])elif i 16:qw float(line.split(:)[1])else:passwrite_str {time} {tx} {ty} {tz} {qx} {qy} {qz} {qw}\n.format(timetime,txtx,tyty,tztz,qxqx,qyqy,qzqz,qwqw)# print(write_str)wfp.write(write_str)
rfp.close()
wfp.close()
print(保存完毕)