From 94bddcba62d1390d5aa8e47a6007d890154e202e Mon Sep 17 00:00:00 2001 From: Florent Lamiraux <florent@laas.fr> Date: Tue, 17 Jun 2014 09:53:01 +0200 Subject: [PATCH] Sample between lower bound and upper bound in SampleSE2::sample. This fixes test_fcl_simple. --- include/fcl/math/sampling.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fcl/math/sampling.h b/include/fcl/math/sampling.h index 5ce22767..29a4ce93 100644 --- a/include/fcl/math/sampling.h +++ b/include/fcl/math/sampling.h @@ -184,8 +184,8 @@ public: Vecnf<3> sample() const { Vecnf<3> q; - q[0] = rng.uniformReal(lower_bound[0], lower_bound[1]); - q[1] = rng.uniformReal(lower_bound[1], lower_bound[2]); + q[0] = rng.uniformReal(lower_bound[0], upper_bound[0]); + q[1] = rng.uniformReal(lower_bound[1], upper_bound[1]); q[2] = rng.uniformReal(-boost::math::constants::pi<FCL_REAL>(), boost::math::constants::pi<FCL_REAL>()); -- GitLab