当前位置: 首页 > news >正文

evo_traj的参数设置及保存图片

文章目录

  • 1 查看参数配置
  • 2 设置参数
  • 3 显示运动轨迹
  • 4 保存图片

1 查看参数配置

evo_config show
{"console_logging_format": "%(message)s","euler_angle_sequence": "sxyz","global_logfile_enabled": false,"plot_axis_marker_scale": 0.0,"plot_backend": "TkAgg","plot_export_format": "pdf","plot_figsize": [6,6],"plot_fontfamily": "sans-serif","plot_fontscale": 1.0,"plot_invert_xaxis": false,"plot_invert_yaxis": false,"plot_linewidth": 1.5,"plot_mode_default": "xyz","plot_multi_cmap": "none","plot_pose_correspondences": false,"plot_pose_correspondences_linestyle": "dotted","plot_reference_alpha": 0.5,"plot_reference_color": "black","plot_reference_linestyle": "--","plot_seaborn_palette": "deep6","plot_seaborn_style": "darkgrid","plot_split": false,"plot_statistics": ["rmse","median","mean","std","min","max"],"plot_texsystem": "pdflatex","plot_trajectory_alpha": 0.75,"plot_trajectory_cmap": "jet","plot_trajectory_linestyle": "-","plot_usetex": false,"plot_xyz_realistic": true,"ros_map_alpha_value": 1.0,"ros_map_unknown_cell_value": 205,"save_traj_in_zip": false,"table_export_data": "stats","table_export_format": "csv","table_export_transpose": true,"tf_cache_lookup_frequency": 10,"tf_cache_max_time": 10000.0
}

2 设置参数

  1. 设置线宽:
    evo_config set plot_linewidth 2
    
  2. 设置字体大小:
    evo_config set plot_fontscale 3
    
  3. 设置画布大小:
    evo_config set plot_figsize 22 16
    

3 显示运动轨迹

evo_traj tum \ORB-SLAM2.txt \YOLOv3-ORB-SLAM2.txt \OUR.txt \--ref=groundtruth.txt \-as \--plot_mode=xy \-p

在这里插入图片描述

4 保存图片

evo_traj tum \ORB-SLAM2.txt \YOLOv3-ORB-SLAM2.txt \OUR.txt \--ref=groundtruth.txt \-as \--plot_mode=xy \--save_plot=./

会报以下错

[ERROR] Unhandled error in evo.main_traj
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/evo/entry_points.py”, line 98, in launch
main_module.run(args)
File “/usr/local/lib/python2.7/dist-packages/evo/main_traj.py”, line 473, in run
confirm_overwrite=not args.no_warnings)
File “/usr/local/lib/python2.7/dist-packages/evo/tools/plot.py”, line 186, in export
pdf = matplotlib.backends.backend_pdf.PdfPages(file_path)
File “/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_pdf.py”, line 2472, in init
self._file = PdfFile(filename, metadata=metadata)
File “/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_pdf.py”, line 438, in init
fh, opened = cbook.to_filehandle(filename, “wb”, return_opened=True)
File “/usr/local/lib/python2.7/dist-packages/matplotlib/cbook/init.py”, line 616, in to_filehandle
fh = io.open(fname, flag, encoding=encoding)
IOError: [Errno 21] Is a directory: ‘./’
[ERROR] evo module evo.main_traj crashed - no logfile written (disabled)

之前一直没仔细看这个报错,导致一直以为evo_traj是无法保存图片的,于是傻傻手动截图,或者手动占保存按钮一个个保存…从报错的信息中,可以看到,它保存时,调用的是backend_pdf.py,似乎将图片保存为PDF文件,所以我们将命令改成下面

evo_traj tum \ORB-SLAM2.txt \YOLOv3-ORB-SLAM2.txt \OUR.txt \--ref=groundtruth.txt \-as \--plot_mode=xy \--save_plot=./res.pdf

果然可以正常保存,而且也能正常打开

Plots saved to ./res.pdf

但我们想的是保存图片,而无须再傻傻的手动进行保存或截图。仔细查看它的参数配置,可以看到其中一行配置:

“plot_export_format”: “pdf”,

试着将其改为png

evo_config set plot_export_format png

然后执行

evo_traj tum \ORB-SLAM2.txt \YOLOv3-ORB-SLAM2.txt \OUR.txt \--ref=groundtruth.txt \-as \--plot_mode=xy \--save_plot=./res

Plot saved to ./res_trajectories
Plot saved to ./res_xyz_view
Plot saved to ./res_rpy_view

成功的将图片保存到./res中,这个不大不小的坑就解决了!

http://www.lryc.cn/news/607101.html

相关文章:

  • React 19 革命性升级:编译器自动优化,告别手动性能调优时代
  • RAGFLOW~Enable RAPTOR
  • 机器学习sklearn:随机森林的决策树
  • OPENGLPG第九版学习 - 纹理与帧缓存 part2
  • 数据结构学习基础和从包装类缓存到泛型擦除的避坑指南
  • C++入门基础 2
  • C语言使用GmSSL库实现sm3、sm4算法
  • Linux----信号
  • Docker学习其二(容器卷,Docker网络,Compose)
  • cocosCreator2.4 googlePlay登录升级、API 35、16KB内存页面的支持
  • 特征工程 --- 特征提取
  • (一)LoRA微调BERT:为何在单分类任务中表现优异,而在多分类任务中效果不佳?
  • 【C++】类和对象 上
  • 逻辑回归算法中的一些问题
  • Leetcode——53. 最大子数组和
  • elementui中rules的validator 用法
  • 在线教程丨全球首个 MoE 视频生成模型!阿里 Wan2.2 开源,消费级显卡也能跑出电影级 AI 视频
  • Windows11 WSL安装Ubntu22.04,交叉编译C语言应用程序
  • 网站建设服务器从入门到上手
  • 《n8n基础教学》第一节:如何使用编辑器UI界面
  • 如何优雅删除Docker镜像和容器(保姆级别)
  • 服务器地域选择指南:深度分析北京/上海/广州节点对网站速度的影响
  • FreeSWITCH与Java交互实战:从EslEvent解析到Spring Boot生态整合的全指南
  • 分布式弹幕系统设计
  • Git 误删分支怎么恢复
  • ABP VNext + Dapr Workflows:轻量级分布式工作流
  • stl的MATLAB读取与显示
  • Blender 4.5 安装指南:快速配置中文版,适用于Win/mac/Linux系统
  • 【Mysql】字段隐式转换对where条件和join关联条件的影响
  • 安全专家发现利用多层跳转技术窃取Microsoft 365登录凭证的新型钓鱼攻击