Skip to content
Snippets Groups Projects
Commit 667cc813 authored by andreucm's avatar andreucm
Browse files

Working copy on stabilizing API for line/corner finders

parent 15fcdb01
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -13,5 +13,16 @@ CornerFinder::~CornerFinder()
}
int CornerFinder::findCorners( const Eigen::MatrixXs & _points, std::list<laserscanutils::CornerPoint> & _corner_list) const
{
//to be implemented by inherited class
return -1;
}
int CornerFinder::findCorners( const std::list<laserscanutils::LineSegment> & _lines, std::list<laserscanutils::CornerPoint> & _corner_list) const
{
//TODO
}
}//namespace
......@@ -5,6 +5,7 @@
#include "laser_scan_utils.h"
//#include "laser_scan.h"
#include "corner_point.h"
#include "line_segment.h"
//std
#include <list>
......@@ -35,9 +36,9 @@ class CornerFinder
**/
~CornerFinder();
/** \brief Find corners. Pure virtual. To be implemented by each inherited class
/** \brief Find corners from points. To be implemented by each inherited class.
*
* Find corners from a set of scans.
* Find corners from a set of points.
* Returns corners as a std::list<CornerPoint>
*
* \Requires:
......@@ -47,12 +48,30 @@ class CornerFinder
* \param _corner_list set of corners extracted from _points
* \return Number of corners extracted, or -1 if some error
*
* \note Not pure virtual to allow instantation of this class
*
*/
virtual int findCorners( const Eigen::MatrixXs & _points,
std::list<laserscanutils::CornerPoint> & _corner_list) const = 0;
std::list<laserscanutils::CornerPoint> & _corner_list) const;
// virtual int findCorners(const laserscanutils::LaserScan & _scan,
// std::list<laserscanutils::CornerPoint> & _corner_list) = 0;
/** \brief Find corners from lines.
*
* Find corners from a set of lines.
* Returns corners as a std::list<CornerPoint>
*
* \Requires:
* \param _lines: List of input lines
*
* \Provides:
* \param _corner_list set of corners extracted from _lines
* \return Number of corners extracted, or -1 if some error
*
*/
virtual int findCorners( const std::list<laserscanutils::LineSegment> & _lines,
std::list<laserscanutils::CornerPoint> & _corner_list) const;
/** \brief Print things
*
* Print things about this class
......
......@@ -57,7 +57,7 @@ unsigned int LineFinderIterative::findLines( const Eigen::MatrixXs & _points, st
//split _points into two subsets and call findLines again for each one, if enough points in the subset
if ( max_ii >= ilf_params_.min_supports_ )
{
this->findLines(_points.block(0,0,3,max_ii), _line_list);
this->findLines(_points.block(0,0,3,max_ii+1), _line_list);
}
if ( _points.cols()-max_ii >= ilf_params_.min_supports_ )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment