<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>area_provider: area_provider.cpp Source File</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 id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">area_provider.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="area__provider_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;geometry_msgs/TransformStamped.h&gt;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="area_8h.html">lib/area.h</a>&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="keyword">using namespace </span>std;</div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="keyword">using namespace </span>ros;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="area__provider_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">   13</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="area__provider_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;{</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <span class="comment">// init ros node</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    init(argc, argv, <span class="stringliteral">&quot;area_provider&quot;</span>);</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    NodeHandle nh;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="comment">// area library</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <a class="code" href="classarea.html">area</a> lib;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="comment">// advertise services</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    ServiceServer closest_bound_service = nh.advertiseService(<span class="stringliteral">&quot;area/closest_bound&quot;</span>, &amp;<a class="code" href="classarea.html#a865850bb07513ee5ef3df6e17140c593">area::closest_bound</a>, &amp;lib);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    ServiceServer get_area_service      = nh.advertiseService(<span class="stringliteral">&quot;area/get_area&quot;</span>,      &amp;<a class="code" href="classarea.html#a0659d2b721466457e34484afab04e47c">area::get_area</a>, &amp;lib);</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    ServiceServer get_center_service    = nh.advertiseService(<span class="stringliteral">&quot;area/get_center&quot;</span>,    &amp;<a class="code" href="classarea.html#a5dd913ac23971e599fc44ec31a7c9d68">area::get_center</a>, &amp;lib);</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    ServiceServer get_map_service       = nh.advertiseService(<span class="stringliteral">&quot;area/get_map&quot;</span>,       &amp;<a class="code" href="classarea.html#ac00e659b1c1851e119fe6870eff8a0e4">area::get_map</a>, &amp;lib);</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    ServiceServer get_origin_service    = nh.advertiseService(<span class="stringliteral">&quot;area/get_origin&quot;</span>,    &amp;<a class="code" href="classarea.html#aa717c832cbeb66e12e7a8fcef30f0939">area::get_origin</a>, &amp;lib);</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    ServiceServer get_rotation_service  = nh.advertiseService(<span class="stringliteral">&quot;area/get_rotation&quot;</span>,  &amp;<a class="code" href="classarea.html#a1433f67bc4e2800f5e6bf5d97821b99f">area::get_rotation</a>, &amp;lib);</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    ServiceServer out_of_bounds_service = nh.advertiseService(<span class="stringliteral">&quot;area/out_of_bounds&quot;</span>, &amp;<a class="code" href="classarea.html#a86d143859a1eca41342fedc9b9c8600b">area::out_of_bounds</a>, &amp;lib);</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    ROS_DEBUG(<span class="stringliteral">&quot;AREA_PROV - Services are ready&quot;</span>);</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    spin();</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassarea_html_ac00e659b1c1851e119fe6870eff8a0e4"><div class="ttname"><a href="classarea.html#ac00e659b1c1851e119fe6870eff8a0e4">area::get_map</a></div><div class="ttdeci">bool get_map(nav_msgs::GetMap::Request &amp;req, nav_msgs::GetMap::Response &amp;res)</div><div class="ttdoc">Return the map that represents the environment in which the CPS is allowed to move.</div><div class="ttdef"><b>Definition:</b> <a href="area_8cpp_source.html#l00162">area.cpp:162</a></div></div>
<div class="ttc" id="aclassarea_html"><div class="ttname"><a href="classarea.html">area</a></div><div class="ttdoc">A class that holds the mission area and offers related services.</div><div class="ttdef"><b>Definition:</b> <a href="area_8h_source.html#l00022">area.h:22</a></div></div>
<div class="ttc" id="aclassarea_html_a5dd913ac23971e599fc44ec31a7c9d68"><div class="ttname"><a href="classarea.html#a5dd913ac23971e599fc44ec31a7c9d68">area::get_center</a></div><div class="ttdeci">bool get_center(cpswarm_msgs::GetPoint::Request &amp;req, cpswarm_msgs::GetPoint::Response &amp;res)</div><div class="ttdoc">Return the center of the area in which the CPS is allowed to move.</div><div class="ttdef"><b>Definition:</b> <a href="area_8cpp_source.html#l00082">area.cpp:82</a></div></div>
<div class="ttc" id="aclassarea_html_a865850bb07513ee5ef3df6e17140c593"><div class="ttname"><a href="classarea.html#a865850bb07513ee5ef3df6e17140c593">area::closest_bound</a></div><div class="ttdeci">bool closest_bound(cpswarm_msgs::ClosestBound::Request &amp;req, cpswarm_msgs::ClosestBound::Response &amp;res)</div><div class="ttdoc">Find the closest area bound to a given point.</div><div class="ttdef"><b>Definition:</b> <a href="area_8cpp_source.html#l00035">area.cpp:35</a></div></div>
<div class="ttc" id="aclassarea_html_a0659d2b721466457e34484afab04e47c"><div class="ttname"><a href="classarea.html#a0659d2b721466457e34484afab04e47c">area::get_area</a></div><div class="ttdeci">bool get_area(cpswarm_msgs::GetPoints::Request &amp;req, cpswarm_msgs::GetPoints::Response &amp;res)</div><div class="ttdoc">Return the bounding area in which the CPS is allowed to move.</div><div class="ttdef"><b>Definition:</b> <a href="area_8cpp_source.html#l00076">area.cpp:76</a></div></div>
<div class="ttc" id="aclassarea_html_a1433f67bc4e2800f5e6bf5d97821b99f"><div class="ttname"><a href="classarea.html#a1433f67bc4e2800f5e6bf5d97821b99f">area::get_rotation</a></div><div class="ttdeci">bool get_rotation(cpswarm_msgs::GetDouble::Request &amp;req, cpswarm_msgs::GetDouble::Response &amp;res)</div><div class="ttdoc">Get the rotation of the area given by coordinates. Assuming a quadrilateral.</div><div class="ttdef"><b>Definition:</b> <a href="area_8cpp_source.html#l00174">area.cpp:174</a></div></div>
<div class="ttc" id="aclassarea_html_aa717c832cbeb66e12e7a8fcef30f0939"><div class="ttname"><a href="classarea.html#aa717c832cbeb66e12e7a8fcef30f0939">area::get_origin</a></div><div class="ttdeci">bool get_origin(cpswarm_msgs::GetPoint::Request &amp;req, cpswarm_msgs::GetPoint::Response &amp;res)</div><div class="ttdoc">Return the origin of the coordinate system.</div><div class="ttdef"><b>Definition:</b> <a href="area_8cpp_source.html#l00168">area.cpp:168</a></div></div>
<div class="ttc" id="aarea__provider_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="area__provider_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdoc">Main function to be executed by ROS.</div><div class="ttdef"><b>Definition:</b> <a href="area__provider_8cpp_source.html#l00013">area_provider.cpp:13</a></div></div>
<div class="ttc" id="aarea_8h_html"><div class="ttname"><a href="area_8h.html">area.h</a></div></div>
<div class="ttc" id="aclassarea_html_a86d143859a1eca41342fedc9b9c8600b"><div class="ttname"><a href="classarea.html#a86d143859a1eca41342fedc9b9c8600b">area::out_of_bounds</a></div><div class="ttdeci">bool out_of_bounds(cpswarm_msgs::OutOfBounds::Request &amp;req, cpswarm_msgs::OutOfBounds::Response &amp;res)</div><div class="ttdoc">Determine whether a position is within the area using the winding number algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="area_8cpp_source.html#l00212">area.cpp:212</a></div></div>

<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 Sep 27 2021 14:41:08</small>
</div>
</body>
</html>
