-
-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RobotModelDisplay: Poll robot_description at 1Hz until found
- Loading branch information
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d171d82
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.
@rhaschke IMHO this introduces a regression. If there's no
robot_description
param in the ROS param server all displays lose the focus after 1 second (the `QTimer frequency), so it's almost impossible to change the property values of any display to something that has more than one character (at least for me, since you first has to click with the mouse on the property value field and then type the new value or move with the arrows, ...).Could this be reverted or implemented in a different way, please?
As a workaround I'm setting the
robot_description
param to an empty string. That works, but I had togit bisect
rviz
source code to figure out what the issue was.d171d82
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.
Thanks for reporting this issue. However, I cannot reproduce the behavior you are describing.
I guess when referring to "displays losing focus" you mean that the property editors in the display's property tree are losing focus. However, this doesn't happen for me.
Which Qt version you are using?
Could you provide an rviz config to reproduce the issue?
d171d82
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.
Not sure which version is actually used, but this is all I have installed in my
Ubuntu 16.04.6 LTS
machine:@rhaschke What version do you have?
BTW, If there's a minium version requirement on Qt, shouldn't that be specified in the
package.xml
file for thelibqt5*
dependencies with aversion_gte
param? 😃 (I'm just wondering what version I could try that would work)For the sake of clarity, this is the issue I'm describing (if you disable the

Robot Model
display the issue doesn't happen because I believe the displayQTimer
stops running):You only need an rviz layout with a
Robot Model
, and optionally any other display. This is the one I used in the example above (I changed the extension from.rviz
to.txt
so I can upload it here):example.txt
d171d82
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.
Just to clarify: Obviously you are using Ubuntu 16.04. Usually this is used with ROS Kinetic.
Hence, I assume that you have built rviz from source. Did you?
When running rviz, it prints the Qt version number on the console. Could you please provide this one?
Currently, I have no idea, why this regression happens to you. On my stock Ubuntu 18.04 with ROS Melodic (and Qt 5.9.5) it doesn't happen (and there is no reason for it: trying to load the robot model doesn't explicitly change focus). Hence, I'm asking for your Qt version to try to reproduce the issue.
d171d82
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.
Yes, I built
rviz
from source when I wasgit bisect
ing it to find out the offending commit.The Qt version number printed when I open
rviz
is:I'm running now
rviz
version 1.13.4 but with your commit reverted, which is what I have now in our fork: https://github.com/clearpathrobotics/rvizThat way we can upgrade to the latest
rviz
w/o getting impacted by this in our environment.I think there was a latent issue that changes focus (or something similar) when the robot model is set. By adding a timer that happens constantly every time the timer is triggered (until the
robot_description
becomes available), and the issue becomes clearly noticeable.Let me know what else do you need and how I can help find the actual root cause of the issue we're seeing.
I wonder how are you planning to test with my Qt version in your system 🤔
Maybe I can try the same upgrading to Qt 5.9.5.
d171d82
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 can reproduce the issue with Qt 5.5.1 in a Xenial/Kinetic environment. Will try to debug asap.
d171d82
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.
Thanks @rhaschke . I highly appreciate.
Let me know if you need help testing anything.
d171d82
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.
This is indeed an issue of Qt: When the status messages of the display are removed in a call to
Display::clearStatuses()
, theQAbstractItemView
callsfocusNextPrevChild()
in response to removed rows of the model (although the active editor is not affected by these deletions).This behavior is obviously fixed in Qt 5.9.5. As this commit targets Melodic, which ships with Qt 5.9.5, I am tempted to leave it like this.
If you guys at Clearpath want to run the latest Melodic rviz on Kinetic, you should revert this commit as you already have done.