From 3bea178fdc550e0e8a9103d9cb3eb62016077282 Mon Sep 17 00:00:00 2001 From: Olivier Lanneluc Date: Fri, 3 May 2013 16:00:24 +0200 Subject: digital/io-hub/src/common-cc: remove one navigation point around the cake And clean up the declaration for better understanding, since half of the navigation points around the cake are out of the playground. --- digital/io-hub/src/common-cc/path.cc | 4 ++-- digital/io-hub/src/common-cc/path.hh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'digital/io-hub/src/common-cc') diff --git a/digital/io-hub/src/common-cc/path.cc b/digital/io-hub/src/common-cc/path.cc index 86f79e95..463daca5 100644 --- a/digital/io-hub/src/common-cc/path.cc +++ b/digital/io-hub/src/common-cc/path.cc @@ -93,7 +93,7 @@ void Path::reset() /* Declare the cake as an obstacle */ add_obstacle( pg_cake_pos, pg_cake_radius, - PATH_CAKE_NAVPOINTS_NB, + PATH_CAKE_NAVPOINTS_NB * 2 /* only half the navpoints are on the playground */, PATH_CAKE_NAVPOINTS_LAYERS, 0 /* no extra clearance radius */, true /*target the center is allowed*/); @@ -137,7 +137,7 @@ void Path::add_obstacle( const vect_t &c, /* Extend the points radius to allow the robot to go */ /* from one to another without collision with the */ /* obstacle circle. New radius is r / cos(angle/2) */ - x = fixed_div_f824(r, rot_c) + 2 /* margin for the unprecise fixed point computation */; + x = fixed_div_f824(r, rot_c) + 3 /* margin for the unprecise fixed point computation */; y = 0; /* Add a number of sets of navigation points with different weights */ diff --git a/digital/io-hub/src/common-cc/path.hh b/digital/io-hub/src/common-cc/path.hh index 28b5a8d8..74a8a382 100644 --- a/digital/io-hub/src/common-cc/path.hh +++ b/digital/io-hub/src/common-cc/path.hh @@ -91,8 +91,8 @@ class Path /** Number of points per standard obstacle. */ static const int PATH_OBSTACLES_NAVPOINTS_NB = 12; #ifdef playground_2013_hh - /** Number of points for the cake */ - static const int PATH_CAKE_NAVPOINTS_NB = 14; + /** Number of points for the cake (plus 1) */ + static const int PATH_CAKE_NAVPOINTS_NB = 6; #endif /** Number of navigation points layers for the cake. */ static const int PATH_CAKE_NAVPOINTS_LAYERS = 1; -- cgit v1.2.3