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
评论列表
文章目录