-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
Tool: Propagate name changes to VisualizationFrame #1570
Tool: Propagate name changes to VisualizationFrame #1570
Conversation
I'm not sure about the purpose of this PR yet. Isn't it common practice to first initialize an object (display, panel, tool, ...) and later load its parameters? I don't like the idea of coupling the loading to the creation of a tool. Regarding #1138: I guess you can always call |
Hmm.. I'm not quite sure. After all, the initialization might depend on the parameters. What would be the downside of having the parameters available in
Calling |
It shouldn't. It's always possible to load a different config later. However, the initialization should always work.
I don't see why this should be the case. Currently, rviz/src/rviz/tool_manager.cpp Lines 235 to 237 in 13d061d
|
I see... I did some more digging in the code and the issue is the following with rviz/src/rviz/visualization_frame.cpp Lines 1177 to 1188 in 2fe6d33
From what you explained about the initialization, I believe that the proper solution to #1138 is to change the |
That sounds reasonable. Would it be sufficient to change the name? I think, having the same icons for the same tool, would facilitate its identification. I suggest introducing a signal |
Completely agree. I'll do it then. |
462d717
to
c4f109e
Compare
I've force-pushed the changes. Calling |
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 this contribution. In general, this looks good. Some minor remarks though.
c4f109e
to
a0446c9
Compare
Great suggestions! I've force-pushed again to meet them. |
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.
Two more nitpicks. Otherwise looks good. Thanks.
a0446c9
to
a1ad870
Compare
That's completely understandable 👍. I've pushed the changes. |
Thanks a lot. |
Description
With this PR the tool parameters will be available when
onInitialize
is called. One can use this feature to solve #1138 by addingan
rviz::StringProperty
, e.g. namedTool Name
, and then use its value to rename the tool inonInitialize
.