Outlined here is the development process for making new RTXI modules. For simplicity, we provide a template module, called Plugin Template, for users to customize without needing to writing everything from scratch. Plugin Template defines a basic GUI with customizable widgets and is found on our GitHub repository.
From our site, go to the Plugin-Template repository. Download the source files:
Now, clone the repository. Developers for new modules are expected to base it on MyPluginGUI. Type:
custom_module is the name of the directory git will create when downloading the source code. You can change it to whatever you want. If you don’t specify a name, it will default to
plugin-template, the name of the repository on GitHub.
Once the module is downloaded, look inside the new directory for Plugin Template’s source code. An explanation of the header and source files is available in the our user manual.
Modify the RTXI files to run the code you want. When you compile and install your module, be sure to rename the source files and classes to something other than
PluginTemplate, respectively. It’s preferable to name it something that reflects what it does. A quick and easy way to change the names of the files, classes, and binary is to use the
mv commands. A wrapper script called
rename_module.sh is provided in the plugin-template repository.
Additionally, it’s good practice to document your code. As a general rule, document it so that you’re confident that anyone with programming experience will be able to understand what your code and overall module do. Within the plugin-template repository, there is another script called
build_readme.sh. It parses your source file and generates a readme from it.
The script assumes that the name of your source file matches the directory name, so it will look for and parse
Once you’re ready to compile and install your module, go to the base of your module directory and execute: