All Projects → StefanFabian → qml_ros_plugin

StefanFabian / qml_ros_plugin

Licence: MIT License
Connects QML to ROS

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to qml ros plugin

Crusta
Fast, modern and minimal desktop web browser with rich features
Stars: ✭ 53 (+178.95%)
Mutual labels:  qml, qml-plugin
mycobot ros
A ros package for myCobot.
Stars: ✭ 76 (+300%)
Mutual labels:  ros, rviz
SASensorProcessing
ROS node to create pointcloud out of stereo images from the KITTI Vision Benchmark Suite
Stars: ✭ 26 (+36.84%)
Mutual labels:  ros, rviz
my ROS mobile robot
Differential drive mobile robot using ROS.
Stars: ✭ 123 (+547.37%)
Mutual labels:  ros, rviz
ROS-GPS
GPS Localization with ROS, OSM and rviz
Stars: ✭ 19 (+0%)
Mutual labels:  ros, rviz
ROS
ROS机器人操作系统 学习(写于2020年夏)
Stars: ✭ 102 (+436.84%)
Mutual labels:  ros, rviz
turtlebot rrt
Rapidly Exploring Random Tree (RRT) global path planning plugin for ROS Kinetic Kame
Stars: ✭ 86 (+352.63%)
Mutual labels:  ros, rviz
vaktisalah
a Qt-Based Prayer Times application for Win/Linux/Mac
Stars: ✭ 26 (+36.84%)
Mutual labels:  qml
facelift
A framework for flexible interfacing between C++ and QML/JS.
Stars: ✭ 25 (+31.58%)
Mutual labels:  qml
tf2-rich-presence
Discord Rich Presence for Team Fortress 2
Stars: ✭ 30 (+57.89%)
Mutual labels:  tf2
awesome-webots
Awesome Webots
Stars: ✭ 46 (+142.11%)
Mutual labels:  ros
rmw connextdds
ROS 2 RMW layer for RTI Connext DDS Professional and RTI Connext DDS Micro.
Stars: ✭ 28 (+47.37%)
Mutual labels:  ros
ros-tritech-micron
🔊 Tritech Micron SONAR ROS driver
Stars: ✭ 19 (+0%)
Mutual labels:  ros
jetson csi cam
A ROS package making it simple to use CSI cameras on the Nvidia Jetson TK1, TX1, or TX2 with ROS.
Stars: ✭ 95 (+400%)
Mutual labels:  ros
vectornav
ROS Interface for the VectorNav IMU/GPS
Stars: ✭ 71 (+273.68%)
Mutual labels:  ros
QmlControls
Qt / Qml 控件
Stars: ✭ 65 (+242.11%)
Mutual labels:  qml
quickcurver
Qt/C++ (OpenGL accelerated) implementation of the famous game "Achtung die Kurve", also known as Curve Fever
Stars: ✭ 29 (+52.63%)
Mutual labels:  qml
pyblish-qml
Pyblish QML frontend for Maya 2013+, Houdini 11+, Nuke 8+ and more
Stars: ✭ 91 (+378.95%)
Mutual labels:  qml
igvc-software
The code base for the RoboNav team's IGVC robot.
Stars: ✭ 78 (+310.53%)
Mutual labels:  ros
RosSwift
ROS Robotic Operating System - Swift implementation of core client libraries and rosmaster. Based on roscpp.
Stars: ✭ 37 (+94.74%)
Mutual labels:  ros

Build Status Documentation Status codecov

Warning: Currently in Beta

While this plugin contains a significant amount of tests, it is still in beta stadium and bugs may be part of the experience. Be aware of this. I would not recommend using it in production systems without further testing.

Scientific Works

If you are using this module in a scientific context, feel free to cite this paper:

@INPROCEEDINGS{fabian2021hri,
  author = {Stefan Fabian and Oskar von Stryk},
  title = {Open-Source Tools for Efficient ROS and ROS2-based 2D Human-Robot Interface Development},
  year = {2021},
  booktitle = {2021 European Conference on Mobile Robots (ECMR)},
}

QML ROS Plugin

Connects QML user interfaces to the Robot Operating System (ROS).
Please be aware that this loses some of the semantic information that the type of a message would normally provide.

Currently, has support for the following:
Logging, Publisher, Subscriber, ImageTransportSubscriber, Service::call, ActionClient, TfTransform, ros::package and querying topics

Note: For full examples including ROS init calls and shutdown handling checkout the examples directory or the documentation.

Logging

Logging is now supported and correctly reports from which qml file and line the message came!

import Ros 1.0

Item {
  function doesWork() {
    Ros.debug("A debug message")
    // Set the logging level to Debug (default is usually Info)
    Ros.console.setLoggerLevel(Ros.console.defaultName, RosConsoleLevels.Debug);
    Ros.debug("A debug message that is actually logged.")
    Ros.info("I have some information")
    Ros.warn("This is the last warning")
    Ros.error("Great! Now there's an error.")
    Ros.fatal("I'm dead")
    Ros.info("Just so you know, fatal does not kill a node. Though they usually die after logging fatal")
  }
  // ...
}

Subscribers

Can be used to subscribe to any topic and message type.

Usage example:

import Ros 1.0

Item {
  width: 600
  height: 400
  
  Subscriber {
    id: subscriber
    topic: "/test"
    onNewMessage: textField.text = message.data 
  }
  
  Text {
    text: "You can use the message directly: " + subscriber.message.data
  }
  
  Text {
    id: textField
    text: "Or you can use the newMessage signal."
  }
}

Image Transport

Can be used to stream camera images. The default transport used is "compressed".
The stream is exposed to QML as a QObject with a QAbstractVideoSurface based videoSurface property (see QML VideoOutput docs) and can be used directly as source for the VideoOutput control.

New: Multiple ImageTransportSubscribers for the same topic now share a subscription to ensure the image is converted to a QML compatible format only once. Additionally, a throttleRate property was introduced to throttle the camera rate by subscribing for one frame and shutting down again at the given rate (see documentation).

Usage example:

import QtMultimedia 5.4
import Ros 1.0

Item {
  width: 600
  height: 400

  ImageTransportSubscriber {
    id: imageSubscriber
    topic: "/front_rgb_cam"
    throttleRate: 0.2 // 1 frame every 5 seconds
  }

  VideoOutput {
    source: imageSubscriber
  }
}

Tf Lookup

TfTransformListener

A singleton class that can be used to look up tf transforms.
Usage example:

import Ros 1.0

Item {
  // ...
  Connections {
    target: TfTransformListener
    onTransformChanged: {
      var message = TfTransformListener.lookUpTransform("base_link", "world");
      if (!message.valid) {
        // Check message.exception and message.message for more info if it is available.
        return;
      }
      var translation = message.transform.translation;
      var orientation = message.transform.rotation;
      // DO something with the information
   }
  }
}

Explanation:
You can use the TfTransformListener.lookUpTransform (and canTransform) methods anywhere in your QML code. However, they only do this look up once and return the result. If you want to continuously monitor the transform, you have to either connect to the transformChanged signal or use the convenience component TfTransform. The message structure is identical to the ROS message, except for an added valid field (message.valid) indicating if the transform returned is valid or not. If it is not valid, there may be a field exception containing the name of the exception that occured and a field message with the message of the exception.

TfTransform

A convenience component that watches a transform. Usage example:

import Ros 1.0

Item {
  // ...
  TfTransform {
    id: tfTransform
    sourceFrame: "base_link"
    targetFrame: "world"
  }
  
  Text {
    width: parent.width
    // The translation and rotation can either be accessed using the message field as in the lookUpTransform case or,
    // alternatively, using the convenience properties translation and rotation which resolve to the message fields.
    // In either case, the message.valid field should NOT be ignored.
    text: "- Position: " + tfTransform.message.transform.translation.x + ", " + tfTransform.translation.y + ", " + tfTransform.translation.z + "\n" +
          "- Orientation: " + tfTransform.message.transform.rotation.w + ", " + tfTransform.rotation.x + ", " + tfTransform.rotation.y + ", " + tfTransform.rotation.z + "\n" +
          "- Valid: " + tfTransform.message.valid + "\n" +
          "- Exception: " + tfTransform.message.exception + "\n" +
          "- Message: " + tfTransform.message.message
    wrapMode: Text.WordWrap
  }
}

Explanation:
This component can be used to watch a transform. Whenever the transform changes, the message and the properties of the TfTransform change and the changes are propagated by QML.

Installation

Clone this repo and its dependencies into your workspace.

cd {REPO}
mkdir build
cd build
cmake ..
# Replace 8 with the number of (virtual) cores on your machine
make -j8
sudo make install

Dependencies

Documentation

You can find the documentation on readthedocs.io.

Alternatively, you can follow the steps below to build it yourself.

Dependencies

  • Doxygen
  • Sphinx
  • sphinx_rtd_theme
  • Breathe

Example for Ubuntu
Install dependencies

sudo apt install doxygen
pip3 install sphinx sphinx_rtd_theme breathe

Build documentation

cd REPO/docs
make html

Roadmap

  • Subscribers
  • Publishers
  • Look up of Tf transforms
  • Service Calls
  • ImageTransport Subscriber
  • Handle Endianness in Image messages
  • Logging
  • Action Clients
  • Service Clients
  • Make available as ros package
  • Transport Hints(?)
  • Callback Queues(?)
  • Sending of Tf transforms(?)
  • ImageTransport Publisher(?)

(?) For items with a question mark, please send me user stories (preferably as issues) because I don't know what that would be useful for.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].