<!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="summary"> <a href="#nested-classes">Classes</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <h1>position2d<br/> <small> [<a class="el" href="group__playerc__proxies.html">Device proxies</a>]</small> </h1> </div> </div> <div class="contents"> <p>The position2d proxy provides an interface to a mobile robot base, such as the ActiveMedia Pioneer series. <a href="#_details">More...</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="nested-classes"></a> Classes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Position2d device data. <a href="structplayerc__position2d__t.html#_details">More...</a><br/></td></tr> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PLAYERC_EXPORT <br class="typebreak"/> <a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#ga0b8289c7553743b1f3831f4049124b81">playerc_position2d_create</a> (<a class="el" href="struct__playerc__client__t.html">playerc_client_t</a> *client, int index)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a position2d device proxy. <a href="#ga0b8289c7553743b1f3831f4049124b81"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PLAYERC_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#gabd10aeac5c1e19c68f961366175d39b7">playerc_position2d_destroy</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a position2d device proxy. <a href="#gabd10aeac5c1e19c68f961366175d39b7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga50ece2507e09f428ce3f5eb34b3dbefc"></a><!-- doxytag: member="playerc_proxy_position2d::playerc_position2d_subscribe" ref="ga50ece2507e09f428ce3f5eb34b3dbefc" args="(playerc_position2d_t *device, int access)" --> PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#ga50ece2507e09f428ce3f5eb34b3dbefc">playerc_position2d_subscribe</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device, int access)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Subscribe to the position2d device. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga87df17eb6764719e8120e5b60178ff91"></a><!-- doxytag: member="playerc_proxy_position2d::playerc_position2d_unsubscribe" ref="ga87df17eb6764719e8120e5b60178ff91" args="(playerc_position2d_t *device)" --> PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#ga87df17eb6764719e8120e5b60178ff91">playerc_position2d_unsubscribe</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Un-subscribe from the position2d device. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac0e3128e65d8df3ff203a132a68aff5f"></a><!-- doxytag: member="playerc_proxy_position2d::playerc_position2d_enable" ref="gac0e3128e65d8df3ff203a132a68aff5f" args="(playerc_position2d_t *device, int enable)" --> PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#gac0e3128e65d8df3ff203a132a68aff5f">playerc_position2d_enable</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device, int enable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Enable/disable the motors. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#ga1966724cc7992243922adfa68b6f5496">playerc_position2d_get_geom</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the position2d geometry. <a href="#ga1966724cc7992243922adfa68b6f5496"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#gacfe0eb89b6749e56e0c6ea3ab596b301">playerc_position2d_set_cmd_vel</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device, double vx, double vy, double va, int state)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the target speed. <a href="#gacfe0eb89b6749e56e0c6ea3ab596b301"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaeeca39c0332d48af7bd3928570682ab6"></a><!-- doxytag: member="playerc_proxy_position2d::playerc_position2d_set_cmd_pose_with_vel" ref="gaeeca39c0332d48af7bd3928570682ab6" args="(playerc_position2d_t *device, player_pose2d_t pos, player_pose2d_t vel, int state)" --> PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#gaeeca39c0332d48af7bd3928570682ab6">playerc_position2d_set_cmd_pose_with_vel</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device, <a class="el" href="structplayer__pose2d.html">player_pose2d_t</a> pos, <a class="el" href="structplayer__pose2d.html">player_pose2d_t</a> vel, int state)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the target pose with given motion vel. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#ga5b200c95fa17c6c2e93057ab9643e549">playerc_position2d_set_cmd_vel_head</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device, double vx, double vy, double pa, int state)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the target speed and heading. <a href="#ga5b200c95fa17c6c2e93057ab9643e549"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#gaf03501b9ae666e512852516c5159fad1">playerc_position2d_set_cmd_pose</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device, double gx, double gy, double ga, int state)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the target pose (gx, gy, ga) is the target pose in the odometric coordinate system. <a href="#gaf03501b9ae666e512852516c5159fad1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0ce3464f69ae6fabd74b8a142399de77"></a><!-- doxytag: member="playerc_proxy_position2d::playerc_position2d_set_cmd_car" ref="ga0ce3464f69ae6fabd74b8a142399de77" args="(playerc_position2d_t *device, double vx, double a)" --> PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#ga0ce3464f69ae6fabd74b8a142399de77">playerc_position2d_set_cmd_car</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device, double vx, double a)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the target cmd for car like position. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5434514aa5f2de21fb4774d42db86edc"></a><!-- doxytag: member="playerc_proxy_position2d::playerc_position2d_set_odom" ref="ga5434514aa5f2de21fb4774d42db86edc" args="(playerc_position2d_t *device, double ox, double oy, double oa)" --> PLAYERC_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__playerc__proxy__position2d.html#ga5434514aa5f2de21fb4774d42db86edc">playerc_position2d_set_odom</a> (<a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> *device, double ox, double oy, double oa)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the odometry offset. <br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>The position2d proxy provides an interface to a mobile robot base, such as the ActiveMedia Pioneer series. </p> <p>The proxy supports both differential drive robots (which are capable of forward motion and rotation) and omni-drive robots (which are capable of forward, sideways and rotational motion). </p> <hr/><h2>Function Documentation</h2> <a class="anchor" id="ga0b8289c7553743b1f3831f4049124b81"></a><!-- doxytag: member="playerc.h::playerc_position2d_create" ref="ga0b8289c7553743b1f3831f4049124b81" args="(playerc_client_t *client, int index)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PLAYERC_EXPORT <a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a>* playerc_position2d_create </td> <td>(</td> <td class="paramtype"><a class="el" href="struct__playerc__client__t.html">playerc_client_t</a> * </td> <td class="paramname"> <em>client</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>index</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Create a position2d device proxy. </p> </div> </div> <a class="anchor" id="gabd10aeac5c1e19c68f961366175d39b7"></a><!-- doxytag: member="playerc.h::playerc_position2d_destroy" ref="gabd10aeac5c1e19c68f961366175d39b7" args="(playerc_position2d_t *device)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PLAYERC_EXPORT void playerc_position2d_destroy </td> <td>(</td> <td class="paramtype"><a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> * </td> <td class="paramname"> <em>device</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Destroy a position2d device proxy. </p> </div> </div> <a class="anchor" id="ga1966724cc7992243922adfa68b6f5496"></a><!-- doxytag: member="playerc.h::playerc_position2d_get_geom" ref="ga1966724cc7992243922adfa68b6f5496" args="(playerc_position2d_t *device)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PLAYERC_EXPORT int playerc_position2d_get_geom </td> <td>(</td> <td class="paramtype"><a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> * </td> <td class="paramname"> <em>device</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get the position2d geometry. </p> <p>The writes the result into the proxy rather than returning it to the caller. </p> </div> </div> <a class="anchor" id="gaf03501b9ae666e512852516c5159fad1"></a><!-- doxytag: member="playerc.h::playerc_position2d_set_cmd_pose" ref="gaf03501b9ae666e512852516c5159fad1" args="(playerc_position2d_t *device, double gx, double gy, double ga, int state)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PLAYERC_EXPORT int playerc_position2d_set_cmd_pose </td> <td>(</td> <td class="paramtype"><a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> * </td> <td class="paramname"> <em>device</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>gx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>gy</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>ga</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>state</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the target pose (gx, gy, ga) is the target pose in the odometric coordinate system. </p> </div> </div> <a class="anchor" id="gacfe0eb89b6749e56e0c6ea3ab596b301"></a><!-- doxytag: member="playerc.h::playerc_position2d_set_cmd_vel" ref="gacfe0eb89b6749e56e0c6ea3ab596b301" args="(playerc_position2d_t *device, double vx, double vy, double va, int state)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PLAYERC_EXPORT int playerc_position2d_set_cmd_vel </td> <td>(</td> <td class="paramtype"><a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> * </td> <td class="paramname"> <em>device</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>vx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>vy</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>va</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>state</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the target speed. </p> <p>vx : forward speed (m/s). vy : sideways speed (m/s); this field is used by omni-drive robots only. va : rotational speed (rad/s). All speeds are defined in the robot coordinate system. </p> </div> </div> <a class="anchor" id="ga5b200c95fa17c6c2e93057ab9643e549"></a><!-- doxytag: member="playerc.h::playerc_position2d_set_cmd_vel_head" ref="ga5b200c95fa17c6c2e93057ab9643e549" args="(playerc_position2d_t *device, double vx, double vy, double pa, int state)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PLAYERC_EXPORT int playerc_position2d_set_cmd_vel_head </td> <td>(</td> <td class="paramtype"><a class="el" href="structplayerc__position2d__t.html">playerc_position2d_t</a> * </td> <td class="paramname"> <em>device</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>vx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>vy</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>pa</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>state</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the target speed and heading. </p> <p>vx : forward speed (m/s). vy : sideways speed (m/s); this field is used by omni-drive robots only. pa : rotational heading (rad). All speeds and angles are defined in the robot coordinate system. </p> </div> </div> </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>