Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e6f1a3debfddb2a6cccaab627266a0ea > files > 151

mrpt-doc-0.9.0-0.5.fc14.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>The MRPT project: CActivMediaRobotBase.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>CActivMediaRobotBase.h</h1><a href="_c_activ_media_robot_base_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* +---------------------------------------------------------------------------+</span>
<a name="l00002"></a>00002 <span class="comment">   |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |</span>
<a name="l00003"></a>00003 <span class="comment">   |                                                                           |</span>
<a name="l00004"></a>00004 <span class="comment">   |                   http://mrpt.sourceforge.net/                            |</span>
<a name="l00005"></a>00005 <span class="comment">   |                                                                           |</span>
<a name="l00006"></a>00006 <span class="comment">   |   Copyright (C) 2005-2010  University of Malaga                           |</span>
<a name="l00007"></a>00007 <span class="comment">   |                                                                           |</span>
<a name="l00008"></a>00008 <span class="comment">   |    This software was written by the Machine Perception and Intelligent    |</span>
<a name="l00009"></a>00009 <span class="comment">   |      Robotics Lab, University of Malaga (Spain).                          |</span>
<a name="l00010"></a>00010 <span class="comment">   |    Contact: Jose-Luis Blanco  &lt;jlblanco@ctima.uma.es&gt;                     |</span>
<a name="l00011"></a>00011 <span class="comment">   |                                                                           |</span>
<a name="l00012"></a>00012 <span class="comment">   |  This file is part of the MRPT project.                                   |</span>
<a name="l00013"></a>00013 <span class="comment">   |                                                                           |</span>
<a name="l00014"></a>00014 <span class="comment">   |     MRPT is free software: you can redistribute it and/or modify          |</span>
<a name="l00015"></a>00015 <span class="comment">   |     it under the terms of the GNU General Public License as published by  |</span>
<a name="l00016"></a>00016 <span class="comment">   |     the Free Software Foundation, either version 3 of the License, or     |</span>
<a name="l00017"></a>00017 <span class="comment">   |     (at your option) any later version.                                   |</span>
<a name="l00018"></a>00018 <span class="comment">   |                                                                           |</span>
<a name="l00019"></a>00019 <span class="comment">   |   MRPT is distributed in the hope that it will be useful,                 |</span>
<a name="l00020"></a>00020 <span class="comment">   |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |</span>
<a name="l00021"></a>00021 <span class="comment">   |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |</span>
<a name="l00022"></a>00022 <span class="comment">   |     GNU General Public License for more details.                          |</span>
<a name="l00023"></a>00023 <span class="comment">   |                                                                           |</span>
<a name="l00024"></a>00024 <span class="comment">   |     You should have received a copy of the GNU General Public License     |</span>
<a name="l00025"></a>00025 <span class="comment">   |     along with MRPT.  If not, see &lt;http://www.gnu.org/licenses/&gt;.         |</span>
<a name="l00026"></a>00026 <span class="comment">   |                                                                           |</span>
<a name="l00027"></a>00027 <span class="comment">   +---------------------------------------------------------------------------+ */</span>
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef CActivMediaRobotBase_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define CActivMediaRobotBase_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;<a class="code" href="_c_generic_sensor_8h.html">mrpt/hwdrivers/CGenericSensor.h</a>&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="hwdrivers_2include_2mrpt_2hwdrivers_2link__pragmas_8h.html">mrpt/hwdrivers/link_pragmas.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="_c_pose2_d_8h.html">mrpt/poses/CPose2D.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="code" href="_c_observation_range_8h.html">mrpt/slam/CObservationRange.h</a>&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;<a class="code" href="_c_joystick_8h.html">mrpt/hwdrivers/CJoystick.h</a>&gt;</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="keyword">namespace </span>mrpt
<a name="l00038"></a><a class="code" href="structmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base_1_1_t_robot_description.html#a531f9673eae9b4f84adb3830e9960f50">00038</a> {
<a name="l00039"></a><a class="code" href="structmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base_1_1_t_robot_description.html#af9df3e373e49117438686725437c850b">00039</a>         <span class="keyword">namespace </span>hwdrivers
<a name="l00040"></a><a class="code" href="structmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base_1_1_t_robot_description.html#a805b1c3af7b3450311db8f361d4bf7d3">00040</a>         {<span class="comment"></span>
<a name="l00041"></a><a class="code" href="structmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base_1_1_t_robot_description.html">00041</a> <span class="comment">                /** This software driver implements the communications (and some rudimentary control) for ActivMedia robotic bases (Pioneer DX/AT, PeopleBot, etc).</span>
<a name="l00042"></a>00042 <span class="comment">                  *  There is implemented access to robot odometry, ticks counts, velocities, battery charge status, and sonar readings, as well as</span>
<a name="l00043"></a>00043 <span class="comment">                  *   basic velocity control.</span>
<a name="l00044"></a>00044 <span class="comment">                  *</span>
<a name="l00045"></a>00045 <span class="comment">                  *  It is required to check MRPT_BUILD_ARIA in the cmake configuration to enable this class to work properly.</span>
<a name="l00046"></a>00046 <span class="comment">                  *</span>
<a name="l00047"></a>00047 <span class="comment">                  *  See also the application &quot;rawlog-grabber&quot; for a ready-to-use application to gather data from the robot base.</span>
<a name="l00048"></a>00048 <span class="comment">                  *  Through that &quot;common sensor interface&quot;, this object can collect these kinds of observations:</span>
<a name="l00049"></a>00049 <span class="comment">                  *    - mrpt::slam::CObservationOdometry : For odometry</span>
<a name="l00050"></a>00050 <span class="comment">                  *    - mrpt::slam::CObservationRange    : For sonars</span>
<a name="l00051"></a>00051 <span class="comment">                  *</span>
<a name="l00052"></a>00052 <span class="comment">                  *  To use this class out of rawlog-grabber, &quot;initialize&quot; must be called to connect to the robot.</span>
<a name="l00053"></a>00053 <span class="comment">                  *  Before that, set the serial port with setSerialPortConfig.</span>
<a name="l00054"></a>00054 <span class="comment">                  *</span>
<a name="l00055"></a>00055 <span class="comment">                  *</span>
<a name="l00056"></a>00056 <span class="comment">                  *</span>
<a name="l00057"></a>00057 <span class="comment">                  *  Example .ini block for rawlog-grabber (format used in &quot;loadConfig&quot;):</span>
<a name="l00058"></a>00058 <span class="comment">                  *</span>
<a name="l00059"></a>00059 <span class="comment">                  *  \code</span>
<a name="l00060"></a>00060 <span class="comment">                  *  PARAMETERS IN THE &quot;.INI&quot;-LIKE CONFIGURATION STRINGS:</span>
<a name="l00061"></a>00061 <span class="comment">                  * -------------------------------------------------------</span>
<a name="l00062"></a>00062 <span class="comment">                  *   [supplied_section_name]</span>
<a name="l00063"></a>00063 <span class="comment">                  *    robotPort_WIN            = COM1</span>
<a name="l00064"></a>00064 <span class="comment">                  *    robotPort_LIN            = /dev/ttyUSB0</span>
<a name="l00065"></a>00065 <span class="comment">                  *    robotBaud                        = 115200</span>
<a name="l00066"></a>00066 <span class="comment">                  *    enableSonars         = 0     ; 0:Disabled (default), 1: Enabled</span>
<a name="l00067"></a>00067 <span class="comment">                  *    capture_rate         = 10.0  ; In Hz, the rate at which sonars &amp; odometry are gathered (default=10Hz)</span>
<a name="l00068"></a>00068 <span class="comment">                  *</span>
<a name="l00069"></a>00069 <span class="comment">                  *    joystick_control         = 0             ; 0:Disabled (default), 1: Enabled</span>
<a name="l00070"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#a18af3de8aab272b138696632410f83e2">00070</a> <span class="comment">                  *    joystick_max_v           = 0.1   ; Max joystick control speed (m/s)</span>
<a name="l00071"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html">00071</a> <span class="comment">                  *        joystick_max_w_degps = 20    ; Max joystick control speed (deg/s)</span>
<a name="l00072"></a>00072 <span class="comment">                  *</span>
<a name="l00073"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#a6ae2710131e6368d4a3eda28dce3953d">00073</a> <span class="comment">                  *  \endcode</span>
<a name="l00074"></a>00074 <span class="comment">                  */</span>
<a name="l00075"></a>00075                 <span class="keyword">class </span><a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html" title="This software driver implements the communications (and some rudimentary control)...">CActivMediaRobotBase</a> : <span class="keyword">public</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_generic_sensor.html" title="A generic interface for a wide-variety of sensors designed to be used in the application...">CGenericSensor</a>
<a name="l00076"></a>00076                 {
<a name="l00077"></a>00077                         <a class="code" href="_c_generic_sensor_8h.html#ab8b72c811c520eb036fa4080d9cd9d1d" title="This declaration must be inserted in all CGenericSensor classes definition, within...">DEFINE_GENERIC_SENSOR</a>(<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html" title="This software driver implements the communications (and some rudimentary control)...">CActivMediaRobotBase</a>)
<a name="l00078"></a>00078                 <span class="keyword">public</span>:
<a name="l00079"></a>00079 <span class="comment"></span>
<a name="l00080"></a>00080 <span class="comment">                        /** A structure describing the robot */</span>
<a name="l00081"></a>00081                         <span class="keyword">struct </span><a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a> TRobotDescription
<a name="l00082"></a>00082                         {
<a name="l00083"></a>00083                                 TRobotDescription(); <span class="comment">//!&lt; Init</span>
<a name="l00084"></a>00084 <span class="comment"></span>                                <span class="keywordtype">size_t</span>  nFrontBumpers;  <span class="comment">//!&lt; Number of front bumpers</span>
<a name="l00085"></a>00085 <span class="comment"></span>                                <span class="keywordtype">size_t</span>  nRearBumpers;   <span class="comment">//!&lt; Number of rear bumpers</span>
<a name="l00086"></a>00086 <span class="comment"></span>                                <span class="keywordtype">size_t</span>  nSonars;                <span class="comment">//!&lt; Number of sonars</span>
<a name="l00087"></a>00087 <span class="comment"></span>                        };
<a name="l00088"></a>00088 
<a name="l00089"></a>00089 <span class="comment"></span>
<a name="l00090"></a>00090 <span class="comment">                        /** Connects to the robot */</span>
<a name="l00091"></a>00091                         <span class="keywordtype">void</span> initialize();
<a name="l00092"></a>00092 <span class="comment"></span>
<a name="l00093"></a>00093 <span class="comment">                        /** Constructor</span>
<a name="l00094"></a>00094 <span class="comment">                          */</span>
<a name="l00095"></a>00095                         <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html" title="This software driver implements the communications (and some rudimentary control)...">CActivMediaRobotBase</a>();
<a name="l00096"></a>00096 <span class="comment"></span>
<a name="l00097"></a>00097 <span class="comment">                        /** Destructor: turns off communications */</span>
<a name="l00098"></a>00098                         <span class="keyword">virtual</span> ~<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html" title="This software driver implements the communications (and some rudimentary control)...">CActivMediaRobotBase</a>();
<a name="l00099"></a>00099 <span class="comment"></span>
<a name="l00100"></a>00100 <span class="comment">                        /** Manually sets the serial port configuration.</span>
<a name="l00101"></a>00101 <span class="comment">                          * \param portName Examples: Windows: &quot;COM1&quot; , Linux: &quot;/dev/ttyUSB0&quot;</span>
<a name="l00102"></a>00102 <span class="comment">                          * \param portBaudRate 9600, 115200, etc..</span>
<a name="l00103"></a>00103 <span class="comment">                          * \sa loadConfig</span>
<a name="l00104"></a>00104 <span class="comment">                          */</span>
<a name="l00105"></a>00105                         <span class="keywordtype">void</span>  setSerialPortConfig(
<a name="l00106"></a>00106                                 <span class="keyword">const</span> std::string  &amp;portName,
<a name="l00107"></a>00107                                 <span class="keywordtype">int</span>             portBaudRate );
<a name="l00108"></a>00108 <span class="comment"></span>
<a name="l00109"></a>00109 <span class="comment">                        /** Returns the current value of the serial port */</span>
<a name="l00110"></a>00110                         std::string getSerialPort()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_com_port; }
<a name="l00111"></a>00111 <span class="comment"></span>
<a name="l00112"></a>00112 <span class="comment">                        /** Returns the current value of the serial port baudrate */</span>
<a name="l00113"></a>00113                         <span class="keywordtype">int</span> getSerialPortBaudRate()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_robotBaud; }
<a name="l00114"></a>00114 
<a name="l00115"></a>00115 <span class="comment"></span>
<a name="l00116"></a>00116 <span class="comment">                        /** Collect odometry readings and put them in the &quot;observations&quot; queue: DO NOT call this normally, it&#39;s useful only for the application rawloggrabber.</span>
<a name="l00117"></a>00117 <span class="comment">                          */</span>
<a name="l00118"></a>00118                         <span class="keywordtype">void</span> doProcess();
<a name="l00119"></a>00119 <span class="comment"></span>
<a name="l00120"></a>00120 <span class="comment">                        /** Change the current robot odometry pose</span>
<a name="l00121"></a>00121 <span class="comment">                          */</span>
<a name="l00122"></a>00122                         <span class="keywordtype">void</span> changeOdometry(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose2_d.html" title="A class used to store a 2D pose.">mrpt::poses::CPose2D</a> &amp;newOdometry);
<a name="l00123"></a>00123 <span class="comment"></span>
<a name="l00124"></a>00124 <span class="comment">                        /** Get the current robot&#39;s odometry</span>
<a name="l00125"></a>00125 <span class="comment">                          * \param out_odom The odometry will be returned here.</span>
<a name="l00126"></a>00126 <span class="comment">                          * \sa getOdometryFull, getOdometryIncrement</span>
<a name="l00127"></a>00127 <span class="comment">                          */</span>
<a name="l00128"></a>00128                         <span class="keywordtype">void</span> getOdometry(<a class="code" href="classmrpt_1_1poses_1_1_c_pose2_d.html" title="A class used to store a 2D pose.">poses::CPose2D</a> &amp;out_odom);
<a name="l00129"></a>00129 <span class="comment"></span>
<a name="l00130"></a>00130 <span class="comment">                        /** Get the current robot&#39;s odometry</span>
<a name="l00131"></a>00131 <span class="comment">                          * \param out_odom The odometry will be returned here.</span>
<a name="l00132"></a>00132 <span class="comment">                          * \param out_lin_vel The linear speed, in m/s, positive is forward.</span>
<a name="l00133"></a>00133 <span class="comment">                          * \param out_ang_vel The angular speed, in rad/s, positive is anticlockwise.</span>
<a name="l00134"></a>00134 <span class="comment">                          * \param out_left_encoder_ticks The current overall count of ticks for the left wheel encoder.</span>
<a name="l00135"></a>00135 <span class="comment">                          * \param out_right_encoder_ticks The current overall count of ticks for the right wheel encoder.</span>
<a name="l00136"></a>00136 <span class="comment">                          * \sa getOdometry, getOdometryIncrement</span>
<a name="l00137"></a>00137 <span class="comment">                          */</span>
<a name="l00138"></a>00138                         <span class="keywordtype">void</span> getOdometryFull(
<a name="l00139"></a>00139                                 <a class="code" href="classmrpt_1_1poses_1_1_c_pose2_d.html" title="A class used to store a 2D pose.">poses::CPose2D</a>  &amp;out_odom,
<a name="l00140"></a>00140                                 <span class="keywordtype">double</span>                  &amp;out_lin_vel,
<a name="l00141"></a>00141                                 <span class="keywordtype">double</span>                  &amp;out_ang_vel,
<a name="l00142"></a>00142                                 int64_t                 &amp;out_left_encoder_ticks,
<a name="l00143"></a>00143                                 int64_t                 &amp;out_right_encoder_ticks
<a name="l00144"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#a735a0aab4c2910c98a724abbf28a9bda">00144</a>                                 );
<a name="l00145"></a>00145 <span class="comment"></span>
<a name="l00146"></a>00146 <span class="comment">                        /** Get the robot&#39;s odometry increment since the last call to this method (the first time the increments are always fixed to zero).</span>
<a name="l00147"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#af71054440e57cdb3b0f04d5dcc4dfc92">00147</a> <span class="comment">                          * \param out_odom The odometry increment.</span>
<a name="l00148"></a>00148 <span class="comment">                          * \param out_lin_vel The current linear speed, in m/s, positive is forward (Absolute values, not increments)</span>
<a name="l00149"></a>00149 <span class="comment">                          * \param out_ang_vel The angular speed, in rad/s, positive is anticlockwise  (Absolute values, not increments).</span>
<a name="l00150"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#acb026dec816f34cfa885b6be2d370edd">00150</a> <span class="comment">                          * \param out_left_encoder_ticks The increment in ticks for the left wheel encoder.</span>
<a name="l00151"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#abca15155fe7176aedaf278367af81e4c">00151</a> <span class="comment">                          * \param out_right_encoder_ticks The increment in ticks for the right wheel encoder.</span>
<a name="l00152"></a>00152 <span class="comment">                          * \sa getOdometry, getOdometryFull</span>
<a name="l00153"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#adf151afb9e0461cc1967eed3c4340f70">00153</a> <span class="comment">                          */</span>
<a name="l00154"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#ac6c6b5249d27991c238c5c69fa8337da">00154</a>                         <span class="keywordtype">void</span> getOdometryIncrement(
<a name="l00155"></a>00155                                 <a class="code" href="classmrpt_1_1poses_1_1_c_pose2_d.html" title="A class used to store a 2D pose.">poses::CPose2D</a>  &amp;out_incr_odom,
<a name="l00156"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#a6464aec511d89ad703ec072ecf5e0c9a">00156</a>                                 <span class="keywordtype">double</span>                  &amp;out_lin_vel,
<a name="l00157"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#abb28af6b037d0f65c0f2a08187707448">00157</a>                                 <span class="keywordtype">double</span>                  &amp;out_ang_vel,
<a name="l00158"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#a9947c548116acd08ef95bbfac03298d8">00158</a>                                 int64_t                 &amp;out_incr_left_encoder_ticks,
<a name="l00159"></a>00159                                 int64_t                 &amp;out_incr_right_encoder_ticks
<a name="l00160"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#ae83316aae98324cfea62d4a2af48b964">00160</a>                                 );
<a name="l00161"></a>00161 <span class="comment"></span>
<a name="l00162"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#aa25f9791eb1e82059bedec25fb81aa00">00162</a> <span class="comment">                        /** Get the readings from the sonars, only if the observations are new.</span>
<a name="l00163"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#a0b15eac7bbceeb67ca88e14b74c8ff73">00163</a> <span class="comment">                          */</span>
<a name="l00164"></a>00164                         <span class="keywordtype">void</span> getSonarsReadings( <span class="keywordtype">bool</span> &amp;thereIsObservation, <a class="code" href="classmrpt_1_1slam_1_1_c_observation_range.html" title="Declares a class derived from &amp;quot;CObservation&amp;quot; that encapsules a single range...">mrpt::slam::CObservationRange</a> &amp;obs );
<a name="l00165"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#a44ea0e8a98d5820034bd22996fa65d0e">00165</a> <span class="comment"></span>
<a name="l00166"></a>00166 <span class="comment">                        /** Get the robot battery charge */</span>
<a name="l00167"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#aad4e5555e7188fcdef33d60db294f138">00167</a>                         <span class="keywordtype">void</span> getBatteryCharge( <span class="keywordtype">double</span> &amp;out_batery_volts );
<a name="l00168"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base.html#a88aa6698022863c91537b228aadb7206">00168</a> <span class="comment"></span>
<a name="l00169"></a>00169 <span class="comment">                        /** Set the robot linear and angular velocities</span>
<a name="l00170"></a>00170 <span class="comment">                          * \param lin_vel Linear speed, in m/s.</span>
<a name="l00171"></a>00171 <span class="comment">                          * \param ang_vel Angular speed, in rad/s.</span>
<a name="l00172"></a>00172 <span class="comment">                          */</span>
<a name="l00173"></a>00173                         <span class="keywordtype">void</span> setVelocities( <span class="keyword">const</span> <span class="keywordtype">double</span> lin_vel, <span class="keyword">const</span> <span class="keywordtype">double</span> ang_vel);
<a name="l00174"></a>00174 
<a name="l00175"></a>00175                         <span class="keywordtype">void</span> enableSonars();    <span class="comment">//!&lt; Enable sonars</span>
<a name="l00176"></a>00176 <span class="comment"></span>                        <span class="keywordtype">void</span> disableSonars();   <span class="comment">//!&lt; Disable sonars</span>
<a name="l00177"></a>00177 <span class="comment"></span>
<a name="l00178"></a>00178 
<a name="l00179"></a>00179                         <span class="keywordtype">void</span> getBumpers(<a class="code" href="namespacemrpt.html#a9fdb3cc3f73c5190fa022f858efbe6b1" title="A type for passing a vector of bools.">vector_bool</a> &amp;bumper_state); <span class="comment">//!&lt; Get state of bumpers: at output, the vector will be resized to the number of bumpers, and elements with &quot;true&quot; means bumper is pressed.</span>
<a name="l00180"></a>00180 <span class="comment"></span>
<a name="l00181"></a>00181                         <span class="keywordtype">void</span> getRobotInformation(<a class="code" href="structmrpt_1_1hwdrivers_1_1_c_activ_media_robot_base_1_1_t_robot_description.html" title="A structure describing the robot.">TRobotDescription</a> &amp;info); <span class="comment">//!&lt; Get information about the robot and its sensors</span>
<a name="l00182"></a>00182 <span class="comment"></span><span class="comment"></span>
<a name="l00183"></a>00183 <span class="comment">                        /** Enable/disable manual control of the robot with a Joystick */</span>
<a name="l00184"></a>00184                         <span class="keywordtype">void</span> enableJoystickControl(<span class="keywordtype">bool</span> enable=<span class="keyword">true</span>) { m_enableJoyControl = enable; } 
<a name="l00185"></a>00185 <span class="comment"></span>
<a name="l00186"></a>00186 <span class="comment">                        /** Get state of manual control with a joystick */</span>
<a name="l00187"></a>00187                         <span class="keywordtype">bool</span> isJoystickControlEnabled()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_enableJoyControl;}
<a name="l00188"></a>00188 
<a name="l00189"></a>00189                 <span class="keyword">protected</span>:
<a name="l00190"></a>00190                         std::string             m_com_port;             <span class="comment">//!&lt; The serial port name to use for communications (COM1, ttyS1,...)</span>
<a name="l00191"></a>00191 <span class="comment"></span>                        <span class="keywordtype">int</span>                             m_robotBaud;    <span class="comment">//!&lt; The bauds for ARIA communications to the robot.</span>
<a name="l00192"></a>00192 <span class="comment"></span>
<a name="l00193"></a>00193                         <span class="keywordtype">bool</span>                    m_firstIncreOdometry;   <span class="comment">//!&lt; Used in getOdometryIncrement</span>
<a name="l00194"></a>00194 <span class="comment"></span>                        <span class="keywordtype">bool</span>                    m_enableSonars;
<a name="l00195"></a>00195 
<a name="l00196"></a>00196                         <span class="keywordtype">void</span>* <span class="comment">/*ArRobot*/</span>                               m_robot;
<a name="l00197"></a>00197                         <span class="keywordtype">void</span>* <span class="comment">/*ArSonarDevice*/</span>                 m_sonarDev;
<a name="l00198"></a>00198                         <span class="keywordtype">void</span>* <span class="comment">/*ArSimpleConnector* */</span>   m_simpleConnector;      <span class="comment">//!&lt; The connection to the robot</span>
<a name="l00199"></a>00199 <span class="comment"></span>
<a name="l00200"></a>00200                         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    m_lastTimeSonars;
<a name="l00201"></a>00201 
<a name="l00202"></a>00202                         <span class="keywordtype">bool</span>            m_enableJoyControl; <span class="comment">//!&lt; For use with rawlog-grabber</span>
<a name="l00203"></a>00203 <span class="comment"></span>                        <span class="keywordtype">float</span>           m_joy_max_v, m_joy_max_w;
<a name="l00204"></a>00204 
<a name="l00205"></a>00205                         CJoystick       m_joystick;                     <span class="comment">//!&lt; The joystick opened at first usage.</span>
<a name="l00206"></a>00206 <span class="comment"></span>
<a name="l00207"></a>00207                         <a class="code" href="namespacemrpt_1_1system.html#a42674286d8d56afea013b6329bb7327a" title="A system independent time type, it holds the the number of 100-nanosecond intervals...">mrpt::system::TTimeStamp</a>  m_last_do_process;
<a name="l00208"></a>00208                         <span class="keywordtype">double</span>          m_capture_rate;  <span class="comment">//!&lt; In Hz, the rate at which sonars &amp; odometry are gathered (default=10Hz)</span>
<a name="l00209"></a>00209 <span class="comment"></span>
<a name="l00210"></a>00210 
<a name="l00211"></a>00211                         <span class="keywordtype">void</span> disconnectAndDisableMotors();
<a name="l00212"></a>00212                         <span class="keywordtype">void</span> connectAndEnableMotors();
<a name="l00213"></a>00213 <span class="comment"></span>
<a name="l00214"></a>00214 <span class="comment">                        /** Loads specific configuration for the device from a given source of configuration parameters, for example, an &quot;.ini&quot; file, loading from the section &quot;[iniSection]&quot; (see utils::CConfigFileBase and derived classes)</span>
<a name="l00215"></a>00215 <span class="comment">                          *  See hwdrivers::CActivMediaRobotBase for the possible parameters</span>
<a name="l00216"></a>00216 <span class="comment">                          * \sa setSerialPortConfig</span>
<a name="l00217"></a>00217 <span class="comment">                          */</span>
<a name="l00218"></a>00218                         <span class="keywordtype">void</span>  loadConfig_sensorSpecific(
<a name="l00219"></a>00219                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_config_file_base.html" title="This class allows loading and storing values and vectors of different types from...">mrpt::utils::CConfigFileBase</a> &amp;configSource,
<a name="l00220"></a>00220                                 <span class="keyword">const</span> std::string         &amp;iniSection );
<a name="l00221"></a>00221 
<a name="l00222"></a>00222 
<a name="l00223"></a>00223                 };      <span class="comment">// End of class</span>
<a name="l00224"></a>00224 
<a name="l00225"></a>00225         } <span class="comment">// End of namespace</span>
<a name="l00226"></a>00226 } <span class="comment">// End of namespace</span>
<a name="l00227"></a>00227 <span class="preprocessor">#endif</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.6.2-20100208</a> for MRPT 0.9.0 SVN: at Wed Jul 14 12:48:09 UTC 2010</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table> </body></html>