A ROS 2 RQT plugin that provides a graphical interface for compiling and uploading code to Raspberry Pi Pico boards using PlatformIO.
The RQT Pico Uploader is a Python-based GUI tool that simplifies the process of uploading firmware to Raspberry Pi Pico boards. It integrates seamlessly with ROS 2's RQT framework and uses PlatformIO for compilation and upload operations.
- GUI Interface: User-friendly interface integrated with RQT
- Multiple Projects: Support for managing multiple Pico projects simultaneously
- PlatformIO Integration: Uses PlatformIO for compilation and uploading
- Project Validation: Validates PlatformIO projects for Pico compatibility
- Unique ID Assignment: Automatically assigns unique IDs to uploaded firmware
- Status Tracking: Real-time status updates for upload operations
- Ubuntu 22.04
- ROS 2 Humble Hawksbill
- Python 3.x
- PlatformIO Core (CLI)
cd ~/your_ros2_workspace/src
git clone https://github.com/Logical05/rqt_pico_uploader.gitMake sure you have PlatformIO installed. To install, go to PlatformIO installation.
cd ~/your_ros2_workspace
colcon build --packages-select rqt_pico_uploader
source install/setup.bashThe plugin will be automatically available in RQT after building and sourcing.
-
Launch RQT (use
--force-discoverfor first time use):# First time usage rqt --force-discover # Subsequent usage rqt
-
Go to
PluginsβMiscellaneous ToolsβPico Uploader (Custom)
ros2 run rqt_pico_uploader rqt_pico_uploader-
Set PlatformIO Path (if needed):
- Click the pulse icon
- Select your PlatformIO installation directory (usually
~/.platformio)
-
Add a Project:
- Enter or click "Browse" to browse your PlatformIO project folder
- Click the pulse icon to add the project to the upload queue
- The project must contain a valid
platformio.inifile configured for Pico
-
Select Target Drive:
- Connect your Raspberry Pi Pico in BOOTSEL mode
- The plugin will automatically detect available drives
- Select the appropriate drive for each project
- Important: Do not use the same drive for multiple projects at the same time
-
Upload:
- Click "Upload" to compile and upload all projects
- Monitor the status column for progress updates
- π¨ Ready: Project is ready for upload
- π¦ Uploading: Compilation and upload in progress
- π© Complete: Upload completed successfully
- π₯ Error: Upload failed
rqt_pico_uploader/
βββ LICENSE # Apache 2.0 license
βββ package.xml # ROS 2 package manifest
βββ plugin.xml # RQT plugin configuration
βββ setup.cfg # Setup configuration
βββ setup.py # Package setup script
βββ resource/
β βββ rqt_pico_uploader # Resource marker
β βββ uploader_gui.ui # Qt UI file
βββ src/
βββ rqt_pico_uploader/
βββ __init__.py # Package initialization
βββ main.py # Entry point
βββ uploader.py # RQT plugin class
βββ uploader_widget.py # Main widget implementation
- Project Validation: The plugin checks for a valid
platformio.inifile with Pico board configuration - Temporary Compilation: Projects are copied to
/tmpfor compilation to avoid modifying the original source code - ID Assignment: Each project gets a unique ID that's injected into the
main.cppfile by replacingRQT_PICO_ID = NULL - PlatformIO Build: Uses PlatformIO CLI to compile the project and generate the firmware
- Upload: The compiled
.uf2file is automatically copied to the selected Pico drive
Your PlatformIO project must:
- Have a valid
platformio.inifile - Be configured for Raspberry Pi Pico board
- Contain a
src/main.cppfile - Include the
RQT_PICO_IDplaceholder in your code (optional, for ID assignment)
Example platformio.ini:
[env:pico]
platform = raspberrypi
board = pico
framework = arduinoIf your main.cpp contains the placeholder int RQT_PICO_ID = NULL;, it will be replaced with a unique numeric ID:
// Before compilation
int RQT_PICO_ID = NULL;
// After compilation (example)
int RQT_PICO_ID = 1;-
PlatformIO Not Found
- Ensure PlatformIO is installed following the installation guide
- Set the correct PlatformIO path using the pulse icon button
-
Project Not Recognized
- Verify your project has a valid
platformio.inifile - Ensure the board is set to "pico" in the configuration
- Verify your project has a valid
-
Drive Not Detected
- Make sure the Pico is connected in BOOTSEL mode
- Check that the device is mounted under
/media/username/ - Try reconnecting the Pico while holding the BOOTSEL button
-
Upload Fails
- Verify the selected drive is correct
- Ensure the Pico is properly connected
- Check that the project compiles successfully
- Make sure you're not using the same drive for multiple projects simultaneously
-
Plugin Not Visible in RQT
- Use
rqt --force-discoverfor first-time plugin discovery - Ensure the package is built and sourced correctly
- Use
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Email: logical.code.01@gmail.com
- GitHub: @Logical05
- Built on top of ROS 2 and RQT framework
- Uses PlatformIO for compilation and upload
- Designed for Raspberry Pi Pico development
