赞
踩
自己在调试 ROS 程序的时候,运行 rqt_plot
报错:
/usr/lib/python2.7/dist-packages/matplotlib/axis.py:1015: UserWarning: Unable to find pixel distance along axis for interval padding of ticks; assuming no interval padding needed. warnings.warn("Unable to find pixel distance along axis " /usr/lib/python2.7/dist-packages/matplotlib/axis.py:1025: UserWarning: Unable to find pixel distance along axis for interval padding of ticks; assuming no interval padding needed. warnings.warn("Unable to find pixel distance along axis " Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/mat_data_plot.py", line 107, in resizeEvent self.figure.tight_layout() File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1754, in tight_layout rect=rect) File "/usr/lib/python2.7/dist-packages/matplotlib/tight_layout.py", line 349, in get_tight_layout_figure pad=pad, h_pad=h_pad, w_pad=w_pad) File "/usr/lib/python2.7/dist-packages/matplotlib/tight_layout.py", line 128, in auto_adjust_subplotpars fig.transFigure.inverted()) File "/usr/lib/python2.7/dist-packages/matplotlib/transforms.py", line 1775, in inverted self._inverted = Affine2D(inv(mtx), shorthand_name=shorthand_name) File "/usr/local/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 551, in inv ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj) File "/usr/local/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 97, in _raise_linalgerror_singular raise LinAlgError("Singular matrix") numpy.linalg.LinAlgError: Singular matrix
在终端先运行
rqt
会弹出一个空白的界面:
然后在桌面的最上端,选择
Plugins->Visualization->Plot
然后就可以显示 rqt_plot 界面了~~~~
在Matplotlib官网可以发现,kinetic中的python2.7和Matplotlib是不兼容的,并且不再支持Python2。
所以我们可以安装 另一个可视化工具,PyQtGraph。
运行如下指令:
pip install pyqtgraph
或者官网下载安装包安装。
然后再次运行
rqt_plot
就可以愉快地使用 rqt_plot 啦~~~~~~~~
参考链接:
[1] ROS入门笔记(五):ROS中运行rqt_plot的问题(kinetic) https://www.cnblogs.com/IT-cute/p/13122280.html
[2] ROS入门:rqt_plot出现错误:UserWarning: Unable to find pixel distance along axis for interval padding of tic-- https://blog.csdn.net/qinqinxiansheng/article/details/106736892
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。