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

[ReedsShepp] Fix inifinite loop in function calls.

parent 6a1abf47
......@@ -109,6 +109,7 @@ namespace hpp {
}
private:
WeighedDistancePtr_t weighedDistance_;
ReedsSheppWkPtr_t weak_;
}; // ReedsShepp
/// \}
......
......@@ -24,6 +24,7 @@
#include <hpp/core/distance.hh>
#include <hpp/core/problem.hh>
#include <hpp/core/reeds-shepp-path.hh>
#include <hpp/core/weighed-distance.hh>
namespace hpp {
namespace core {
......@@ -43,7 +44,7 @@ namespace hpp {
qEnd [i] = q1 [i];
}
// The length corresponding to the non RS DoF
value_type extraL = (*problem().distance()) (q1, qEnd);
value_type extraL = (*weighedDistance_) (q1, qEnd);
ReedsSheppPathPtr_t path =
ReedsSheppPath::create (device_.lock (), q1, q2, extraL,
......@@ -52,7 +53,8 @@ namespace hpp {
}
ReedsShepp::ReedsShepp (const Problem& problem) :
CarLike (problem), weak_ ()
CarLike (problem), weighedDistance_(WeighedDistance::create
(problem.robot())),weak_ ()
{
}
......@@ -60,13 +62,14 @@ namespace hpp {
const value_type turningRadius,
JointPtr_t xyJoint, JointPtr_t rzJoint,
std::vector <JointPtr_t> wheels) :
CarLike (problem, turningRadius, xyJoint, rzJoint, wheels)
CarLike (problem, turningRadius, xyJoint, rzJoint, wheels),
weighedDistance_(WeighedDistance::create(problem.robot()))
{
}
/// Copy constructor
ReedsShepp::ReedsShepp (const ReedsShepp& other) :
CarLike (other)
CarLike (other), weighedDistance_(other.weighedDistance_)
{
}
......
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