From 33a67790aa0df5a0461dc3c5425d5c2a14d282b8 Mon Sep 17 00:00:00 2001 From: Olivier Lanneluc Date: Thu, 25 Apr 2013 20:27:40 +0200 Subject: digital/io-hub/src/common-cc: enlarge the obstacles clearance radius --- digital/io-hub/src/common-cc/path.hh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'digital/io-hub/src/common-cc/path.hh') diff --git a/digital/io-hub/src/common-cc/path.hh b/digital/io-hub/src/common-cc/path.hh index 8003f32b..e683b83a 100644 --- a/digital/io-hub/src/common-cc/path.hh +++ b/digital/io-hub/src/common-cc/path.hh @@ -73,30 +73,32 @@ class Path private: /** Add an obstacle on the field */ - void add_obstacle(const vect_t &c, uint16_t r, const int nodes); + void add_obstacle(const vect_t &c, uint16_t r, const int nodes, const int nlayers, const uint16_t clearance); /** Number of possible obstacles. */ static const int PATH_OBSTACLES_NB = (4+1/*cake*/); /** Number of points per standard obstacle. */ - static const int PATH_OBSTACLES_NAVPOINTS_NB = 8; + 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; #endif /** Number of reserved points for the 2 endpoints */ static const int PATH_RESERVED_NAVPOINTS_NB = 2; + /** Number of navigation points layers for the cake. */ + static const int PATH_CAKE_NAVPOINTS_LAYERS = 1; /** Number of navigation points layers for each obstacle. */ - static const int PATH_NAVPOINTS_LAYERS = 2; + static const int PATH_OBSTACLES_NAVPOINTS_LAYERS = 2; /** Number of navigation points. */ static const int PATH_NAVPOINTS_NB = (PATH_RESERVED_NAVPOINTS_NB + #ifdef playground_2013_hh - PATH_NAVPOINTS_LAYERS * (PATH_CAKE_NAVPOINTS_NB - PATH_OBSTACLES_NAVPOINTS_NB) + + PATH_CAKE_NAVPOINTS_LAYERS * (PATH_CAKE_NAVPOINTS_NB - PATH_OBSTACLES_NAVPOINTS_NB) + #endif - PATH_NAVPOINTS_LAYERS * (PATH_OBSTACLES_NB * PATH_OBSTACLES_NAVPOINTS_NB)); + PATH_OBSTACLES_NAVPOINTS_LAYERS * (PATH_OBSTACLES_NB * PATH_OBSTACLES_NAVPOINTS_NB)); /** Navigation points weight precision (2^-n). */ static const int PATH_WEIGHT_PRECISION = 4; /** Navigation points weight step (2^-n). */ - static const int PATH_WEIGHT_STEP = 5; + static const int PATH_WEIGHT_STEP = 6; /** Borders, any point outside borders is eliminated. */ const uint16_t border_xmin, border_ymin, border_xmax, border_ymax; -- cgit v1.2.3