Skip to content

Commit

Permalink
Merge moveit#2944: various fixes to the rviz plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Dec 7, 2021
2 parents fb0a5b5 + 03ce4cf commit 32a1883
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ bool planning_pipeline::PlanningPipeline::generatePlan(const planning_scene::Pla
ROS_DEBUG_STREAM("Motion planner reported a solution path with " << state_count << " states");
if (check_solution_paths_)
{
visualization_msgs::MarkerArray arr;
visualization_msgs::Marker m;
m.action = visualization_msgs::Marker::DELETEALL;
arr.markers.push_back(m);

std::vector<std::size_t> index;
if (!planning_scene->isPathValid(*res.trajectory_, req.path_constraints, req.group_name, false, &index))
{
Expand Down Expand Up @@ -301,7 +306,6 @@ bool planning_pipeline::PlanningPipeline::generatePlan(const planning_scene::Pla
<< private_nh_.resolveName(MOTION_CONTACTS_TOPIC));

// call validity checks in verbose mode for the problematic states
visualization_msgs::MarkerArray arr;
for (std::size_t it : index)
{
// check validity with verbose on
Expand All @@ -325,8 +329,6 @@ bool planning_pipeline::PlanningPipeline::generatePlan(const planning_scene::Pla
}
}
ROS_ERROR_STREAM("Completed listing of explanations for invalid states.");
if (!arr.markers.empty())
contacts_publisher_.publish(arr);
}
}
else
Expand All @@ -335,6 +337,7 @@ bool planning_pipeline::PlanningPipeline::generatePlan(const planning_scene::Pla
}
else
ROS_DEBUG("Planned path was found to be valid when rechecked");
contacts_publisher_.publish(arr);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,28 +337,20 @@ void MotionPlanningDisplay::updateBackgroundJobProgressBar()

if (n == 0)
{
p->setValue(p->maximum());
p->update();
p->hide();
p->setMaximum(0);
p->setValue(0);
}
else
{
if (n == 1)
{
if (p->maximum() == 0)
p->setValue(0);
else
p->setValue(p->maximum() - 1);
}
else
if (p->maximum() < n) // increase max
{
if (p->maximum() < n)
p->setMaximum(n);
else
p->setValue(p->maximum() - n);
p->setMaximum(n);
if (n > 1) // only show bar if there will be a progress to show
p->show();
}
p->show();
else // progress
p->setValue(p->maximum() - n);
p->update();
}
}
Expand Down
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 @@ -2042,82 +2042,12 @@ This is usually achieved by random seeding, which can flip the robot configurati
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>5</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>5</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Progress of background jobs&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
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 32a1883

Please sign in to comment.