util.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:rqt_robot_dashboard 作者: ros-visualization 项目源码 文件源码
def dashwarn(msg, obj, title='Warning'):
    """
    Logs a message with ``rospy.logwarn`` and displays a ``QMessageBox`` to the user

    :param msg: Message to display.
    :type msg: str
    :param obj: Parent object for the ``QMessageBox``
    :type obj: QObject
    :param title: An optional title for the `QMessageBox``
    :type title: str
    """
    rospy.logwarn(msg)

    box = QMessageBox()
    box.setText(msg)
    box.setWindowTitle(title)
    box.show()

    obj._message_box = box
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号