remove restriction to watch only generators

This commit is contained in:
v4hn 2018-02-23 22:01:25 +01:00 committed by Robert Haschke
parent d035089c10
commit 2a2d406368

View File

@ -531,8 +531,6 @@ void MonitoringGenerator::init(const planning_scene::PlanningSceneConstPtr& scen
auto impl = pimpl(); auto impl = pimpl();
if (!impl->monitored_) if (!impl->monitored_)
throw InitStageException(*this, "no monitored stage defined"); throw InitStageException(*this, "no monitored stage defined");
if (impl->monitored_->pimpl()->requiredInterface() != GENERATE)
throw InitStageException(*this, "monitored stage must have generator-style interface");
if (!impl->registered_) { // register only once if (!impl->registered_) { // register only once
impl->cb_ = impl->monitored_->addSolutionCallback(std::bind(&MonitoringGenerator::onNewSolution, this, _1)); impl->cb_ = impl->monitored_->addSolutionCallback(std::bind(&MonitoringGenerator::onNewSolution, this, _1));
impl->registered_ = true; impl->registered_ = true;