00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2009 University of Malaga | 00007 | | 00008 | This software was written by the Perception and Robotics | 00009 | research group, University of Malaga (Spain). | 00010 | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> | 00011 | | 00012 | This file is part of the MRPT project. | 00013 | | 00014 | MRPT is free software: you can redistribute it and/or modify | 00015 | it under the terms of the GNU General Public License as published by | 00016 | the Free Software Foundation, either version 3 of the License, or | 00017 | (at your option) any later version. | 00018 | | 00019 | MRPT is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00022 | GNU General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU General Public License | 00025 | along with MRPT. If not, see <http://www.gnu.org/licenses/>. | 00026 | | 00027 +---------------------------------------------------------------------------+ */ 00028 #ifndef CBoardSonars_H 00029 #define CBoardSonars_H 00030 00031 #include <mrpt/hwdrivers/CInterfaceFTDIMessages.h> 00032 #include <mrpt/synch.h> 00033 #include <mrpt/utils/CDebugOutputCapable.h> 00034 #include <mrpt/utils/CConfigFileBase.h> 00035 #include <mrpt/slam/CObservationRange.h> 00036 00037 namespace mrpt 00038 { 00039 namespace hwdrivers 00040 { 00069 class HWDLLIMPEXP CBoardSonars : public hwdrivers::CInterfaceFTDIMessages 00070 { 00071 protected: 00074 std::string m_usbSerialNumber; 00075 00078 uint8_t m_gain; 00079 00082 float m_maxRange; 00083 00087 std::vector<int32_t> m_firingOrder; 00088 00091 float m_minTimeBetweenPings; 00092 00096 bool checkConnectionAndConnect(); 00097 00101 bool sendConfigCommands(); 00102 00103 public: 00106 CBoardSonars(); 00107 00110 ~CBoardSonars(){} 00111 00116 void loadConfig( const mrpt::utils::CConfigFileBase *configSource, 00117 const std::string &iniSection ); 00118 00122 bool queryFirmwareVersion( std::string &out_firmwareVersion ); 00123 00127 bool getObservation( mrpt::slam::CObservationRange &obs ); 00128 00133 bool programI2CAddress( uint8_t currentAddress, uint8_t newAddress ); 00134 00135 }; // End of class 00136 } // End of namespace 00137 } // End of namespace 00138 00139 00140 #endif
Page generated by Doxygen 1.5.7.1 for MRPT 0.6.5 SVN: at Mon Feb 23 13:35:09 EST 2009 |