<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <!-- $Id: header.html 8799 2010-06-28 04:12:42Z jpgr87 $ --> <HEAD> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=utf-8"> <meta name="keywords" content="stage, robot, simulation, player, player/stage"> <link href="doxygen.css" rel="stylesheet" type="text/css"> <style type="text/css"> .floatright { float: right; margin: 0 0 1em 1em; } body { font-family: sans-serif; #font-family: Geneva, Verdana, Helvetica, Arial, sans-serif; background-color: #FFF; color:#000; } a:link { color: #A00; } a:visited { color: #800; } a { text-decoration: none; } a:hover { text-decoration: underline; } .timestamp { text-align:right; background-color: #DDD; font-size:75%;} h1 { font-size:160%; } h2 { font-size:110%; #color: #FFF; #background-color: #666; #padding:3px; } h3 { text-align:left; } img { border: 0; } ul.menu { position:relative; left:-2.5em; margin-bottom:0px; margin-top:0px; } ul.menu1 { position:relative; left:-2.1em; margin-bottom:0px; margin-top:0px; } li.menu { list-style-type: none; position:relative; #left:-0.5em; } #sidebar { position: absolute; left:0px; padding:2em; top:0em; width:12em;} #content { position: absolute; left:12em; top:0em; padding-left:3em; padding-right:3em; padding-bottom:2em; margin-top:1em; margin-right:2em; } div.box { background-color:#EEE; border: 1px solid #000; padding: 0.5ex 0.4em 0.5ex 0.6em; margin:1em; } div.title { font-weight:bold; background-color:#eee; margin-bottom:2px;} div.topbar { position: absolute; top:0px; left:9em; margin:1em; } </style> <TITLE>Player Manual</TITLE> </HEAD> <body> <div id="sidebar"> <h2 style="text-align:center;"> <a href="index.html"> <img width=140 src="http://playerstage.sourceforge.net/images/player_button_v3.png" alt="Player logo"><br></a> </h2> <div class="box"> <div class=title>Player</div> <ul class=menu> <li class=menu><a href="index.html">Frontpage</a> <li class=menu><a href="modules.html">Contents</a> </ul> </div> <div class="box"> <div class=title>User</div> <ul class=menu> <li class=menu><a href="install.html">Installation</a> <li class=menu><a href="start.html">Quick start</a> <li class=menu><a href="supported_hardware.html">Supported devices</a> <li class=menu><a href="group__tutorials.html">Tutorials</a> <li class=menu><a href="group__utils.html">Utilities</a> <li class=menu><a href="group__clientlibs.html">Client libraries</a> <li class=menu><a href="http://playerstage.sourceforge.net/wiki/Basic_FAQ">FAQ</a> <li class=menu><a href="help.html">Help</a> </ul> </div> <div class=box> <div class="title">Developer</div> <ul class=menu> <li class=menu><a href="architecture.html">Architecture</a> <li class=menu><a href="group__libplayercore.html">libplayercore</a> <ul class=menu1> <li class=menu><a href="group__interfaces.html">interfaces</a></li> </ul> <li class=menu><a href="group__libplayerdrivers.html">libplayerdrivers</a> <ul class=menu1> <li class=menu><a href="group__drivers.html">drivers</a></li> </ul> <li class=menu><a href="group__libplayercommon.html">libplayercommon</a> <li class=menu><a href="group__libplayerutils.html">libplayerutils</a> <li class=menu><a href="group__libplayersd.html">libplayersd</a> <li class=menu><a href="group__libplayertcp.html">libplayertcp</a> <li class=menu><a href="group__libplayerxdr.html">libplayerxdr</a> <li class=menu><a href="todo.html">TODO</a> </ul> </div> <div class=box> <!-- <a href="http://sourceforge.net"><img border=0 src="http://sourceforge.net/sflogo.php?group_id=42445&type=1"></a> --> <div class="title">Online</div> <a href="http://playerstage.sourceforge.net">Homepage</a><br> <a href="http://sourceforge.net/project/showfiles.php?group_id=42445">Download</a><br> <a href="http://sourceforge.net/projects/playerstage">Project</a><br> <a href="http://sourceforge.net/tracker/?group_id=42445">Bugs</a><br> <a href="http://sourceforge.net/mail/?group_id=42445">Help</a> </div> </div> <div id="content" > <!-- Generated by Doxygen 1.7.1 --> <div class="header"> <div class="headertitle"> <h1>rflex<br/> <small> [<a class="el" href="group__drivers.html">Drivers</a>]</small> </h1> </div> </div> <div class="contents"> <p>RWI mobile robots. <a href="#_details">More...</a></p> <table class="memberdecls"> </table> <p>RWI mobile robots. </p> <p>The rflex driver is used to control RWI robots by directly communicating with <a class="el" href="classRFLEX.html">RFLEX</a> onboard the robot (i.e., Mobility is bypassed). To date, these drivers have been tested on an ATRV-Jr, but they should work with other RFLEX-controlled robots: you will have to determine some parameters to set in the config file, however.</p> <p>As of March 2003 these drivers have been modified to support the b21r robot, Currently additional support has been added for the <a class="el" href="group__interface__power.html">power</a> interface and <a class="el" href="group__interface__bumper.html">bumper</a> interface. For the pan tilt unit on the b21r please refer to the <a class="el" href="group__driver__ptu46.html">ptu46</a> driver.</p> <dl class="user"><dt><b>Compile-time dependencies</b></dt><dd></dd></dl> <ul> <li>none</li> </ul> <dl class="user"><dt><b>Provides</b></dt><dd></dd></dl> <p>The rflex driver provides the following device interfaces, some of them named:</p> <ul> <li><a class="el" href="group__interface__position2d.html">position2d</a> : This interface returns odometry data, and accepts velocity commands.</li> <li>"sonar" <a class="el" href="group__interface__sonar.html">sonar</a> : Range data from the sonar array</li> <li>"sonar2" <a class="el" href="group__interface__sonar.html">sonar</a> : Range data from the second sonar array</li> <li><a class="el" href="group__interface__ir.html">ir</a></li> <li><a class="el" href="group__interface__bumper.html">bumper</a></li> <li><a class="el" href="group__interface__power.html">power</a></li> <li><a class="el" href="group__interface__aio.html">aio</a></li> <li><a class="el" href="group__interface__dio.html">dio</a></li> </ul> <dl class="user"><dt><b>Supported configuration requests</b></dt><dd></dd></dl> <ul> <li>The <a class="el" href="group__interface__position2d.html">position2d</a> interface supports:<ul> <li>PLAYER_POSITION2D_REQ_SET_ODOM</li> <li>PLAYER_POSITION2D_REQ_MOTOR_POWER</li> <li>PLAYER_POSITION2D_REQ_VELOCITY_MODE</li> <li>PLAYER_POSITION2D_REQ_RESET_ODOM</li> <li>PLAYER_POSITION2D_REQ_GET_GEOM</li> </ul> </li> <li>The <a class="el" href="group__interface__ir.html">ir</a> interface supports:<ul> <li>PLAYER_IR_REQ_POWER</li> <li>PLAYER_IR_REQ_POSE</li> </ul> </li> <li>The "sonar" <a class="el" href="group__interface__sonar.html">sonar</a> interface supports:<ul> <li>PLAYER_SONAR_REQ_POWER</li> <li>PLAYER_SONAR_REQ_GET_GEOM</li> </ul> </li> <li>The "sonar2" <a class="el" href="group__interface__sonar.html">sonar</a> interface supports:<ul> <li>PLAYER_SONAR_REQ_POWER</li> <li>PLAYER_SONAR_REQ_GET_GEOM</li> </ul> </li> <li>The <a class="el" href="group__interface__bumper.html">bumper</a> interface supports:<ul> <li>PLAYER_BUMPER_REQ_GET_GEOM</li> </ul> </li> </ul> <dl class="user"><dt><b>Configuration file options</b></dt><dd></dd></dl> <ul> <li>port (string)<ul> <li>Default: "/dev/ttyR0"</li> <li>Serial port used to communicate with the robot.</li> </ul> </li> <li>m_length (float)<ul> <li>Default: 0.5</li> <li>Length of the robot in meters</li> </ul> </li> <li>m_width (float)<ul> <li>Default: 0.5</li> <li>Width of the robot in meters</li> </ul> </li> <li>odo_distance_conversion (float)<ul> <li>Default: 0</li> <li>Odometry conversion. See Note 1.</li> </ul> </li> <li>odo_angle_conversion (float)<ul> <li>Default: 0</li> <li>Odometry conversion. See Note 2.</li> </ul> </li> <li>default_trans_acceleration (float)<ul> <li>Default: 0.1</li> <li>Set translational acceleration, in m.</li> </ul> </li> <li>default_rot_acceleration (float)<ul> <li>Default: 0.1</li> <li>Set rotational acceleration, in radians.</li> </ul> </li> <li>rflex_joystick (integer)<ul> <li>Default: 0</li> <li>Enables joystick control via the rflex controller</li> </ul> </li> <li>rflex_joy_pos_ratio (float)<ul> <li>Default: 0</li> <li>Joystick to movement conversion ratio</li> </ul> </li> <li>rflex_joy_ang_ratio (float)<ul> <li>Default: 0</li> <li>Joystick to movement conversion ratio</li> </ul> </li> <li>range_distance_conversion (float)<ul> <li>Default: 1476</li> <li><a class="el" href="classSonar.html">Sonar</a> range conversion factor. See Note 7.</li> </ul> </li> <li>max_num_sonars (integer)<ul> <li>Default: 64</li> <li>See Note 4</li> </ul> </li> <li>num_sonars (integer)<ul> <li>Default: 24</li> <li>See Note 4</li> </ul> </li> <li>sonar_age (integer)<ul> <li>Default: 1</li> <li>Prefiltering parameter. See Note 3.</li> </ul> </li> <li>num_sonar_banks (integer)<ul> <li>Default: 8</li> <li>See Note 4</li> </ul> </li> <li>num_sonars_possible_per_bank (integer)<ul> <li>Default: 16</li> <li>See Note 4</li> </ul> </li> <li>num_sonars_in_bank (integer tuple)<ul> <li>Default: [ 8 8 8 ... ]</li> <li>See Note 4</li> </ul> </li> <li>sonar_echo_delay (integer)<ul> <li>Default: 3000</li> <li><a class="el" href="classSonar.html">Sonar</a> configuration parameters</li> </ul> </li> <li>sonar_ping_delay (integer)<ul> <li>Default: 0</li> <li><a class="el" href="classSonar.html">Sonar</a> configuration parameters</li> </ul> </li> <li>sonar_set_delay (integer)<ul> <li>Default: 0</li> <li><a class="el" href="classSonar.html">Sonar</a> configuration parameters</li> </ul> </li> <li>mrad_sonar_poses (tuple float)<ul> <li>Default: [ 0 0 0 ... ]</li> <li><a class="el" href="classSonar.html">Sonar</a> positions and directions. See Note 6.</li> </ul> </li> <li>sonar_2nd_bank_start (integer)<ul> <li>Default: 0</li> <li>Address of the second sonar bank (lower bank on the b21r)</li> </ul> </li> <li>pose_count (integer)<ul> <li>Default: 8</li> <li>Total Number of IR sensors</li> </ul> </li> <li>rflex_base_bank (integer)<ul> <li>Default: 0</li> <li>Base IR Bank</li> </ul> </li> <li>rflex_bank_count (integer)<ul> <li>Default: 0</li> <li>Number of banks in use</li> </ul> </li> <li>ir_min_range (float)<ul> <li>Default: 0.100</li> <li>Min range of ir sensors (m) (Any range below this is returned as 0)</li> </ul> </li> <li>ir_max_range (float)<ul> <li>Default: 0.800</li> <li>Max range of ir sensors (m) (Any range above this is returned as max)</li> </ul> </li> <li>rflex_banks (float tuple)<ul> <li>Default: [ 0 0 0 ... ]</li> <li>Number of IR sensors in each bank</li> </ul> </li> <li>poses (float tuple)<ul> <li>Default: [ 0 0 0 ... ]</li> <li>x,y,theta of IR sensors (m, m, deg)</li> </ul> </li> <li>rflex_ir_calib (float tuple)<ul> <li>Default: [ 1 1 ... ]</li> <li>IR Calibration data (see Note 8)</li> </ul> </li> <li>bumper_count (integer)<ul> <li>Default: 0</li> <li>Number of bumper panels</li> </ul> </li> <li>bumper_def (float tuple)<ul> <li>Default: [ 0 0 0 0 0 ... ]</li> <li>x,y,theta,length,radius (m,m,deg,m,m) for each bumper</li> </ul> </li> <li>rflex_bumper_address (integer)<ul> <li>Default: 0x40</li> <li>The base address of first bumper in the DIO address range</li> </ul> </li> <li>rflex_bumper_style (string)<ul> <li>Default: "addr"</li> <li>Bumpers can be defined either by addresses or a bit mask</li> </ul> </li> <li>rflex_power_offset (float)<ul> <li>Default: 0</li> <li>The calibration constant for the power calculation in volts</li> </ul> </li> </ul> <dl class="user"><dt><b>Notes</b></dt><dd><ol type="1"> <li>Since the units used by the Rflex for odometry appear to be completely arbitrary, this coefficient is needed to convert to meters: m = (rflex units) / (odo_distance_conversion). These arbitrary units also seem to be different on each robot model. I'm afraid you'll have to determine your robot's conversion factor by driving a known distance and observing the output of the RFlex.</li> <li>Conversion coefficient for rotation odometry: see odo_distance_conversion. Note that heading is re-calculated by the Player driver since the RFlex is not very accurate in this respect. See also Note 1.</li> <li>Used for prefiltering: the standard Polaroid sensors never return values that are closer than the closest obstacle, thus we can buffer locally looking for the closest reading in the last "sonar_age" readings. Since the servo tick here is quite small, you can still get pretty recent data in the client.</li> <li>These values are all used for remapping the sonars from Rflex indexing to player indexing. Individual sonars are enumerated 0-15 on each board, but at least on my robots each only has between 5 and 8 sonar actually attached. Thus we need to remap all of these indexes to get a contiguous array of N sonars for Player.<ul> <li>max_num_sonars is the maximum enumeration value+1 of all sonar meaning if we have 4 sonar boards this number is 64.</li> <li>num_sonars is the number of physical sonar sensors - meaning the number of ranges that will be returned by Player. - num_sonar_banks is the number of sonar boards you have.</li> <li>num_sonars_possible_per_bank is probobly 16 for all robots, but I included it here just in case. this is the number of sonar that can be attached to each sonar board, meaning the maximum enumeration value mapped to each board. - num_sonars_in_bank is the nubmer of physical sonar attached to each board in order - you'll notice on each the sonar board a set of dip switches, these switches configure the enumeration of the boards (ours are 0-3)</li> </ul> </li> <li>The first RFlex device (position, sonar or power) in the config file must include this option, and only the first device's value will be used.</li> <li>This is about the ugliest way possible of telling Player where each sonar is mounted. Include in the string groups of three values: "x1 y1 th1 x2 y2 th2 x3 y3 th3 ...". x and y are m and theta is radians, in Player's robot coordinate system.</li> <li>Used to convert between arbitrary sonar units to millimeters: m = sonar units / range_distance_conversion.</li> <li>Calibration is in the form Range = a*Voltage^b and stored in the tuple as [a1 b1 a2 b2 ...] etc for each ir sensor.</li> </ol> </dd></dl> <dl class="user"><dt><b>Example</b></dt><dd></dd></dl> <div class="fragment"><pre class="fragment"> driver ( name "rflex" provides ["position2d:1" "bumper:0" "sonar::sonar:0" "sonar2::sonar:1" "power:0" "ir:0"] rflex_serial_port "/dev/ttyR0" m_length 0.5 m_width 0.5 odo_distance_conversion 103000 odo_angle_conversion 35000 default_trans_acceleration 0.5 default_rot_acceleration 0.017 rflex_joystick 1 rflex_joy_pos_ratio 6 rflex_joy_ang_ratio -0.01 bumper_count 14 bumper_def [ -216.506351 125.000000 -210.000000 261.799388 250.000000 -0.000000 250.000000 -270.000000 261.799388 250.000000 216.506351 125.000000 -330.000000 261.799388 250.000000 216.506351 -125.000000 -390.000000 261.799388 250.000000 0.000000 -250.000000 -450.000000 261.799388 250.000000 -216.506351 -125.000000 -510.000000 261.799388 250.000000 -240.208678 -99.497692 -157.500000 204.203522 260.000000 -240.208678 99.497692 -202.500000 204.203522 260.000000 -99.497692 240.208678 -247.500000 204.203522 260.000000 99.497692 240.208678 -292.500000 204.203522 260.000000 240.208678 99.497692 -337.500000 204.203522 260.000000 240.208678 -99.497692 -382.500000 204.203522 260.000000 99.497692 -240.208678 -427.500000 204.203522 260.000000 -99.497692 -240.208678 -472.500000 204.203522 260.000000 ] rflex_bumper_address 64 # 0x40 range_distance_conversion 1.476 sonar_age 1 sonar_echo_delay 30000 sonar_ping_delay 0 sonar_set_delay 0 max_num_sonars 224 num_sonars 48 num_sonar_banks 14 num_sonars_possible_per_bank 16 num_sonars_in_bank [4 4 4 4 4 4 3 3 3 3 3 3 3 3] # theta (rads), x, y (m) in robot coordinates (x is forward) mrad_sonar_poses [ 3.01069 -0.24786122 0.03263155 2.74889 -0.23096988 0.09567086 2.48709 -0.19833834 0.15219036 2.22529 -0.15219036 0.19833834 1.96350 -0.09567086 0.23096988 1.70170 -0.03263155 0.24786122 1.43990 0.03263155 0.24786122 1.17810 0.09567086 0.23096988 0.91630 0.15219036 0.19833834 0.65450 0.19833834 0.15219036 0.39270 0.23096988 0.09567086 0.13090 0.24786122 0.03263155 -0.13090 0.24786122 -0.03263155 -0.39270 0.23096988 -0.09567086 -0.65450 0.19833834 -0.15219036 -0.91630 0.15219036 -0.19833834 -1.17810 0.09567086 -0.23096988 -1.43990 0.03263155 -0.24786122 -1.70170 -0.03263155 -0.24786122 -1.96350 -0.09567086 -0.23096988 -2.22529 -0.15219036 -0.19833834 -2.48709 -0.19833834 -0.15219036 -2.74889 -0.23096988 -0.09567086 -3.01069 -0.24786122 -0.03263155 4.18879 -0.13000000 -0.22516660 3.92699 -0.18384776 -0.18384776 3.66519 -0.22516660 -0.13000000 3.40339 -0.25114071 -0.06729295 3.14159 -0.26000000 0.00000 2.87979 -0.25114071 0.06729295 2.61799 -0.22516660 0.13000000 2.35619 -0.18384776 0.18384776 2.09440 -0.13000000 0.22516660 1.83260 -0.06729295 0.25114071 1.57080 0.00000 0.26000000 1.30900 0.06729295 0.25114071 1.04720 0.13000000 0.22516660 0.78540 0.18384776 0.18384776 0.52360 0.22516660 0.13000000 0.26180 0.25114071 0.06729295 0.00000 0.26000000 0.00000 -0.26180 0.25114071 -0.06729295 -0.52360 0.22516660 -0.13000000 -0.78540 0.18384776 -0.18384776 -1.04720 0.13000000 -0.22516660 -1.30900 0.06729295 -0.25114071 -1.57080 0.00000 -0.26000000 -1.83260 -0.06729295 -0.25114071 -2.09440 -0.13000000 -0.22516660 -2.35619 -0.18384776 -0.18384776] sonar_2nd_bank_start 24 rflex_power_offset 1.2 # volts rflex_base_bank 0 rflex_bank_count 6 rflex_banks [4 4 4 4 4 4] pose_count 24 ir_min_range 0.100 ir_max_range 0.800 rflex_ir_calib [ 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 4000 -2 ] poses [-0.247861 0.032632 -3.272492 -0.230970 0.095671 -3.534292 -0.198338 0.152190 -3.796091 -0.152190 0.198338 -4.057890 -0.095671 0.230970 -4.319690 -0.032632 0.247861 -4.581489 0.032632 0.247861 -4.843289 0.095671 0.230970 -5.105088 0.152190 0.198338 -5.366888 0.198338 0.152190 -5.628687 0.230970 0.095671 -5.890486 0.247861 0.032632 -6.152286 0.247861 -0.032632 -6.414085 0.230970 -0.095671 -6.675884 0.198338 -0.152190 -6.937684 0.152190 -0.198338 -7.199483 0.095671 -0.230970 -7.461283 0.032632 -0.247861 -7.723082 -0.032632 -0.247861 -7.984881 -0.095671 -0.230970 -8.246680 -0.152190 -0.198338 -8.508480 -0.198338 -0.152190 -8.770280 -0.230970 -0.095671 -9.032079 -0.247861 -0.032631 -9.293879 ] ) </pre></div><dl class="author"><dt><b>Author:</b></dt><dd>Matthew Brewer, Toby Collett </dd></dl> </div> <!-- render the modification time of the source file --> <div class="timestamp"> <hr> <table style="width:100%;"> <tr> <td style="text-align:left;"> Last updated 12 September 2005 21:38:45 <!-- <td style="text-align:right;"> <a href="http://validator.w3.org/check/referer"><img style="vertical-align:middle;border:0;width:88px;height:31px" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a> <a href="http://jigsaw.w3.org/css-validator/"> <img style="vertical-align:middle;border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> </a> --> </tr> </table> </div> </tr> </table> </BODY> </HTML>