From 4515445795af425fa91920a28ec3f3108f0fa83e Mon Sep 17 00:00:00 2001 From: Jérôme Jutteau Date: Sat, 28 May 2011 18:36:26 +0200 Subject: digital/io-hub: add function to get position from element id This is useful to indicate an angle when we want to approach an element the green zone. --- digital/io-hub/src/robospierre/element.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'digital/io-hub/src/robospierre/element.h') diff --git a/digital/io-hub/src/robospierre/element.h b/digital/io-hub/src/robospierre/element.h index fbe3bee5..4655c3c1 100644 --- a/digital/io-hub/src/robospierre/element.h +++ b/digital/io-hub/src/robospierre/element.h @@ -160,4 +160,13 @@ element_intersec_symetric (uint8_t element_id, uint8_t element_type); uint8_t element_nearest_element_id (position_t robot_pos); +/** + Give the position where the robot need to be placed to get an element. + The position correspond to the emplacement of the element with an angle of + zero. If the element is in the green zone, the returned position include + the angle the robot need to set before moving to the element. + */ +position_t +element_get_pos (uint8_t element_id); + #endif /* element_h */ -- cgit v1.2.3