Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Application freezes when clicking on RDK scene while robot moves C++

#1
Hello
I am new to this forum, so please be comprehensive if I am not clear :-)

I am using RDK for one month now and up to now everything was great, but some days ago I observed a strange behaviour when trying to integrate RDK window into my QT application.

I observed the same with the example for c++ api.

Concerning my problem the example is the one from Robodk for c++ API.
here is a copy screen of the example 

   

With this example the behaviour is similar to my application.
If you try to change the view without clicking on button that's ok.

But not when you have clicked on action button...
 
The bugs I observed are:
  • Ask for a TX+ with 100 as step distance to have to click on the scene or ask for several TX+ (or any other)
when you click on the scene during the movement of robot the whole application will freeze.
In this example I just import a kuka robot.
  • Create a scene with robodk including 2 robots.
launch the example, integrate RDK window, then select openfile and open the scene.
In the code the next action is to select robot.

Code:
void MainWindow::on_btnLoadFile_clicked() {
    if (!Check_RoboDK()){ return; }
    QStringList files = QFileDialog::getOpenFileNames(this, tr("Open one or more files with RoboDK"));
    foreach (QString file, files){
        qDebug() << "Loading: " << file;
        RDK->AddFile(file);
    }
    if (!Check_Robot()){
        Select_Robot();
    }
}

when the function is called the application freezes
   

I don't know if you can reproduce the bug... I attached the created scen called stationTest.rdk
 
I took the example and built it with visual studio 2022 64bits version 17.5.3
windows sdk 10.0.22000.0
platform tools visual studio 2022 (v143)
Qt 6.3.2

I saw in python example that it could be possible to use thread to avoid this blocking situation.
But how to do this? if you hav any example I could use....

Many thanks for your help in this matter
#2
This is a known issue with some setups. I'm unable to reprodcue it using Windows and Qt 5.15.

This issue happens when RoboDK needs to pop up a new window. As a workaround you could implement this window in Qt and letting the user choose among available items on your end.
#3
(05-21-2024, 09:12 AM)Albert Wrote: This is a known issue with some setups. I'm unable to reprodcue it using Windows and Qt 5.15.

This issue happens when RoboDK needs to pop up a new window. As a workaround you could implement this window in Qt and letting the user choose among available items on your end.

Thank you Albert for your feedback. I managed it as suggested and that's OK now for this problem.
 
However there are still strange behaviour and unpredictable frozen situations when asking for robots movements. Unpredictable because sometimes it works and sometimes not :-) 
But in my application I have several "real time" threads (set as time critical) and Qt timers... (2 robots synchronized and spatially and temporally with a lot of user feedback through User interface...) so it could explain...

Running my application with Qt5 I do not have this problem, only wiht Qt6. They changed things concerning timers so maybe there are some conflicts...
#4
Thank you for your feedback.

We have an experimental build of RoboDK using the Qt 6 library. Using this build should fix this main loop blocking issues you are experiencing and other issues. You can contact us by email through this contact form:
https://robodk.com/contact

And we can provide you with this RoboDK version built using Qt 6.
#5
Hello Albert,
That's very interesting :-)
I am going to send an email immediately as I have an on going order for a commercial version :-)
thanks a lot
#6
Thank you for your feedback! I just got back to you with the dedicated build of RoboDK using Qt 6.4 binaries.
  




Users browsing this thread:
1 Guest(s)