-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix QObject::connect: Cannot queue arguments of type 'QVector<int>' #2392
Conversation
caused by accessing/updating GUI elements from a non-GUI thread
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this and it works for me to remove the warning. 👍
...lanning_scene_rviz_plugin/include/moveit/planning_scene_rviz_plugin/planning_scene_display.h
Outdated
Show resolved
Hide resolved
@simonschmeisser, I addressed your feedback. Thanks for pointing me to |
scene_name_property_->setStdString(getPlanningSceneRO()->getName()); | ||
scene_name_property_->blockSignals(old_state); | ||
|
||
QMetaObject::invokeMethod(this, "setSceneName", Qt::QueuedConnection, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QMetaObject::invokeMethod(this, "setSceneName", Qt::QueuedConnection, | |
QMetaObject::invokeMethod(this, &PlanningSceneDisplay::setSceneName, Qt::QueuedConnection, |
probably doesn't work due to the argument right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, tried this first. But invokeMethod doesn't support methods, only lambdas.
Fix annoying Qt warning about unregistered
QVector<int>
. The reason was that the planning scene name was changed from a non-GUI thread, causing adataChanged()
signal emitted from this thread, which then needs to be queued for processing in the main event loop.I fixed that by emitting a signal from the thread to change the name. Thus, a
QString
event is queued, which doesn't pose an issue.