No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
Repository Summary
Description | A library used to merge the event loops of ros2 and qt |
Checkout URI | https://github.com/1r0b1n0/libros2qt.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2024-02-20 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
libros2qt | 0.0.0 |
README
librosqt
This is a simple library that merges the event loop of ROS2 and Qt. This is done by providing a custom executor.
Usage
In your main.cpp init the node in the following way :
#include <QCoreApplication>
#include <rclcpp/rclcpp.hpp>
#include <lib_ros2_qt/qt_executor.h>
using namespace rclcpp;
int main(int argc, char* argv[]) {
QCoreApplication a(argc, argv);
rclcpp::init(argc, argv);
auto server = std::make_shared<TestNode>();
QtExecutor executor;
executor.add_node(server);
executor.start();
auto res = a.exec();
rclcpp::shutdown();
return res;
}
Examples
Motivations
The Qt library can be useful for ROS nodes when developping GUI applications, or even in headless nodes using network communications (tcp/ip, modbus, canbus, bluetooth …).
Both Qt and ROS2 need to have their own event loop spinning : rclcpp::executors::SingleThreadedExecutor::spin()
for ROS, QCoreApplication::exec()
for Qt.
License
CONTRIBUTING
No CONTRIBUTING.md found.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.