Creating a QT ROS package
How do i create a ros package that has QT GUI? Thanks
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
You can use catkin_create_qt_pkg
. But it will probably generate some project which is not compileable (or at least in was like it my case). It depends on version of your ROS
, qt
etc.
Here is a great tutorial on how to do that. But in my case I had to modify it's CMakeLists.txt
to be able to build it. I also had to rename QtGui
include in main_window.hpp
.
From this #include <QtGui/QMainWindow>
to this #include <QtWidgets/QMainWindow>
.
I've added my example package here on github so take look.
Hey l4ncelot, when trying to open your github example I can run catkin_make succesfully but when opening it in Qt I get:CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package): Could not find a package configuration file provided by "roscpp" ... Can you help me?
Hey Valveware, I used this package I found : https://github.com/stonier/qt_ros add it to your workspace. If you have questions let me know. Thanks!
Does that work for Kinetic? I now did the following steps: 1) followed the installguide 2) cloned l4's example and qt_rosinto my source folder 3) ran catkin_make on my workspace ( no errors) 4) Qt -> open project -> catkin_ws/src/qtros_example/ CMakeLists.txt with the standard kit
Now the last step gives an error in Qt: CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package): Could not find a package configuration file provided by "roscpp". What am I still doing wrong? Qt Creator 4.5.0 based on Qt 5.10.0. Thanks in advance!
Is this perhaps a better solution for me? https://answers.ros.org/question/2755... I also which to create a GUI to interact with a Turtlebot running on ROS. EDIT: Solved it with this thread thanks!
Asked: 2017-10-25 14:26:05 -0500
Seen: 2,822 times
Last updated: Oct 26 '17
No drop-down list of Fixed Frame in RViz
Issue with Rosserial Custom Message
while loop not updating global variable in cpp
How to create subscriber to get USB2 camera images
dynamic obstacle tracking and detection in 2D env in RViz ROS
Issue installing turtlebot3 simulation on ubuntu 16.04
Creating custom Gazebo world files from sdf's/dae's for use with roslaunch
Display the gps topic in a bag file