//* Line extraction from the robot sensors - 9/24/2010 2:09AM *

#ifndef _NAV_ROBOT2LINES #define _NAV_ROBOT2LINES #include "../Aria/include/Aria.h" #include "nav_geometry.h" /* Estimate one line using least sqare approximation from points visible from the robot at given range of angles This may be computationally constly as ArMath::atan2 is called on each point to calcualte its relative location */ void NAV_FindLine(const ArPose& RP, const std::vector<ArPoseWithTime>* ECHOS, double anglefrom, double angleto, NAV_Line &line); void NAV_FindCurrentLine(const ArPose& RP, ArRangeDevice& S, double anglefrom, double angleto, NAV_Line &line); void NAV_FindCumulativeLine(const ArPose& RP, ArRangeDevice& S, double anglefrom, double angleto, NAV_Line &line); /* Estimate several lines using least sqare approximation from points visible from the robot in predefined directions This algorithms attempts to decrease computations by avoiding use of ArMath::atan2 and doing the position classification only once per point. Pass NULL pointers to lines that you do not want to have computed for you. */ void NAV_FindLines(const ArPose& RP, const std::vector<ArPoseWithTime>* ECHOS, NAV_Line* left, NAV_Line* right, NAV_Line* ahead, NAV_Line* back = NULL, NAV_Line* frontleft = NULL, NAV_Line* frontright = NULL ); void NAV_FindCurrentLines(const ArPose& RP, ArRangeDevice& S, NAV_Line* left, NAV_Line* right, NAV_Line* ahead, NAV_Line* back = NULL, NAV_Line* frontleft = NULL, NAV_Line* frontright = NULL ); void NAV_FindCumulativeLines(const ArPose& RP, ArRangeDevice& S, NAV_Line* left, NAV_Line* right, NAV_Line* ahead, NAV_Line* back = NULL, NAV_Line* frontleft = NULL, NAV_Line* frontright = NULL ); #endif