• ROS入门笔记(五):ROS中运行rqt_plot的问题(kinetic)


    ROS入门笔记(五):ROS中运行rqt_plot的问题(kinetic)

    rqt_plot的问题(kinetic)
        1.1 问题
        1.2 原因
        1.3 解决方法
        1.4 deb文件怎么安装?

    rqt_plot的问题(kinetic)

    1.1 问题

    运行:rqt_plot

    rosrun rqt_plot rqt_plot
    ggk@ggk-virtual-machine:~$ rosrun rqt_plot 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/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 526, in inv
    ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
    File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
    raise LinAlgError("Singular matrix")
    numpy.linalg.linalg.LinAlgError: Singular matrix

    1.2 原因

    我们可以登录Matplotlib官网发现,kinetic中的python2.7和Matplotlib不兼容,并且不再支持Python2。

    因此,我们需要寻找另一个可视化工具,PyQtGraph。

     

     

    1.3 解决方法

    • 安装PyQtGraph
    • 官网:http://www.pyqtgraph.org/
    • 我们下载之后安装就可以了。

     

    1.4 deb文件怎么安装?

    Ubuntu中deb文件详细安装方法:

    1.首先打开电脑主界面。

    2.然后找到"安装包"后双击。

    3.最后点击"安装"键进行安装即可。

    1)步骤1

     

    2)步骤2

     

     

  • 相关阅读:
    python-列表基本方法
    成员/身份运算
    python-字符串常用方法
    python基础知识1
    jmeter_性能测试及报告分析
    Day3_linux_工作目录切换命令
    Day2_linux_查看系统状态
    Day1_liunx_常用系统工作命令
    互联网是有记忆的
    第3章 Python基础
  • 原文地址:https://www.cnblogs.com/IT-cute/p/13122280.html
Copyright © 2020-2023  润新知