INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

polefinder.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef POLE_FINDER_H
00012 #define POLE_FINDER_H
00013 
00014 #include <vector>
00015 #include <string>
00016 #include <hydroscanutil/scanutil.h>
00017 
00018 namespace hydrolfextract {
00019 
00020     // The pole goes from from startI to endI inclusive,
00021     // where startI and endI are indices into the scan
00022     struct Pole
00023     {
00024         Pole() {}
00025         Pole( int startI, int endI, double range, double bearing, double width )
00026             { 
00027                 this->startI = startI; this->endI = endI; 
00028                 this->range=range; this->bearing=bearing; 
00029                 this->width=width; 
00030             }
00031         int    startI;
00032         int    endI;
00033         double range;
00034         double bearing;
00035         double width;
00036     };
00037     std::string toString( const Pole &p );
00038 
00039     //
00040     // \author Alex Brooks
00041     //
00042     // \brief Finds poles.
00043     //
00044     // The actual locations of the poles are returned in the 'poles' array
00045     // (should already have space allocated to it).
00046     //
00047     // Other parameters are:
00048     //   max_laser_range (obvious)
00049     //   min_width (to be declared a pole) [m]
00050     //   max_width (to be declared a pole) [m]
00051     //   min_distance_to_background: minimum distance of the 'pole' from the
00052     //     background [m]
00053     //
00054     //     ie for a laser scan looking like:
00055     //
00056     //     -      -----  -----
00057     //     |          |  |
00058     //    x|          |  |       Require: x >= min_distance_to_background
00059     //     |          |  |                min_width < y < max_width
00060     //     -          ----                to declare this a pole.
00061     //
00062     //                |--|
00063     //                 y
00064     //
00065     std::vector<Pole> detectPoles( const std::vector<float> &ranges,
00066                                    const hydroscanutil::ScannerConfig &scannerCfg,
00067                                    double min_width,
00068                                    double max_width,
00069                                    double min_distance_to_background,
00070                                    bool debug=false );
00071 }
00072 
00073 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5