void ompl::control::SpaceInformation::setup() { base::SpaceInformation::setup(); if (!statePropagator_) throw Exception("State propagator not defined"); if (minSteps_ > maxSteps_) throw Exception("The minimum number of steps cannot be larger than the maximum number of steps"); if (minSteps_ == 0 && maxSteps_ == 0) { minSteps_ = 1; maxSteps_ = 10; OMPL_WARN("Assuming propagation will always have between %d and %d steps", minSteps_, maxSteps_); } if (minSteps_ < 1) throw Exception("The minimum number of steps must be at least 1"); if (stepSize_ < std::numeric_limits<double>::epsilon()) { stepSize_ = getStateValidityCheckingResolution() * getMaximumExtent(); if (stepSize_ < std::numeric_limits<double>::epsilon()) throw Exception("The propagation step size must be larger than 0"); OMPL_WARN("The propagation step size is assumed to be %f", stepSize_); } controlSpace_->setup(); if (controlSpace_->getDimension() <= 0) throw Exception("The dimension of the control space we plan in must be > 0"); }
void ompl::base::SpaceInformation::printSettings(std::ostream &out) const { out << "Settings for the state space '" << stateSpace_->getName() << "'" << std::endl; out << " - state validity check resolution: " << (getStateValidityCheckingResolution() * 100.0) << '%' << std::endl; out << " - valid segment count factor: " << stateSpace_->getValidSegmentCountFactor() << std::endl; out << " - state space:" << std::endl; stateSpace_->printSettings(out); out << std::endl << "Declared parameters:" << std::endl; params_.print(out); ValidStateSamplerPtr vss = allocValidStateSampler(); out << "Valid state sampler named " << vss->getName() << " with parameters:" << std::endl; vss->params().print(out); }