Skip to content

Commit

Permalink
Joints widget: avoid flickering of the nullspace slider
Browse files Browse the repository at this point in the history
Show a (disabled) dummy slider if there is no nullspace.
This avoids flickering between zero and one slider, which is the most common case.
Also provide some tooltips to explain the usage.
  • Loading branch information
rhaschke authored and rickstaa committed Dec 8, 2021
1 parent 8dc3701 commit 4592f89
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ void MotionPlanningFrameJointsWidget::updateNullspaceSliders()
if (i == 0)
nullspace_.resize(0, 0);

// show/hide dummy slider
ui_->dummy_ns_slider_->setVisible(i == 0);

// hide remaining sliders
for (; i < ns_sliders_.size(); ++i)
ns_sliders_[i]->hide();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,44 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="nullspace_label">
<property name="toolTip">
<string>The sliders below allow for jogging the nullspace of the current configuration,
i.e. trigger joint motions that don't affect the end-effector pose.

Typically, redundant arms (with 7+ joints) offer such a nullspace.
However, also singular configurations provide a nullspace.

Each basis vector of the (linear) nullspace is represented by a separate slider.</string>
</property>
<property name="text">
<string>Nullspace exploration:</string>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="nullspace_layout_"/>
<layout class="QVBoxLayout" name="nullspace_layout_">
<item>
<widget class="QSlider" name="dummy_ns_slider_">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>The slider will become active if the current robot configuration has a nullspace.
That's typically the case for redundant robots, i.e. 7+ joints, or singular configurations.</string>
</property>
<property name="minimum">
<number>-1</number>
</property>
<property name="maximum">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
Expand Down

0 comments on commit 4592f89

Please sign in to comment.