From dff9259a55383a5892987f8a3b640a0c0e26cbfc Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 20 Apr 2013 16:48:20 +0200 Subject: digital/io-hub/src/apbirthday: plate loading behaviour --- digital/io-hub/src/apbirthday/strat.hh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'digital/io-hub/src/apbirthday/strat.hh') diff --git a/digital/io-hub/src/apbirthday/strat.hh b/digital/io-hub/src/apbirthday/strat.hh index fb1a8bf3..15c6a45d 100644 --- a/digital/io-hub/src/apbirthday/strat.hh +++ b/digital/io-hub/src/apbirthday/strat.hh @@ -33,6 +33,7 @@ class Strat enum Decision { CANDLES, + PLATE, }; /// Information on a candle decision. struct CandlesDecision @@ -42,14 +43,31 @@ class Strat /// Angle relative to cake to end the movement. uint16_t end_angle; }; + /// Information on a plate decision. + struct PlateDecision + { + /// Should drop plate before. + bool drop; + /// Approach position, where the robot should be before starting + /// approaching. + Position approaching_pos; + /// Loading position, point where to go backward to load the plate. If + /// the point is reached, there is no plate. + vect_t loading_pos; + }; public: /// Return new decision and associated position. - Decision decision (vect_t &pos); + Decision decision (Position &pos); /// Take a decision related to candles, return false to give up candles. bool decision_candles (CandlesDecision &decision, uint16_t robot_angle); + /// Take a decision related to plate. + void decision_plate (PlateDecision &decision); /// Report a failure to apply the previous decision. void failure (); + private: + /// Last plate decision. + PlateDecision plate_decision_; }; #endif // strat_hh -- cgit v1.2.3