Commit 1bb555d3 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

[Problem] Make method resetConfigValidations deprecated.

  - use clearConfigValidations instead.
parent 5d831b0f
......@@ -140,7 +140,8 @@ namespace hpp {
/// Reset the ConfigValidations
/// by creating a new ConfigValidations using ConfigValidations::create
void resetConfigValidations ();
/// \deprecated Use clear instead.
void resetConfigValidations () HPP_CORE_DEPRECATED;
/// Clear the ConfigValidations
/// by calling ConfigValidations::clear
......
......@@ -371,7 +371,7 @@ namespace hpp {
{
if (!robot_) throw std::logic_error ("You must provide a robot first");
if (!problem_) throw std::runtime_error ("The problem is not defined.");
problem_->resetConfigValidations();
problem_->clearConfigValidations();
for (ConfigValidationTypes_t::const_iterator it =
configValidationTypes_.begin (); it != configValidationTypes_.end ();
++it)
......
......@@ -80,7 +80,7 @@ namespace hpp {
// ======================================================================
Problem::Problem (DevicePtr_t robot) :
robot_ (robot)
robot_ (robot), configValidations_ (ConfigValidations::create ())
{
}
......@@ -95,8 +95,6 @@ namespace hpp {
steeringMethod_ = steeringMethod::Straight::create (wkPtr_.lock());
pathValidation_ = pathValidation::createDiscretizedCollisionChecking (robot_, 0.05);
configurationShooter_ = configurationShooter::Uniform::create (robot_);
resetConfigValidations();
}
// ======================================================================
......@@ -185,6 +183,7 @@ namespace hpp {
boost::shared_ptr<ObstacleUserInterface> oui =
HPP_DYNAMIC_PTR_CAST(ObstacleUserInterface, pathValidation_);
if (oui) oui->addObstacle (object);
assert(configValidations_);
if (configValidations_) {
configValidations_->addObstacle (object);
}
......@@ -198,6 +197,7 @@ namespace hpp {
boost::shared_ptr<ObstacleUserInterface> oui =
HPP_DYNAMIC_PTR_CAST(ObstacleUserInterface, pathValidation_);
if (oui) oui->addObstacle (obstacle);
assert(configValidations_);
if (configValidations_) {
configValidations_->removeObstacleFromJoint (joint, obstacle);
}
......@@ -214,6 +214,7 @@ namespace hpp {
boost::shared_ptr<ObstacleUserInterface> oui =
HPP_DYNAMIC_PTR_CAST(ObstacleUserInterface, pathValidation_);
if (oui) oui->filterCollisionPairs (matrix);
assert(configValidations_);
if (configValidations_) {
configValidations_->filterCollisionPairs (matrix);
}
......@@ -226,6 +227,7 @@ namespace hpp {
boost::shared_ptr<ObstacleUserInterface> oui =
HPP_DYNAMIC_PTR_CAST(ObstacleUserInterface, pathValidation_);
if (oui) oui->setSecurityMargins (securityMatrix);
assert(configValidations_);
if (configValidations_) {
configValidations_->setSecurityMargins (securityMatrix);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment