From 94ad65245035203845f264f89a05d564b680869d Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Wed, 3 Apr 2013 08:16:40 +0200 Subject: digital/io-hub/src/apbirthday: add move FSM --- digital/io-hub/src/common-cc/obstacles.hh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'digital/io-hub/src/common-cc/obstacles.hh') diff --git a/digital/io-hub/src/common-cc/obstacles.hh b/digital/io-hub/src/common-cc/obstacles.hh index c3d2bc34..486c64b2 100644 --- a/digital/io-hub/src/common-cc/obstacles.hh +++ b/digital/io-hub/src/common-cc/obstacles.hh @@ -44,6 +44,28 @@ class Obstacles /// Return true if there is an obstacle near the robot while going to a /// destination point. bool blocking (const vect_t &robot, const vect_t &dest) const; + public: + /// Estimated obstacle radius. The obstacle may be larger than at the + /// detected edge. + static const int obstacle_radius_mm = 150; + /// Stop distance. Distance under which an obstacle is considered harmful + /// when moving. + static const int stop_mm = 350; + /// Clearance distance. Distance over which an obstacle should be to the + /// side when moving. + /// + /// OK, more explanations: when moving, a rectangle is placed in front of + /// the robot, of length STOP_MM and width 2 * (CLEARANCE_MM + + /// BOT_SIZE_SIDE). If an obstacle is inside this rectangle, it is + /// considered in the way. + /// + /// If the destination point is near (< STOP_MM), this reduce the + /// rectangle length. + /// + /// If the destination is really near (< EPSILON_MM), ignore all this. + static const int clearance_mm = 100; + /// Destination distance near enough so that obstacles could be ignored. + static const int epsilon_mm = 70; private: /// Validity period of a new obstacle. static const int valid_new_ = 125; -- cgit v1.2.3