-
Notifications
You must be signed in to change notification settings - Fork 270
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 joint position controller GUI, also enable tests for GUI plugins #534
Conversation
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo3 #534 +/- ##
===============================================
- Coverage 77.87% 77.71% -0.16%
===============================================
Files 212 214 +2
Lines 11719 11897 +178
===============================================
+ Hits 9126 9246 +120
- Misses 2593 2651 +58
Continue to review full report at Codecov.
|
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.
Is it possible to have the widget consume the available space? Not sure if this is related to this plugin, or ign-gui in general. See image:
I also tried this with the double pendulum, and I wasn't able to control the joints. I assume this is because the pendulum model doesn't have the joint position controller plugin. Is it possible for this widget to know if the plugin has been specified, and display some kind of warning when the plugin is missing?
src/gui/plugins/joint_position_controller/JointPositionController.qml
Outdated
Show resolved
Hide resolved
Yeah that annoys me too. That's on
At the moment I think that would be difficult. Some thoughts:
|
By "soon" I meant in 2 months 😬 Here we go: gazebosim/gz-gui#194 |
Signed-off-by: Louise Poubel <[email protected]>
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.
LGTM! I left a minor suggestion for the spinbox.
What do you think about having a reset button that resets all the joints back to default?
onEditingFinished: { | ||
joint.value = spin.value | ||
} |
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.
onEditingFinished: { | |
joint.value = spin.value | |
} | |
stepSize: 0.1 | |
onValueChanged: { | |
joint.value = spin.value | |
} |
Currently, the stepSize
is 1
but I think 0.1
would be a better increment. Also, I think using onValueChanged
instead of onEditingFinished
is more user friendly, the user doesn't have to hit enter every time they want to update a joint when using the spinbox
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.
Both are very good suggestions. I started with both of them, but I had to revert to using onEditingFinished
when I worked on the reset button.
While working on reset, I noticed that the values on the GUI were not being updated to reflect the actual state of the robot. When I fixed that, I realized I couldn't use onValueChanged
, because that signal doesn't differentiate the value being changed by the user, or from the ECM. So what was happening was that the intermediate state of a joint moving would be sent as a new command, and the joint would tend to return to its original position in a negative feedback loop. It's hard to explain with words, see what happened with onValueChanged
:
This is all on 08904d0, let me know what you think.
Signed-off-by: Louise Poubel <[email protected]>
Good idea, added on 08904d0, and also fixed updating the GUI according to the robot's real state. Let me know what you think: |
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.
LGTM 😄
This caused a test failure in CI: https://build.osrfoundation.org/job/ignition_gazebo-ci-ign-gazebo4-bionic-amd64/54/testReport/(root)/JointPositionControllerGui/Load/
|
You can try it out with this demo world:
ign gazebo -v 4 "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/NAO joint control"