ROS2編程基礎課程–rqt
- 2019 年 10 月 5 日
- 筆記
版權聲明:本文為部落客原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。
本文鏈接:https://blog.csdn.net/ZhangRelay/article/details/100773535
Overview and Usage of RQt
RQt的概述和用法
Overview 概述
RQt is a graphical user interface framework that implements various tools and interfaces in the form of plugins. One can run all the existing GUI tools as dockable windows within RQt! The tools can still run in a traditional standalone method, but RQt makes it easier to manage all the various windows in a single screen layout.
RQt是一個圖形用戶介面框架,以插件的形式實現各種工具和介面。可以將所有現有的GUI工具作為RQt中的可停靠窗口運行!這些工具仍然可以在傳統的獨立方法中運行,但RQt使得在單個螢幕布局中管理所有各種窗口變得更加容易。
You can run any RQt tools/plugins easily by:
可以通過以下方式輕鬆運行任何RQt工具/插件(ros2 run rqt_gui rqt_gui):
rqt
This GUI allows you to choose any available plugins on your system. You can also run plugins in standalone windows. For example, RQt Python Console:
此GUI允許選擇系統上的任何可用插件。還可以在獨立窗口中運行插件。例如,RQt Python控制台:
ros2 run rqt_py_console rqt_py_console
Users can create their own plugins for RQt with either Python or C++. Over 20 plugins were created in ROS 1 and these plugins are currently being ported to ROS 2 (as of Dec 2018, more info).
用戶創建自定義RQT插件的方法有兩種Python或C++。 在ROS 1中創建了20多個插件,這些插件目前正被移植到ROS 2(截至2019年09月,更多資訊)。
System setup 系統設置
Installing From Debian 從Debian安裝
sudo apt install ros-$ROS_DISTRO-rqt*
Building From Source 從源程式碼編譯
See Building RQt from Source. 請參考從源編譯RQt
RQt Components Structure RQt組件結構
RQt consists of three metapackages: RQt由三個元數據包組成:
- rqt – core infrastucture modules.
rqt – 核心基礎設施模組。
- rqt_common_plugins – Backend tools for building tools.
rqt_common_plugins – 用於編譯工具的後端工具。
TODO: as of Dec 2018 this metapackage isn』t available in ROS 2 since not all plugins it contains have been ported yet.
TODO:截至2018年12月,這個元數據包在ROS 2中不可用,因為它並不包含所有插件。
- rqt_robot_plugins – Tools for interacting with robots during runtime.
rqt_robot_plugins – 用於在運行時與機器人交互的工具。
TODO: as of Dec 2018 this metapackage isn』t available in ROS 2 since not all plugins it contains have been ported yet.
TODO:截至2018年12月,這個元數據包在ROS 2中不可用,因為它並不包含所有插件。
Advantage of RQt framework RQt框架的優點
Compared to building your own GUIs from scratch:
與從頭開始編譯自己的GUI相比:
- Standardized common procedures for GUI (start-shutdown hook, restore previous states).
GUI的標準化通用過程(啟動 – 關閉掛鉤,恢復以前的狀態)。
- Multiple widgets can be docked in a single window.
多個小部件可以停靠在一個窗口中。
- Easily turn your existing Qt widgets into RQt plugins.
輕鬆將現有的Qt小部件轉換為RQt插件。
- Expect support at ROS Answers (ROS community website for the questions).
可獲得ROS Answers(ROS社區網站上的問題)的支援。
From system architecture』s perspective:
從系統架構的角度來看:
- Support multi-platform (basically wherever QT and ROS run) and multi-language (Python, C++).
支援多平台(基本上是QT和ROS運行的地方)和多語言(Python,C++)。
- Manageable lifecycle: RQt plugins using common API makes maintainance & reuse easier.
可管理的生命周期:使用通用API的RQt插件使維護和重用更容易。
Further Reading 擴展閱讀
ROS 2 Discourse announcment of porting to ROS2. ROS 2 Discourse 宣布移植到ROS2。
RQt for ROS 1 documentation. RQt for ROS 1文檔。
Brief overview of RQt (from a Willow Garage intern blog post). RQt概述(來自Willow Garage實習生部落格文章)。