mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
cleanup
This commit is contained in:
parent
df1bbc5d32
commit
d5627c0c39
@ -92,7 +92,6 @@ public:
|
|||||||
* \return true on success
|
* \return true on success
|
||||||
*/
|
*/
|
||||||
TaskSolutionVisualization(rviz::Property* parent, rviz::Display* display);
|
TaskSolutionVisualization(rviz::Property* parent, rviz::Display* display);
|
||||||
|
|
||||||
virtual ~TaskSolutionVisualization();
|
virtual ~TaskSolutionVisualization();
|
||||||
|
|
||||||
virtual void update(float wall_dt, float ros_dt);
|
virtual void update(float wall_dt, float ros_dt);
|
||||||
@ -116,9 +115,7 @@ private Q_SLOTS:
|
|||||||
void changedRobotCollisionEnabled();
|
void changedRobotCollisionEnabled();
|
||||||
void changedRobotAlpha();
|
void changedRobotAlpha();
|
||||||
void changedLoopDisplay();
|
void changedLoopDisplay();
|
||||||
void changedShowTrail();
|
void changedTrail();
|
||||||
void changedTrailStepSize();
|
|
||||||
void changedStateDisplayTime();
|
|
||||||
void changedRobotColor();
|
void changedRobotColor();
|
||||||
void enabledRobotColor();
|
void enabledRobotColor();
|
||||||
void changedAttachedBodyColor();
|
void changedAttachedBodyColor();
|
||||||
|
|||||||
@ -81,12 +81,12 @@ TaskSolutionVisualization::TaskSolutionVisualization(rviz::Property* parent, rvi
|
|||||||
parent, SLOT(changedLoopDisplay()), this);
|
parent, SLOT(changedLoopDisplay()), this);
|
||||||
|
|
||||||
trail_display_property_ = new rviz::BoolProperty("Show Trail", false, "Show a path trail",
|
trail_display_property_ = new rviz::BoolProperty("Show Trail", false, "Show a path trail",
|
||||||
parent, SLOT(changedShowTrail()), this);
|
parent, SLOT(changedTrail()), this);
|
||||||
|
|
||||||
state_display_time_property_ = new rviz::EditableEnumProperty("State Display Time", "0.05 s",
|
state_display_time_property_ = new rviz::EditableEnumProperty("State Display Time", "0.05 s",
|
||||||
"The amount of wall-time to wait in between displaying "
|
"The amount of wall-time to wait in between displaying "
|
||||||
"states along a received trajectory path",
|
"states along a received trajectory path",
|
||||||
parent, SLOT(changedStateDisplayTime()), this);
|
parent);
|
||||||
state_display_time_property_->addOptionStd("REALTIME");
|
state_display_time_property_->addOptionStd("REALTIME");
|
||||||
state_display_time_property_->addOptionStd("0.05 s");
|
state_display_time_property_->addOptionStd("0.05 s");
|
||||||
state_display_time_property_->addOptionStd("0.1 s");
|
state_display_time_property_->addOptionStd("0.1 s");
|
||||||
@ -94,7 +94,7 @@ TaskSolutionVisualization::TaskSolutionVisualization(rviz::Property* parent, rvi
|
|||||||
|
|
||||||
trail_step_size_property_ = new rviz::IntProperty("Trail Step Size", 1,
|
trail_step_size_property_ = new rviz::IntProperty("Trail Step Size", 1,
|
||||||
"Specifies the step size of the samples shown in the trajectory trail.",
|
"Specifies the step size of the samples shown in the trajectory trail.",
|
||||||
parent, SLOT(changedTrailStepSize()), this);
|
parent, SLOT(changedTrail()), this);
|
||||||
trail_step_size_property_->setMin(1);
|
trail_step_size_property_->setMin(1);
|
||||||
|
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ void TaskSolutionVisualization::changedLoopDisplay()
|
|||||||
slider_panel_->pauseButton(false);
|
slider_panel_->pauseButton(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskSolutionVisualization::changedShowTrail()
|
void TaskSolutionVisualization::changedTrail()
|
||||||
{
|
{
|
||||||
clearTrail();
|
clearTrail();
|
||||||
|
|
||||||
@ -274,12 +274,6 @@ void TaskSolutionVisualization::changedShowTrail()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskSolutionVisualization::changedTrailStepSize()
|
|
||||||
{
|
|
||||||
if (trail_display_property_->getBool())
|
|
||||||
changedShowTrail();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TaskSolutionVisualization::changedRobotAlpha()
|
void TaskSolutionVisualization::changedRobotAlpha()
|
||||||
{
|
{
|
||||||
robot_render_->setAlpha(robot_alpha_property_->getFloat());
|
robot_render_->setAlpha(robot_alpha_property_->getFloat());
|
||||||
@ -301,10 +295,6 @@ void TaskSolutionVisualization::changedRobotCollisionEnabled()
|
|||||||
trail_[i]->setCollisionVisible(robot_collision_enabled_property_->getBool());
|
trail_[i]->setCollisionVisible(robot_collision_enabled_property_->getBool());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskSolutionVisualization::changedStateDisplayTime()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void TaskSolutionVisualization::onEnable()
|
void TaskSolutionVisualization::onEnable()
|
||||||
{
|
{
|
||||||
scene_node_->setVisible(displaying_solution_ && animating_);
|
scene_node_->setVisible(displaying_solution_ && animating_);
|
||||||
@ -375,7 +365,7 @@ void TaskSolutionVisualization::update(float wall_dt, float ros_dt)
|
|||||||
{
|
{
|
||||||
animating_ = true;
|
animating_ = true;
|
||||||
displaying_solution_ = solution_to_display_;
|
displaying_solution_ = solution_to_display_;
|
||||||
changedShowTrail();
|
changedTrail();
|
||||||
if (slider_panel_)
|
if (slider_panel_)
|
||||||
slider_panel_->update(solution_to_display_->getWayPointCount());
|
slider_panel_->update(solution_to_display_->getWayPointCount());
|
||||||
}
|
}
|
||||||
@ -502,7 +492,7 @@ void TaskSolutionVisualization::showTrajectory(const moveit_task_constructor_msg
|
|||||||
if (!s->empty())
|
if (!s->empty())
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(display_solution_mutex_);
|
boost::mutex::scoped_lock lock(display_solution_mutex_);
|
||||||
solution_to_display_.swap(s);
|
solution_to_display_ = s;
|
||||||
if (interrupt_display_property_->getBool())
|
if (interrupt_display_property_->getBool())
|
||||||
interruptCurrentDisplay();
|
interruptCurrentDisplay();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user