Running ROS2 using QT5
-
Hello to everyone
I'm new to qt so I'm running into a few issues. I'm trying to include ros2 in a qt interface that I want to do, when I did it with cmake, I got it working, but I have no idea how to do it on the qmake side
INCLUDEPATH += C:\\opt\\ros\\foxy\\x64\\include DEPENDPATH += C:\opt\ros\foxy\x64\lib
i added these two.
ros sees it in qt creator, it doesn't give an error, but when I run it, it gives an error in all librariesI thought of two ways as a solution.
- I think that writing in the ros2 python file will not get stuck in the build part by this way (but how do I connect the signal slot) qt files were written over cpp, how can the signal in this section trigger the slots in python or how the signals in python trigger the slots on the cpp side
2)I couldn't add ros to the qmake file, so if I have a cmake file and a qmake file, how can I run these files in each other?
I will write inside the ros2 cmake file and run the cmake file with qmake
can these be done
- I think that writing in the ros2 python file will not get stuck in the build part by this way (but how do I connect the signal slot) qt files were written over cpp, how can the signal in this section trigger the slots in python or how the signals in python trigger the slots on the cpp side
-
dont assume that everyone knows what ros2 is.
-
Hi and welcome to devnet,
Solution number 3: use only CMake.
CMake could already be used with Qt 5 and is now the default for Qt 6.
By the way, why are you trying to mix Python and C++ ?
-
@Kent-Dorfman said in Running ROS2 using QT5:
dont assume that everyone knows what ros2 is.
ROS (Robot Operating System) is a robot operating system and is designed to facilitate the design and programming of robot software for robot developers. ROS can run on many robot systems and bundle software modules (called packages) for many robot types, making it easy for robots to communicate with each other, collect and share data, control motion, and automate tasks.
ROS manages all software modules (packages) running on a robot system and the communication between them. This makes it easier to communicate between the components of the robot software and to add new modules. ROS also includes pre-developed modules for many robot platforms and saves robot software developers time.
ROS is an open source project and is constantly being developed with contributions from the community. ROS helps robot software developers design and program robot software, making it easy for robots to communicate with each other, collect and share data, control motion, and automate tasks.
-
@SGaist said in Running ROS2 using QT5:
Hi and welcome to devnet,
Solution number 3: use only CMake.
CMake could already be used with Qt 5 and is now the default for Qt 6.
By the way, why are you trying to mix Python and C++ ?
My goal is to integrate ROS into an open source QT project. I did this in the Ubuntu environment, but when I switched to the windows environment, it started giving errors.
They did the QT project with both cmake and qmake, ubuntu works on both files, but windows qmake works, so I asked if ROS2 qmake can be used.
I showed the required library paths for ROS2 and QT didn't give any errors but it gave errors during build so I gave up on going this way
Since python is a code that works directly without compiling, I thought that if I could write in ROS python and access the QT project, my problem would be solved again.
,I'm wondering if the signal and slots are accessible by python because the open source project is written in C++ -
Before moving away from something that looks functional, which errors did you get on Windows ?