RQT custom plugin freeze randomly

asked 2021-12-17 04:28:33 -0500

q7frkz gravatar image

Hi,

I'm creating an IHM to control a drone. On the left I have buttons for arming, takeoff, land, disarm, emergency disarm. On the right I display video from drone camera. In the middle there is a map where I see my drone moving.

Everything perfectly working.

Now, I created a new plugin to display velocity, local position, gps position. To do this I created a new node which publish 4 times per second all these datas, 2 plugins subscribe to this and update QLCDNumber in my IHM.

When I launch this IHM, everything is working during 10-30 seconds, after this all my QLCDNumbers freeze. I need to click on any button as "Arming" or "Land" or "Refresh camera input" to unfreeze all QLCDNumbers.

If I print() in a terminal values published by my node and same thing for values received by my 2 subscribers, when QLCDNumbers freeze, I can see in terminal values continue to be published, and subscribers are well working.

Any idea of what append ? Or any mistale I would do ? Thank you !!

=> Ros melodic / Ubuntu 18 / Gazebo / PX4 => Consumption 4gb on 8 / 30% cpu used

edit retag flag offensive close merge delete

Comments

Can you trigger a refresh in your code? To see if this fixes it and discard other reasons. Also it would be helpful if you can produce a minimum reproducible example and share the code, otherwise it’s hard to know

osilva gravatar image osilva  ( 2021-12-17 06:09:15 -0500 )edit

For the code the problem is the computer on which I work has no internet and extract some code would not be appreciated by my firm ... :/

I think a refresh should be a good idea but how do you think create it ?

q7frkz gravatar image q7frkz  ( 2021-12-17 07:27:18 -0500 )edit

it can be a node that just activates an invisible button at a frequency.

osilva gravatar image osilva  ( 2021-12-17 08:48:09 -0500 )edit

Not sure if this is the way to go, but based on your description perhaps something to try: https://doc.qt.io/qt-5/qml-qtquick-mo...

osilva gravatar image osilva  ( 2021-12-17 12:41:14 -0500 )edit

Nothing works, I created a separeted rqt window which is better, it freezes every 5 minuts and not every 10-30seconds, but I don't understand what appened and I don't find how launch my window withtout RQT only with Qt with script : source .... ; python my widget , like this I have no communication with my nodes

q7frkz gravatar image q7frkz  ( 2022-01-11 03:51:05 -0500 )edit