summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub
diff options
context:
space:
mode:
authorOlivier Lanneluc2013-05-03 16:00:24 +0200
committerNicolas Schodet2013-05-03 23:07:15 +0200
commit3bea178fdc550e0e8a9103d9cb3eb62016077282 (patch)
tree20dafe7fe4c374f83728409957e96f9a9c6d62cb /digital/io-hub
parente652a4f28f9eb0121a589ae41d02fe1f79feb4d6 (diff)
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.
Diffstat (limited to 'digital/io-hub')
-rw-r--r--digital/io-hub/src/common-cc/path.cc4
-rw-r--r--digital/io-hub/src/common-cc/path.hh4
2 files changed, 4 insertions, 4 deletions
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;