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 00029 #ifndef CRoboticHeadInterface_H 00030 #define CRoboticHeadInterface_H 00031 00032 #include <mrpt/hwdrivers/CInterfaceFTDI.h> 00033 #include <mrpt/hwdrivers/CInterfaceFTDIMessages.h> 00034 #include <mrpt/utils/CMRPTMessage.h> 00035 #include <mrpt/synch.h> 00036 #include <mrpt/math/CMatrixTemplate.h> 00037 #include <mrpt/utils/CDebugOutputCapable.h> 00038 #include <mrpt/utils/CConfigFileBase.h> 00039 #include <mrpt/slam/CObservationRange.h> 00040 00041 00042 namespace mrpt 00043 { 00044 namespace hwdrivers 00045 { 00046 using namespace mrpt::math; 00047 00067 class HWDLLIMPEXP CRoboticHeadInterface : public mrpt::utils::CDebugOutputCapable 00068 { 00069 private: 00070 CInterfaceFTDIMessages m_usbConnection; 00071 utils::CMRPTMessage msg; 00072 std::string m_serialNumber; 00073 std::vector<int32_t> gain; 00074 int head_yaw, head_pitch; 00075 00076 bool checkControllerIsConnected(); 00077 00078 public: 00081 CRoboticHeadInterface(); 00082 00085 ~CRoboticHeadInterface(){} 00086 00091 void loadConfig( const mrpt::utils::CConfigFileBase *configSource, 00092 const std::string &iniSection ); 00093 00096 void setDeviceSerialNumber(const std::string &deviceSerialNumber) 00097 { 00098 m_serialNumber = deviceSerialNumber; 00099 } 00100 00103 void GetGain(int &_gain,int &channel); 00104 00108 bool SetGain(int &new_gain,int &channel); 00109 00117 void GetSoundLocation(int &ang); 00118 00122 void Get3SoundBuffer(CMatrixTemplate<int> &buf); 00123 00130 void SetHeadPose(int &yaw, int &pitch); 00131 00132 //TO DO --> Funciones del acelerĂ³metro 00133 // Movimientos faciales 00134 00135 }; // End of class 00136 00137 } // End of namespace 00138 } // end of namespace 00139 00140 #endif 00141
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:14:51 EST 2009 |