ROSIDE Design Document - cr01927/ROSIDE GitHub Wiki
ROSIDE is an IDE built on the Qt platform and designed to allow easy entry into programming with ROS. Though programming with ROS can be done in any IDE or text editor, many users who are new to programming are easily lost the many options available. ROSIDE will provide a ROS-specific IDE that assists users in the creation of source, message, service, launch, and other files, and editing XML and CMake files. It will also provide a block diagram-style interface for designing ROS systems and generating template files.
ROSIDE is intended to be an IDE for programming ROS that provides the tools and assistance necessary for someone with minimal experience to write programs that adhere to ROS standards and conventions.
At the top level, the ROSIDE codebase consists of a simple main.cpp file and MainWindow class. Also in the src tree are many libraries that are compiled and linked statically with the main instance and with each other, if necessary. An Object Manager class will handle the references to the objected created in these libraries, many of which should only exist in a single instance.
The Editor library contains the Editor class, which is inherited by language-specific editors. The Editor class inherits a QPlainTextEdit object and allows the user to edit text files, with features such as syntax highlighting and code completion.
The Editor class is never instantiated, only inherited by the following editor classes. It provides the basic functionality common to to all editor classes, including file save and open operations.
EditorWidget(parent: QWidget*); ~EditorWidget(); getFileName() : QString getFullFileName() : QString setFileName(fileName : QString)
Used to edit C++ files.
Used to edit Python files.
Used to edit CMake files.
Used to edit ROS msg files.
Used to edit ROS srv files.
The Modes library contains the classes for the three primary modes of the IDE: Design, Develop, and Inspect.
The Mode class is never instantiated and is inherited by the following Mode subclasses. It contains the functionality common to all the IDE modes.
In Design mode, users use block-diagram-style tools to create ROS nodes, topics, messages and more. From this mode, a project skeleton can be generated and edited in Develop mode.
In Develop mode, users interact with files in the project, using text editors to write code.
Develop mode corresponds with the expected layout and functionality of a typical IDE. Develop mode includes
- A large tabbed interface that contains text files for editing
- A ROS Project Explorer that allows the user to browse, create, and open files with the opened ROS project (Package, metapackage, or catkin workspace).
- A Structure explorer that displays top level functions in a source file, as well as ROS information, like topics published or subscribed to.
- File ->
- New ->
- Workspace (Catkin) - Opens a directory browser to create a new catkin workspace
- Package - Opens a directory browser to first select the package's workspace, then opens a dialog box to request the package name, dependencies, and other parameters.
- Metapackage - Opens a directory browser to first select the metapackage's workspace, then opens a dialog box to request the metapackage name, packages, and dependencies.
- Open ->
- Workspace - Opens a directory browser to open a workspace
- Package - Opens a directory browser to open a package
- Metapackage - Opens a directory browser to open a metapackage
- File - Opens a file browser to open a text file.
- Save - Saves the currently focused file in the editor
- Save All - Saves all opened files in the editor
- Close Project - Closes the currently opened project, be it workspace, package, or other.
- Settings - Opens Settings dialog box.
- New ->
- Edit ->
- Undo
- Redo
- Cut
- Copy
- Paste
- Select All
- Find - Opens dialog box for user to find, find/replace, find in files, etc.
- Indent
- Unindent
- Help ->
- About - Displays license information, GitHub URL, etc.
The ROS Project Explorer is a dockable window in Develop mode through which the user can interact with files in the project. The main view of the ROS Project Explorer is a QTreeView that displays the file hierarchy of the opened project. The context menu displayed upon right clicking an item in the view depends on the type of item selected:
- (Package Directory)
- New ->
- C++ Header file
- C++ Source file
- Executable script file ->
- Python
- Bash
- Other..
- Python source file
- New ->
The ROS Project explorer will have a small menu bar at the top for quick interactions, which will include many of the actions found in the above Context Menus
Files in the ROS Package Explorer will be color coded to indicate git status, with icons indicating file type.