<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>area_provider: area Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="jquery.js"></script>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classarea-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">area Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A class that holds the an area and offers related services.  
 <a href="classarea.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="area_8h_source.html">area.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for area:</div>
<div class="dyncontent">
<div class="center"><img src="classarea__inherit__graph.png" border="0" usemap="#area_inherit__map" alt="Inheritance graph"/></div>
<map name="area_inherit__map" id="area_inherit__map">
<area shape="rect" title="A class that holds the an area and offers related services." alt="" coords="33,5,84,32"/>
<area shape="rect" href="classma.html" title="A class that holds the mission area, i.e., the area in which CPSs are allowed to move." alt="" coords="5,80,48,107"/>
<area shape="rect" href="classroi.html" title="A class that holds a region of interest (ROI)." alt="" coords="73,80,111,107"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a330b6c4d93fbea75f60ac975313c983d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a330b6c4d93fbea75f60ac975313c983d">area</a> ()</td></tr>
<tr class="memdesc:a330b6c4d93fbea75f60ac975313c983d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that initializes the private member variables.  <a href="classarea.html#a330b6c4d93fbea75f60ac975313c983d">More...</a><br /></td></tr>
<tr class="separator:a330b6c4d93fbea75f60ac975313c983d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0659d2b721466457e34484afab04e47c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a0659d2b721466457e34484afab04e47c">get_area</a> (cpswarm_msgs::GetPoints::Request &amp;req, cpswarm_msgs::GetPoints::Response &amp;res)</td></tr>
<tr class="memdesc:a0659d2b721466457e34484afab04e47c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the area coordinates.  <a href="classarea.html#a0659d2b721466457e34484afab04e47c">More...</a><br /></td></tr>
<tr class="separator:a0659d2b721466457e34484afab04e47c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dd913ac23971e599fc44ec31a7c9d68"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a5dd913ac23971e599fc44ec31a7c9d68">get_center</a> (cpswarm_msgs::GetPoint::Request &amp;req, cpswarm_msgs::GetPoint::Response &amp;res)</td></tr>
<tr class="memdesc:a5dd913ac23971e599fc44ec31a7c9d68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the centroid of the area (<a href="https://en.wikipedia.org/wiki/Centroid#Of_a_polygon">https://en.wikipedia.org/wiki/Centroid#Of_a_polygon</a>).  <a href="classarea.html#a5dd913ac23971e599fc44ec31a7c9d68">More...</a><br /></td></tr>
<tr class="separator:a5dd913ac23971e599fc44ec31a7c9d68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f8f91dc566727a9b2d8eeb835e632e8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a0f8f91dc566727a9b2d8eeb835e632e8">get_distance</a> (cpswarm_msgs::GetDist::Request &amp;req, cpswarm_msgs::GetDist::Response &amp;res)</td></tr>
<tr class="memdesc:a0f8f91dc566727a9b2d8eeb835e632e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the distance of a given point to the area boundary (outside or inside the area). Based on <a href="https://stackoverflow.com/questions/10983872/distance-from-a-point-to-a-polygon">https://stackoverflow.com/questions/10983872/distance-from-a-point-to-a-polygon</a> and <a href="https://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment">https://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment</a>.  <a href="classarea.html#a0f8f91dc566727a9b2d8eeb835e632e8">More...</a><br /></td></tr>
<tr class="separator:a0f8f91dc566727a9b2d8eeb835e632e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfe3cde0d5c80a5a1660fc8dfb5f859c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#acfe3cde0d5c80a5a1660fc8dfb5f859c">get_map</a> (cpswarm_msgs::GetMap::Request &amp;req, cpswarm_msgs::GetMap::Response &amp;res)</td></tr>
<tr class="memdesc:acfe3cde0d5c80a5a1660fc8dfb5f859c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the map that represents the area.  <a href="classarea.html#acfe3cde0d5c80a5a1660fc8dfb5f859c">More...</a><br /></td></tr>
<tr class="separator:acfe3cde0d5c80a5a1660fc8dfb5f859c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa717c832cbeb66e12e7a8fcef30f0939"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#aa717c832cbeb66e12e7a8fcef30f0939">get_origin</a> (cpswarm_msgs::GetPoint::Request &amp;req, cpswarm_msgs::GetPoint::Response &amp;res)</td></tr>
<tr class="memdesc:aa717c832cbeb66e12e7a8fcef30f0939"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the origin of the coordinate system.  <a href="classarea.html#aa717c832cbeb66e12e7a8fcef30f0939">More...</a><br /></td></tr>
<tr class="separator:aa717c832cbeb66e12e7a8fcef30f0939"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86d143859a1eca41342fedc9b9c8600b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a86d143859a1eca41342fedc9b9c8600b">out_of_bounds</a> (cpswarm_msgs::OutOfBounds::Request &amp;req, cpswarm_msgs::OutOfBounds::Response &amp;res)</td></tr>
<tr class="memdesc:a86d143859a1eca41342fedc9b9c8600b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine whether a position is within the area.  <a href="classarea.html#a86d143859a1eca41342fedc9b9c8600b">More...</a><br /></td></tr>
<tr class="separator:a86d143859a1eca41342fedc9b9c8600b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6680911799897d1b8ca1b3d38525101"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#ad6680911799897d1b8ca1b3d38525101">to_string</a> ()</td></tr>
<tr class="memdesc:ad6680911799897d1b8ca1b3d38525101"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a string that uniquely represents the area.  <a href="classarea.html#ad6680911799897d1b8ca1b3d38525101">More...</a><br /></td></tr>
<tr class="separator:ad6680911799897d1b8ca1b3d38525101"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a62b41663e94e6ff2c3d83778cb6b04c9"><td class="memItemLeft" align="right" valign="top">nav_msgs::OccupancyGrid&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a62b41663e94e6ff2c3d83778cb6b04c9">get_gridmap</a> (bool rotated=false, double <a class="el" href="classarea.html#acc804cb034d0eaa28f5fbba56f538e54">resolution</a>=0)</td></tr>
<tr class="memdesc:a62b41663e94e6ff2c3d83778cb6b04c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a grid map from the given area coordinates.  <a href="classarea.html#a62b41663e94e6ff2c3d83778cb6b04c9">More...</a><br /></td></tr>
<tr class="separator:a62b41663e94e6ff2c3d83778cb6b04c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2ad101e400c7e44534cd5960a56cb81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#af2ad101e400c7e44534cd5960a56cb81">global_to_local</a> ()</td></tr>
<tr class="memdesc:af2ad101e400c7e44534cd5960a56cb81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert the coordinates of the area from global (GPS) coordinates to the local coordinate system.  <a href="classarea.html#af2ad101e400c7e44534cd5960a56cb81">More...</a><br /></td></tr>
<tr class="separator:af2ad101e400c7e44534cd5960a56cb81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0df347e3c69fec830b637de43bb9f2a5"><td class="memItemLeft" align="right" valign="top">vector&lt; geometry_msgs::Point &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a0df347e3c69fec830b637de43bb9f2a5">set2vector</a> (set&lt; pair&lt; double, double &gt;&gt; set)</td></tr>
<tr class="memdesc:a0df347e3c69fec830b637de43bb9f2a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a set of double pairs to a vector of geometry_msgs/Point.  <a href="classarea.html#a0df347e3c69fec830b637de43bb9f2a5">More...</a><br /></td></tr>
<tr class="separator:a0df347e3c69fec830b637de43bb9f2a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d12a8eeed699c1d037e17ba76854f3c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a3d12a8eeed699c1d037e17ba76854f3c">set_origin</a> ()</td></tr>
<tr class="memdesc:a3d12a8eeed699c1d037e17ba76854f3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the origin of the local coordinate system from the GPS starting position or given parameter.  <a href="classarea.html#a3d12a8eeed699c1d037e17ba76854f3c">More...</a><br /></td></tr>
<tr class="separator:a3d12a8eeed699c1d037e17ba76854f3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e8293857d5b3cf324d7676893bcafbc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a1e8293857d5b3cf324d7676893bcafbc">sort_coords</a> ()</td></tr>
<tr class="memdesc:a1e8293857d5b3cf324d7676893bcafbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort the coordinates of the area counter-clockwise about the center by their angle [-π,π].  <a href="classarea.html#a1e8293857d5b3cf324d7676893bcafbc">More...</a><br /></td></tr>
<tr class="separator:a1e8293857d5b3cf324d7676893bcafbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a643cf2e7d1285ff9f1f206b78d592bf4"><td class="memItemLeft" align="right" valign="top">set&lt; pair&lt; double, double &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a643cf2e7d1285ff9f1f206b78d592bf4">vector2set</a> (vector&lt; geometry_msgs::Point &gt; vector)</td></tr>
<tr class="memdesc:a643cf2e7d1285ff9f1f206b78d592bf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a vector of geometry_msgs/Point to a set of double pairs.  <a href="classarea.html#a643cf2e7d1285ff9f1f206b78d592bf4">More...</a><br /></td></tr>
<tr class="separator:a643cf2e7d1285ff9f1f206b78d592bf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aa8158ad7955107d6b43c44485a27b872"><td class="memItemLeft" align="right" valign="top">map&lt; double, set&lt; pair&lt; double, double &gt; &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#aa8158ad7955107d6b43c44485a27b872">coords</a></td></tr>
<tr class="memdesc:aa8158ad7955107d6b43c44485a27b872"><td class="mdescLeft">&#160;</td><td class="mdescRight">The coordinates of the area at different rotations.  <a href="classarea.html#aa8158ad7955107d6b43c44485a27b872">More...</a><br /></td></tr>
<tr class="separator:aa8158ad7955107d6b43c44485a27b872"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0eb55bca59864691f23b179e319884ec"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a0eb55bca59864691f23b179e319884ec">global</a></td></tr>
<tr class="memdesc:a0eb55bca59864691f23b179e319884ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether global (GPS) or local coordinates are used as source.  <a href="classarea.html#a0eb55bca59864691f23b179e319884ec">More...</a><br /></td></tr>
<tr class="separator:a0eb55bca59864691f23b179e319884ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b19ef007ee7041ea2f28ed26937f3b6"><td class="memItemLeft" align="right" valign="top">map&lt; double, map&lt; double, nav_msgs::OccupancyGrid &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a7b19ef007ee7041ea2f28ed26937f3b6">gridmaps</a></td></tr>
<tr class="memdesc:a7b19ef007ee7041ea2f28ed26937f3b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The grid map representing the area at different rotations and resolutions.  <a href="classarea.html#a7b19ef007ee7041ea2f28ed26937f3b6">More...</a><br /></td></tr>
<tr class="separator:a7b19ef007ee7041ea2f28ed26937f3b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a474af94f136070aae06e096a7521c367"><td class="memItemLeft" align="right" valign="top">NodeHandle&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a474af94f136070aae06e096a7521c367">nh</a></td></tr>
<tr class="memdesc:a474af94f136070aae06e096a7521c367"><td class="mdescLeft">&#160;</td><td class="mdescRight">A node handle for the main ROS node.  <a href="classarea.html#a474af94f136070aae06e096a7521c367">More...</a><br /></td></tr>
<tr class="separator:a474af94f136070aae06e096a7521c367"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc804cb034d0eaa28f5fbba56f538e54"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#acc804cb034d0eaa28f5fbba56f538e54">resolution</a></td></tr>
<tr class="memdesc:acc804cb034d0eaa28f5fbba56f538e54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resolution of the grid map representing the area in meter / cell.  <a href="classarea.html#acc804cb034d0eaa28f5fbba56f538e54">More...</a><br /></td></tr>
<tr class="separator:acc804cb034d0eaa28f5fbba56f538e54"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a40c139884bccf899c3ad70dca8a8eb07"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a40c139884bccf899c3ad70dca8a8eb07">is_left</a> (pair&lt; double, double &gt; p0, pair&lt; double, double &gt; p1, pair&lt; double, double &gt; p2)</td></tr>
<tr class="memdesc:a40c139884bccf899c3ad70dca8a8eb07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test whether a point is left of an infinite line.  <a href="classarea.html#a40c139884bccf899c3ad70dca8a8eb07">More...</a><br /></td></tr>
<tr class="separator:a40c139884bccf899c3ad70dca8a8eb07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3607d1bd4622cb8a3d21506831ff6c67"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a3607d1bd4622cb8a3d21506831ff6c67">is_right</a> (pair&lt; double, double &gt; p0, pair&lt; double, double &gt; p1, pair&lt; double, double &gt; p2)</td></tr>
<tr class="memdesc:a3607d1bd4622cb8a3d21506831ff6c67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test whether a point is right of an infinite line.  <a href="classarea.html#a3607d1bd4622cb8a3d21506831ff6c67">More...</a><br /></td></tr>
<tr class="separator:a3607d1bd4622cb8a3d21506831ff6c67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3829f1889df61a5b17b1bdda731e5272"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a3829f1889df61a5b17b1bdda731e5272">on_bound</a> (pair&lt; double, double &gt; pos, double angle)</td></tr>
<tr class="memdesc:a3829f1889df61a5b17b1bdda731e5272"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test whether a point is on the area boundary.  <a href="classarea.html#a3829f1889df61a5b17b1bdda731e5272">More...</a><br /></td></tr>
<tr class="separator:a3829f1889df61a5b17b1bdda731e5272"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8aa07df118a28fe44a2e99c84c46a814"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a8aa07df118a28fe44a2e99c84c46a814">out_of_bounds</a> (pair&lt; double, double &gt; pos, double angle=0)</td></tr>
<tr class="memdesc:a8aa07df118a28fe44a2e99c84c46a814"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine whether a position is within the area using the winding number algorithm.  <a href="classarea.html#a8aa07df118a28fe44a2e99c84c46a814">More...</a><br /></td></tr>
<tr class="separator:a8aa07df118a28fe44a2e99c84c46a814"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e1615706da532ffebc44c8bfd6721de"><td class="memItemLeft" align="right" valign="top">geometry_msgs::Point&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a4e1615706da532ffebc44c8bfd6721de">pair2point</a> (pair&lt; double, double &gt; pair)</td></tr>
<tr class="memdesc:a4e1615706da532ffebc44c8bfd6721de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a pair of doubles to a geometry_msgs/Point.  <a href="classarea.html#a4e1615706da532ffebc44c8bfd6721de">More...</a><br /></td></tr>
<tr class="separator:a4e1615706da532ffebc44c8bfd6721de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ca66a9810e71c5bfdc20c7fedffd772"><td class="memItemLeft" align="right" valign="top">pair&lt; double, double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a1ca66a9810e71c5bfdc20c7fedffd772">point2pair</a> (geometry_msgs::Point point)</td></tr>
<tr class="memdesc:a1ca66a9810e71c5bfdc20c7fedffd772"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a geometry_msgs/Point to a pair of doubles.  <a href="classarea.html#a1ca66a9810e71c5bfdc20c7fedffd772">More...</a><br /></td></tr>
<tr class="separator:a1ca66a9810e71c5bfdc20c7fedffd772"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa09514d15176ebd516b10dbd4efb958d"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#aa09514d15176ebd516b10dbd4efb958d">rotate</a> ()</td></tr>
<tr class="memdesc:aa09514d15176ebd516b10dbd4efb958d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate the area coordinates to make the bottom edge horizontal. Stores the resulting coordinates in class variable.  <a href="classarea.html#aa09514d15176ebd516b10dbd4efb958d">More...</a><br /></td></tr>
<tr class="separator:aa09514d15176ebd516b10dbd4efb958d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa40eb9bd032d8c486796cc7aa642dbe"><td class="memItemLeft" align="right" valign="top">geometry_msgs::Vector3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#aaa40eb9bd032d8c486796cc7aa642dbe">translate</a> (nav_msgs::OccupancyGrid &amp;map)</td></tr>
<tr class="memdesc:aaa40eb9bd032d8c486796cc7aa642dbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shift a map to be aligned with the grid, i.e., the origin should be an even number.  <a href="classarea.html#aaa40eb9bd032d8c486796cc7aa642dbe">More...</a><br /></td></tr>
<tr class="separator:aaa40eb9bd032d8c486796cc7aa642dbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ad63f786362205207cb478cf5688ac7d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#ad63f786362205207cb478cf5688ac7d4">cell_warn</a></td></tr>
<tr class="memdesc:ad63f786362205207cb478cf5688ac7d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of grid cells in the map above which a performance warning is issued.  <a href="classarea.html#ad63f786362205207cb478cf5688ac7d4">More...</a><br /></td></tr>
<tr class="separator:ad63f786362205207cb478cf5688ac7d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee0e0cdcaa918c41945407d82fe845a1"><td class="memItemLeft" align="right" valign="top">map&lt; double, map&lt; double, pair&lt; double, double &gt; &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#aee0e0cdcaa918c41945407d82fe845a1">coords_sorted</a></td></tr>
<tr class="memdesc:aee0e0cdcaa918c41945407d82fe845a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The coordinates of the area at different rotations, sorted counter-clockwise about the center, starting from negative x-axis [-π,π]. They are mapped by the respective angle.  <a href="classarea.html#aee0e0cdcaa918c41945407d82fe845a1">More...</a><br /></td></tr>
<tr class="separator:aee0e0cdcaa918c41945407d82fe845a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a689affa99750a54788bfa576f44cf76b"><td class="memItemLeft" align="right" valign="top">ServiceClient&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#a689affa99750a54788bfa576f44cf76b">fix_to_pose_client</a></td></tr>
<tr class="memdesc:a689affa99750a54788bfa576f44cf76b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Service client to convert global (GPS) coordinates to the local coordinate system.  <a href="classarea.html#a689affa99750a54788bfa576f44cf76b">More...</a><br /></td></tr>
<tr class="separator:a689affa99750a54788bfa576f44cf76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeceda763636ebea2056ee7c8bec823e5"><td class="memItemLeft" align="right" valign="top">geometry_msgs::Point&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#aeceda763636ebea2056ee7c8bec823e5">origin</a></td></tr>
<tr class="memdesc:aeceda763636ebea2056ee7c8bec823e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The origin of the coordinate system.  <a href="classarea.html#aeceda763636ebea2056ee7c8bec823e5">More...</a><br /></td></tr>
<tr class="separator:aeceda763636ebea2056ee7c8bec823e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe291ca83ddc448185e99dc79eb0a223"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarea.html#afe291ca83ddc448185e99dc79eb0a223">rotation</a></td></tr>
<tr class="memdesc:afe291ca83ddc448185e99dc79eb0a223"><td class="mdescLeft">&#160;</td><td class="mdescRight">The angle that the map has to rotated by to make the bottom edge horizontal, radian, counter-clockwise.  <a href="classarea.html#afe291ca83ddc448185e99dc79eb0a223">More...</a><br /></td></tr>
<tr class="separator:afe291ca83ddc448185e99dc79eb0a223"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class that holds the an area and offers related services. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00031">31</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a330b6c4d93fbea75f60ac975313c983d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a330b6c4d93fbea75f60ac975313c983d">&#9670;&nbsp;</a></span>area()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">area::area </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor that initializes the private member variables. </p>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00003">3</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a0659d2b721466457e34484afab04e47c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0659d2b721466457e34484afab04e47c">&#9670;&nbsp;</a></span>get_area()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool area::get_area </td>
          <td>(</td>
          <td class="paramtype">cpswarm_msgs::GetPoints::Request &amp;&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cpswarm_msgs::GetPoints::Response &amp;&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the area coordinates. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>Empty request. </td></tr>
    <tr><td class="paramname">res</td><td>A vector of points that defines the bounding polygon coordinates. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether request succeeded. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00025">25</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a5dd913ac23971e599fc44ec31a7c9d68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5dd913ac23971e599fc44ec31a7c9d68">&#9670;&nbsp;</a></span>get_center()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool area::get_center </td>
          <td>(</td>
          <td class="paramtype">cpswarm_msgs::GetPoint::Request &amp;&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cpswarm_msgs::GetPoint::Response &amp;&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the centroid of the area (<a href="https://en.wikipedia.org/wiki/Centroid#Of_a_polygon">https://en.wikipedia.org/wiki/Centroid#Of_a_polygon</a>). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>Empty request. </td></tr>
    <tr><td class="paramname">res</td><td>The coordinates of the centroid of the area. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether request succeeded. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00031">31</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a0f8f91dc566727a9b2d8eeb835e632e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f8f91dc566727a9b2d8eeb835e632e8">&#9670;&nbsp;</a></span>get_distance()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool area::get_distance </td>
          <td>(</td>
          <td class="paramtype">cpswarm_msgs::GetDist::Request &amp;&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cpswarm_msgs::GetDist::Response &amp;&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the distance of a given point to the area boundary (outside or inside the area). Based on <a href="https://stackoverflow.com/questions/10983872/distance-from-a-point-to-a-polygon">https://stackoverflow.com/questions/10983872/distance-from-a-point-to-a-polygon</a> and <a href="https://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment">https://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>The coordinates of the point to check. If it is empty (0,0), the area origin is used. </td></tr>
    <tr><td class="paramname">res</td><td>The coordinates of the closest area boundary line segment, the coordinates of the closest point on the boundary, and the distance. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether request succeeded. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00061">61</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a62b41663e94e6ff2c3d83778cb6b04c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62b41663e94e6ff2c3d83778cb6b04c9">&#9670;&nbsp;</a></span>get_gridmap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nav_msgs::OccupancyGrid area::get_gridmap </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>rotated</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>resolution</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generate a grid map from the given area coordinates. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rotation</td><td>Whether the map bottom edge should be aligned horizontally, default false. </td></tr>
    <tr><td class="paramname">resolution</td><td>Resolution of the map in meter / cell, default 0, i.e., using value provided by parameter server or subscribed map. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A grid map that represents the area. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00186">186</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="acfe3cde0d5c80a5a1660fc8dfb5f859c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfe3cde0d5c80a5a1660fc8dfb5f859c">&#9670;&nbsp;</a></span>get_map()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool area::get_map </td>
          <td>(</td>
          <td class="paramtype">cpswarm_msgs::GetMap::Request &amp;&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cpswarm_msgs::GetMap::Response &amp;&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the map that represents the area. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>The desired resolution of the map and whether its bottom edge should be aligned horizontally and the origin should be an integer. </td></tr>
    <tr><td class="paramname">res</td><td>The grid map of the environment together with the angle it has been rotated by and the offset it has been translated by. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the request succeeded. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00149">149</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="aa717c832cbeb66e12e7a8fcef30f0939"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa717c832cbeb66e12e7a8fcef30f0939">&#9670;&nbsp;</a></span>get_origin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool area::get_origin </td>
          <td>(</td>
          <td class="paramtype">cpswarm_msgs::GetPoint::Request &amp;&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cpswarm_msgs::GetPoint::Response &amp;&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the origin of the coordinate system. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>Empty request. </td></tr>
    <tr><td class="paramname">res</td><td>A point that defines the origin coordinates. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether request succeeded. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00165">165</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="af2ad101e400c7e44534cd5960a56cb81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2ad101e400c7e44534cd5960a56cb81">&#9670;&nbsp;</a></span>global_to_local()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void area::global_to_local </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert the coordinates of the area from global (GPS) coordinates to the local coordinate system. </p>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00278">278</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a40c139884bccf899c3ad70dca8a8eb07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40c139884bccf899c3ad70dca8a8eb07">&#9670;&nbsp;</a></span>is_left()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool area::is_left </td>
          <td>(</td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>p0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>p2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Test whether a point is left of an infinite line. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p0</td><td>First point of the line. </td></tr>
    <tr><td class="paramname">p1</td><td>Second point of the line. </td></tr>
    <tr><td class="paramname">p2</td><td>Point to test. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True, if the point is left of the line, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00376">376</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a3607d1bd4622cb8a3d21506831ff6c67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3607d1bd4622cb8a3d21506831ff6c67">&#9670;&nbsp;</a></span>is_right()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool area::is_right </td>
          <td>(</td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>p0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>p2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Test whether a point is right of an infinite line. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p0</td><td>First point of the line. </td></tr>
    <tr><td class="paramname">p1</td><td>Second point of the line. </td></tr>
    <tr><td class="paramname">p2</td><td>Point to test. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True, if the point is right of the line, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00384">384</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a3829f1889df61a5b17b1bdda731e5272"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3829f1889df61a5b17b1bdda731e5272">&#9670;&nbsp;</a></span>on_bound()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool area::on_bound </td>
          <td>(</td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Test whether a point is on the area boundary. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pos</td><td>Point to test </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate the area by, radian, counter-clockwise, default 0. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True, if the distance from p0 to p2 and from p2 to p1 is almost the same as from p0 to p1, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00392">392</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a86d143859a1eca41342fedc9b9c8600b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86d143859a1eca41342fedc9b9c8600b">&#9670;&nbsp;</a></span>out_of_bounds() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool area::out_of_bounds </td>
          <td>(</td>
          <td class="paramtype">cpswarm_msgs::OutOfBounds::Request &amp;&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cpswarm_msgs::OutOfBounds::Response &amp;&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determine whether a position is within the area. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>The position to check. </td></tr>
    <tr><td class="paramname">res</td><td>True, if the position is outside of the area, false otherwise. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the request succeeded. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00171">171</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a8aa07df118a28fe44a2e99c84c46a814"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8aa07df118a28fe44a2e99c84c46a814">&#9670;&nbsp;</a></span>out_of_bounds() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool area::out_of_bounds </td>
          <td>(</td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine whether a position is within the area using the winding number algorithm. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pos</td><td>The position to check. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate the area by, radian, counter-clockwise, default 0. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True, if the position is outside of the area boundary, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00424">424</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a4e1615706da532ffebc44c8bfd6721de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e1615706da532ffebc44c8bfd6721de">&#9670;&nbsp;</a></span>pair2point()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">geometry_msgs::Point area::pair2point </td>
          <td>(</td>
          <td class="paramtype">pair&lt; double, double &gt;&#160;</td>
          <td class="paramname"><em>pair</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a pair of doubles to a geometry_msgs/Point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pair</td><td>The pair to convert. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A geometry_msgs/Point where x is the first element of the pair and y the second. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00458">458</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a1ca66a9810e71c5bfdc20c7fedffd772"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ca66a9810e71c5bfdc20c7fedffd772">&#9670;&nbsp;</a></span>point2pair()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">pair&lt; double, double &gt; area::point2pair </td>
          <td>(</td>
          <td class="paramtype">geometry_msgs::Point&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a geometry_msgs/Point to a pair of doubles. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">point</td><td>The point to convert. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pair of doubles where the first element is x of the point and the second element is y. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00466">466</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="aa09514d15176ebd516b10dbd4efb958d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa09514d15176ebd516b10dbd4efb958d">&#9670;&nbsp;</a></span>rotate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double area::rotate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Rotate the area coordinates to make the bottom edge horizontal. Stores the resulting coordinates in class variable. </p>
<dl class="section return"><dt>Returns</dt><dd>The angle that the area has to be rotated, radian, counter-clockwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00474">474</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a0df347e3c69fec830b637de43bb9f2a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0df347e3c69fec830b637de43bb9f2a5">&#9670;&nbsp;</a></span>set2vector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; geometry_msgs::Point &gt; area::set2vector </td>
          <td>(</td>
          <td class="paramtype">set&lt; pair&lt; double, double &gt;&gt;&#160;</td>
          <td class="paramname"><em>set</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a set of double pairs to a vector of geometry_msgs/Point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">set</td><td>The set to convert. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The converted vector. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00331">331</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a3d12a8eeed699c1d037e17ba76854f3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d12a8eeed699c1d037e17ba76854f3c">&#9670;&nbsp;</a></span>set_origin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void area::set_origin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the origin of the local coordinate system from the GPS starting position or given parameter. </p>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00298">298</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a1e8293857d5b3cf324d7676893bcafbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e8293857d5b3cf324d7676893bcafbc">&#9670;&nbsp;</a></span>sort_coords()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void area::sort_coords </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sort the coordinates of the area counter-clockwise about the center by their angle [-π,π]. </p>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00340">340</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="ad6680911799897d1b8ca1b3d38525101"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6680911799897d1b8ca1b3d38525101">&#9670;&nbsp;</a></span>to_string()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string area::to_string </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return a string that uniquely represents the area. </p>
<dl class="section return"><dt>Returns</dt><dd>A concatenation of the area's coordinates. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00178">178</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="aaa40eb9bd032d8c486796cc7aa642dbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa40eb9bd032d8c486796cc7aa642dbe">&#9670;&nbsp;</a></span>translate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">geometry_msgs::Vector3 area::translate </td>
          <td>(</td>
          <td class="paramtype">nav_msgs::OccupancyGrid &amp;&#160;</td>
          <td class="paramname"><em>map</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Shift a map to be aligned with the grid, i.e., the origin should be an even number. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">map</td><td>A reference to the occupancy grid map to shift. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector that specifies the amount that the map has been shifted in x and y direction. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00532">532</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<a id="a643cf2e7d1285ff9f1f206b78d592bf4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a643cf2e7d1285ff9f1f206b78d592bf4">&#9670;&nbsp;</a></span>vector2set()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">set&lt; pair&lt; double, double &gt; &gt; area::vector2set </td>
          <td>(</td>
          <td class="paramtype">vector&lt; geometry_msgs::Point &gt;&#160;</td>
          <td class="paramname"><em>vector</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a vector of geometry_msgs/Point to a set of double pairs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vector</td><td>The vector to convert. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The converted set. </dd></dl>

<p class="definition">Definition at line <a class="el" href="area_8cpp_source.html#l00367">367</a> of file <a class="el" href="area_8cpp_source.html">area.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ad63f786362205207cb478cf5688ac7d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad63f786362205207cb478cf5688ac7d4">&#9670;&nbsp;</a></span>cell_warn</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int area::cell_warn</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Number of grid cells in the map above which a performance warning is issued. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00240">240</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="aa8158ad7955107d6b43c44485a27b872"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8158ad7955107d6b43c44485a27b872">&#9670;&nbsp;</a></span>coords</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">map&lt;double,set&lt;pair&lt;double,double&gt; &gt; &gt; area::coords</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The coordinates of the area at different rotations. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00146">146</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="aee0e0cdcaa918c41945407d82fe845a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee0e0cdcaa918c41945407d82fe845a1">&#9670;&nbsp;</a></span>coords_sorted</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">map&lt;double,map&lt;double, pair&lt;double,double&gt; &gt; &gt; area::coords_sorted</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The coordinates of the area at different rotations, sorted counter-clockwise about the center, starting from negative x-axis [-π,π]. They are mapped by the respective angle. </p>
<p>Mapping from rotation angle to mapping from angle around origin to coordinate. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00235">235</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="a689affa99750a54788bfa576f44cf76b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a689affa99750a54788bfa576f44cf76b">&#9670;&nbsp;</a></span>fix_to_pose_client</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ServiceClient area::fix_to_pose_client</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Service client to convert global (GPS) coordinates to the local coordinate system. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00223">223</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="a0eb55bca59864691f23b179e319884ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0eb55bca59864691f23b179e319884ec">&#9670;&nbsp;</a></span>global</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool area::global</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whether global (GPS) or local coordinates are used as source. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00151">151</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="a7b19ef007ee7041ea2f28ed26937f3b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b19ef007ee7041ea2f28ed26937f3b6">&#9670;&nbsp;</a></span>gridmaps</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">map&lt;double,map&lt;double,nav_msgs::OccupancyGrid&gt; &gt; area::gridmaps</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The grid map representing the area at different rotations and resolutions. </p>
<p>Mapping from rotation angle to mapping from resolution to grid map. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00141">141</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="a474af94f136070aae06e096a7521c367"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a474af94f136070aae06e096a7521c367">&#9670;&nbsp;</a></span>nh</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">NodeHandle area::nh</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>A node handle for the main ROS node. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00134">134</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="aeceda763636ebea2056ee7c8bec823e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeceda763636ebea2056ee7c8bec823e5">&#9670;&nbsp;</a></span>origin</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">geometry_msgs::Point area::origin</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The origin of the coordinate system. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00228">228</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="acc804cb034d0eaa28f5fbba56f538e54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc804cb034d0eaa28f5fbba56f538e54">&#9670;&nbsp;</a></span>resolution</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double area::resolution</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Resolution of the grid map representing the area in meter / cell. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00156">156</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<a id="afe291ca83ddc448185e99dc79eb0a223"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe291ca83ddc448185e99dc79eb0a223">&#9670;&nbsp;</a></span>rotation</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double area::rotation</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The angle that the map has to rotated by to make the bottom edge horizontal, radian, counter-clockwise. </p>

<p class="definition">Definition at line <a class="el" href="area_8h_source.html#l00245">245</a> of file <a class="el" href="area_8h_source.html">area.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="area_8h_source.html">area.h</a></li>
<li><a class="el" href="area_8cpp_source.html">area.cpp</a></li>
</ul>
</div><!-- contents -->

<br clear="all" />
<hr size="1"><div style="align: right;">
<a href="http://wiki.ros.org/area_provider">area_provider</a><br />
Author(s): Micha Sende <sende@lakeside-labs.com></br />
<small>autogenerated on Mon Jan 10 2022 15:13:45</small>
</div>
</body>
</html>
