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
Add primitive shapes widgets #2198
Add primitive shapes widgets #2198
Conversation
Scrolling through your "Unify" commit, this looks good and improves user experience further. I would approve, but I did not try this out, so I will leave it to someone else. Great to finally get primitives support in the GUI! |
Codecov Report
@@ Coverage Diff @@
## master #2198 +/- ##
==========================================
+ Coverage 57.69% 57.70% +0.01%
==========================================
Files 326 326
Lines 25661 25663 +2
==========================================
+ Hits 14805 14809 +4
+ Misses 10856 10854 -2
Continue to review full report at Codecov.
|
I should have pushed Felix to join forces with Jorge and come up with a unified solution in the first place, yes. |
I just noticed, that the changes a user applies to the PlanningScene through this GUI are local to the rviz plugin only and not (yet) propagated to the move_group's central planning scene. I suggest doing so, because the added collision objects are not considered for planning otherwise. I'm working on this right now. So long, I marked this PR as WIP. If we don't agree on this, we definitely need to update the query robot states after an object was attached or detached. Otherwise they don't notice, and the behaviour is inconsistent even locally in rviz! |
e8598d7
to
f4294c6
Compare
Actually, I have chosen a middle ground solution now: Changes to the local planning scene are handled locally only, but are explicitly noticed (enabling the Publish button). Only before planning, the user is asked whether to publish all local changes if not yet done. This explicitly brings the fact to the user's attention that rviz maintains its own planning scene. As I added a lot of independent commits now, this PR should be merged as a proper merge commit. |
Yes, the need to press "publish scene" after changing the scene was not obvious and improving this is a good idea. Thanks for working on it. |
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 working on this! I love the warning before planning without publishing the scene. I think I would have had no objections even to automatically publishing changes, but this way the user is familiarized with the "Publish to update" concept.
I left comments, but some general issues:
- On two 18.04 machines (containers) I tested, the
+
-
X
icons did not appear. If the "Add", "Del" etc. text is a fallback, the button is not big enough to display it. - The Size spinbox fields seem a little wide. Is there a way to make them smaller? It looks like there is a little dead space overall, but it might just be Qt.
Apart from that, if we're overhauling the GUI we might as well include #2061 :)
And remove the '.00' from the "Planning Attempts" option (it's an integer).
And figure out why the panel is so wide.
moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp
Outdated
Show resolved
Hide resolved
moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp
Outdated
Show resolved
Hide resolved
...tion_planning_rviz_plugin/include/moveit/motion_planning_rviz_plugin/motion_planning_frame.h
Show resolved
Hide resolved
moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp
Outdated
Show resolved
Hide resolved
...it_ros/visualization/motion_planning_rviz_plugin/src/ui/motion_planning_rviz_plugin_frame.ui
Outdated
Show resolved
Hide resolved
moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp
Outdated
Show resolved
Hide resolved
moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame_objects.cpp
Outdated
Show resolved
Hide resolved
That seems like an argument to keep the plugin's copy and the move_group node's PlanningScene in sync. I wouldn't mind that either. |
This would be rather slow: Updates would need to be sent to the move_group's scene and the received back in rviz' scene. |
3bbe757
to
928348e
Compare
Thanks, @felixvd, for your comments.
Maybe, we need to embed the icons into the plugin? These are default theme icons and should™ be available.
Qt computes the minimal size of those spinboxes by the maximal width of numbers that can be potentially entered into them.
I will have a short look.
That was already done in #2076?!?
I investigated yesterday: The width essentially boils down to the width of the "object position" spinboxes. As stated above, their width is determined by the min/max values, which were -1000...1000 and now are -999...999. So, I already saved 3x1 digits. |
928348e
to
f792f4a
Compare
I have set the default tab to "Planning" now. Fixes #2061. |
f792f4a
to
5b97dae
Compare
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 don't know what is wrong with the icons either, but in my local container and in moveit/moveit:melodic-source
it looks like this:
I like the new size, but now those buttons are very non-descript. It's not clear what 3 numbers and "Box" will do. On thinking about it further, this UI element should really have a header. How about something like this? "Add/remove scene object" would also be good:
If we can fix those two issues this should be good to merge. Looks great already.
Some unrelated UI notes:
- Objects cannot be unselected in the Current Scene Objects box. Seems like there are only workarounds for this.
- In the "Change Object Pose and Scale" box, clicking on the slider bar (rather than dragging the slider) does not update the object scale for me. Is this only on my end? It looks like clicking does not trigger valueChanged for some reason. I didn't find a workaround on first googling.
That was already done in #2076?!?
No idea what happened there, it does look good for me now too.
moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp
Outdated
Show resolved
Hide resolved
- Remove "Import from File" and "Import from URL" buttons, but add those options as item in the shape combobox - Integrate MotionPlanningFrame::addObject() into MotionPlanningFrame::addSceneObject()
- grid layout for object position/orientation spin boxes (to not rely on chance for their column-wise layout anymore) - Limit position spin boxes to -999..999 This essentially cancels one digit to be displayed, which significantly reduces the minimum width of the widget.
clearSceneButtonClicked() -> clearScene() removeObjectButtonClicked() -> removeSceneObject() publishSceneButtonClicked()-> publishScene()
5b97dae
to
85f62d8
Compare
+1 from me for directly synchronizing, I don't think users need to know that there are separate copies and might actually trigger planning by separate means? The update rate back to rviz could be increased ... |
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.
Finally got to test it, works like a charm, approved to the moon and back.
Rebase of #2137 required due to conflicting changes in #2142. Great work, @jrgnicho! I was missing this feature several times in the past. In a cleanup commit, I tried to unify the UI to insert primitive objects / meshes.