ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

rviz panel plugin update QLabel

asked 2017-10-10 10:37:35 -0500

WicketSick gravatar image

Hello I wanted to know if its possible to constant update a label in the rviz::Panel plugin class. I have informaiton on a variety of nodes that are being published and wish to show then on a Panel plugin for rviz, its possible to access the main loop or how do I create a signal that can trigger the change? Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-26 06:30:31 -0500

Bogdar_ gravatar image

Just use Qt resources.

You could integrate a Qtimer with a Q_SLOTS that simply wraps a spinOnce call into your custom panel class ( Q_OBJECT).

So when the timer hits timeout, it calls for spinOnce(). Then, through subscriber callbacks, your Qt elements get updated.

Example for integration of timer and wrapper call:

QObject::connect(QTimer_instance_name, SIGNAL(timeout()), this, SLOT(spinOnce_Wrapper()));

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-10-10 10:37:35 -0500

Seen: 327 times

Last updated: Apr 26 '19