Skip to content
Snippets Groups Projects
Commit 6301dfe1 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Use hpp-model function isApprox to compare 2 configurations

  - in ManipulationPlanner::extend.
  - the difference with eigen method isApprox is that quaternions and opposite
    reprensent the same rotation.
parent fc5d73c9
No related branches found
No related tags found
No related merge requests found
...@@ -220,6 +220,8 @@ namespace hpp { ...@@ -220,6 +220,8 @@ namespace hpp {
{ {
graph::GraphPtr_t graph = problem_.constraintGraph (); graph::GraphPtr_t graph = problem_.constraintGraph ();
PathProjectorPtr_t pathProjector = problem_.pathProjector (); PathProjectorPtr_t pathProjector = problem_.pathProjector ();
model::DevicePtr_t robot (problem_.robot ());
value_type eps (graph->errorThreshold ());
// Select next node in the constraint graph. // Select next node in the constraint graph.
const ConfigurationPtr_t q_near = n_near->configuration (); const ConfigurationPtr_t q_near = n_near->configuration ();
HPP_START_TIMECOUNTER (chooseEdge); HPP_START_TIMECOUNTER (chooseEdge);
...@@ -237,7 +239,7 @@ namespace hpp { ...@@ -237,7 +239,7 @@ namespace hpp {
es.addFailure (reasons_[PROJECTION]); es.addFailure (reasons_[PROJECTION]);
return false; return false;
} }
if (qProj_.isApprox (*q_near)) { if (model::isApprox (robot, qProj_, *q_near, eps)) {
es.addFailure (reasons_[FAILURE]); es.addFailure (reasons_[FAILURE]);
es.addFailure (reasons_[PATH_PROJECTION_ZERO]); es.addFailure (reasons_[PATH_PROJECTION_ZERO]);
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment