<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8"/> <title>OMPL: ompl::base::PlannerThreadedTerminationCondition Class Reference</title> <meta name="author" content="Ioan A. Șucan, Mark Moll, Lydia E. Kavraki"> <link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="../css/print.css" type="text/css" media="print"> <!--[if lt IE 7]> <script type="text/javascript" src="../js/jquery/jquery.js"></script> <script type="text/javascript" src="../js/jquery/jquery.dropdown.js"></script> <![endif]--> <script type="text/javaScript" src="search/search.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-9156598-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body onload='searchBox.OnSelectItem(0);'> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search API'); --></script> <div class="navigation" id="top"> <div class="tabs" id="ompltitle"> <ul class="tablist"> <li>The Open Motion Planning Library</li> <li id="searchli"> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search API" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <ul id="nav" class="dropdown"> <li class="first"><a href="index.html">Home</a></li> <li><a href="download.html">Download</a></li> <li><a href="documentation.html">Documentation</a></li> <li><span class="dir">Code API</span> <ul> <li><a href="api_overview.html">API Overview</a></li> <li><a href="namespaces.html">Namespaces</a></li> <li><a href="annotated.html">Classes</a></li> <li><a href="files.html">Files</a></li> <li><a href="dirs.html">Directories</a></li> </ul> </li> <li><span class="dir">Community</span> <ul> <li><a href="developers.html">Developers</a></li> <li><a href="thirdparty.html">Contributions</a></li> <li><a href="education.html">Education</a></li> <li><a href="gallery.html">Gallery</a></li> </ul> </li> <li><span class="dir">About</span> <ul> <li><a href="license.html">License</a></li> <li><a href="citations.html">Citations</a></li> <li><a href="acknowledgements.html">Acknowledgments</a></li> <li><a href="contact.html">Contact Us</a></li> </ul> </li> </ul> </div> <!--- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="" frameborder="0"name="MSearchResults" id="MSearchResults"></iframe> </div> <div class="container"> <div class="span-22 push-2 first last"> <div> <!-- Generated by Doxygen 1.7.4 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceompl.html">ompl</a> </li> <li class="navelem"><a class="el" href="namespaceompl_1_1base.html">base</a> </li> <li class="navelem"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html">PlannerThreadedTerminationCondition</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#pro-attribs">Protected Attributes</a> </div> <div class="headertitle"> <div class="title">ompl::base::PlannerThreadedTerminationCondition Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="ompl::base::PlannerThreadedTerminationCondition" --><!-- doxytag: inherits="ompl::base::PlannerTerminationCondition" --> <p>Termination condition with lazy evaluation. This is just as a regular termination condition, except the condition is actually evaluated by <a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a39d7d436d7b07dd2061349f0fbac24f3" title="Evaluate the termination condition. By default this is a call to fn_() from the base class...">computeEval()</a> and the return value is stored in evalValue_. Every time <a class="el" href="classompl_1_1base_1_1PlannerTerminationCondition.html#afb1d7afe583bf5d9380540251e17d723" title="The implementation of some termination condition. By default, this just calls fn_() ...">eval()</a> is called, evalValue_ is returned instead of actually evaluating the termination condition. Furthermore, the termination condition is evaluated every period_ seconds in a separate thread. The thread automatically starts when the condition is constructed and it terminates when the condition becomes true. <a href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#details">More...</a></p> <p><code>#include <<a class="el" href="PlannerTerminationCondition_8h_source.html">PlannerTerminationCondition.h</a>></code></p> <div class="dynheader"> Inheritance diagram for ompl::base::PlannerThreadedTerminationCondition:</div> <div class="dyncontent"> <div class="center"><img src="classompl_1_1base_1_1PlannerThreadedTerminationCondition__inherit__graph.png" border="0" usemap="#ompl_1_1base_1_1PlannerThreadedTerminationCondition_inherit__map" alt="Inheritance graph"/></div> <map name="ompl_1_1base_1_1PlannerThreadedTerminationCondition_inherit__map" id="ompl_1_1base_1_1PlannerThreadedTerminationCondition_inherit__map"> <area shape="rect" id="node2" href="classompl_1_1base_1_1PlannerTerminationCondition.html" title="Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe..." alt="" coords="32,5,293,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classompl_1_1base_1_1PlannerThreadedTerminationCondition-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab0fa2bb0ca2c81bc89be5c0091745ba6"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::PlannerThreadedTerminationCondition" ref="ab0fa2bb0ca2c81bc89be5c0091745ba6" args="(const PlannerTerminationConditionFn &fn, double period)" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#ab0fa2bb0ca2c81bc89be5c0091745ba6">PlannerThreadedTerminationCondition</a> (const <a class="el" href="namespaceompl_1_1base.html#a23037e2dfd720e4b1b7b4d1c6b09ba1d">PlannerTerminationConditionFn</a> &fn, double period)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a termination condition that is evaluated every <em>period</em> seconds. The evaluation of the condition (the call to <a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a39d7d436d7b07dd2061349f0fbac24f3" title="Evaluate the termination condition. By default this is a call to fn_() from the base class...">computeEval()</a>) consists of calling <em>fn()</em>. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a935d4bca1172f0f2fa650d94bca37c8b"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::terminate" ref="a935d4bca1172f0f2fa650d94bca37c8b" args="(bool flag)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a935d4bca1172f0f2fa650d94bca37c8b">terminate</a> (bool flag)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Notify that the condition for termination should become true, regardless of what <a class="el" href="classompl_1_1base_1_1PlannerTerminationCondition.html#afb1d7afe583bf5d9380540251e17d723" title="The implementation of some termination condition. By default, this just calls fn_() ...">eval()</a> returns. Furthermore, if <em>flag</em> is true and the thread evaluating the termination condition is active, the thread is terminated. The tread will be restarted if <em>flag</em> = false is passed. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9c4c9e860b01cd5a7dab3a3c499b6c51"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::eval" ref="a9c4c9e860b01cd5a7dab3a3c499b6c51" args="(void) const " --> virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a9c4c9e860b01cd5a7dab3a3c499b6c51">eval</a> (void) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Simply return the cached value for the termination condition (evalValue_) <br/></td></tr> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39d7d436d7b07dd2061349f0fbac24f3"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::computeEval" ref="a39d7d436d7b07dd2061349f0fbac24f3" args="(void)" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a39d7d436d7b07dd2061349f0fbac24f3">computeEval</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluate the termination condition. By default this is a call to <a class="el" href="classompl_1_1base_1_1PlannerTerminationCondition.html#a5df0f0d7b343d19b38c29342914f3fd5" title="Function pointer to the piece of code that decides whether a termination condition has been met...">fn_()</a> from the base class. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9222cd85bc23fd6e4bca8e5f6b3365ee"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::startEvalThread" ref="a9222cd85bc23fd6e4bca8e5f6b3365ee" args="(void)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a9222cd85bc23fd6e4bca8e5f6b3365ee">startEvalThread</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Start the thread evaluating termination conditions if not already started. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0790b962d20ac3c7ea03a99e43efe6e7"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::stopEvalThread" ref="a0790b962d20ac3c7ea03a99e43efe6e7" args="(void)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a0790b962d20ac3c7ea03a99e43efe6e7">stopEvalThread</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stop the thread evaluating termination conditions if not already stopped. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7d0ba1d7e33560e4330a59c0ffd7a40"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::periodicEval" ref="ae7d0ba1d7e33560e4330a59c0ffd7a40" args="(void)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#ae7d0ba1d7e33560e4330a59c0ffd7a40">periodicEval</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Worker function that runs in a separate thread (calls <a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a39d7d436d7b07dd2061349f0fbac24f3" title="Evaluate the termination condition. By default this is a call to fn_() from the base class...">computeEval()</a>) <br/></td></tr> <tr><td colspan="2"><h2><a name="pro-attribs"></a> Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aab2c1e890c0cedb6849a9dad0d56d686"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::thread_" ref="aab2c1e890c0cedb6849a9dad0d56d686" args="" --> boost::thread * </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#aab2c1e890c0cedb6849a9dad0d56d686">thread_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Thread for <a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#ae7d0ba1d7e33560e4330a59c0ffd7a40" title="Worker function that runs in a separate thread (calls computeEval())">periodicEval()</a> <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afefdd25acd6251ec3d9756b352177a23"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::evalValue_" ref="afefdd25acd6251ec3d9756b352177a23" args="" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#afefdd25acd6251ec3d9756b352177a23">evalValue_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Cached value returned by <a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a39d7d436d7b07dd2061349f0fbac24f3" title="Evaluate the termination condition. By default this is a call to fn_() from the base class...">computeEval()</a> <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb567d23c1e1ebe7a7e93f03c741523d"></a><!-- doxytag: member="ompl::base::PlannerThreadedTerminationCondition::period_" ref="adb567d23c1e1ebe7a7e93f03c741523d" args="" --> double </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#adb567d23c1e1ebe7a7e93f03c741523d">period_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Interval of time (seconds) to wait between calls to <a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a39d7d436d7b07dd2061349f0fbac24f3" title="Evaluate the termination condition. By default this is a call to fn_() from the base class...">computeEval()</a> <br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Termination condition with lazy evaluation. This is just as a regular termination condition, except the condition is actually evaluated by <a class="el" href="classompl_1_1base_1_1PlannerThreadedTerminationCondition.html#a39d7d436d7b07dd2061349f0fbac24f3" title="Evaluate the termination condition. By default this is a call to fn_() from the base class...">computeEval()</a> and the return value is stored in evalValue_. Every time <a class="el" href="classompl_1_1base_1_1PlannerTerminationCondition.html#afb1d7afe583bf5d9380540251e17d723" title="The implementation of some termination condition. By default, this just calls fn_() ...">eval()</a> is called, evalValue_ is returned instead of actually evaluating the termination condition. Furthermore, the termination condition is evaluated every period_ seconds in a separate thread. The thread automatically starts when the condition is constructed and it terminates when the condition becomes true. </p> <p>Definition at line <a class="el" href="PlannerTerminationCondition_8h_source.html#l00110">110</a> of file <a class="el" href="PlannerTerminationCondition_8h_source.html">PlannerTerminationCondition.h</a>.</p> </div><hr/>The documentation for this class was generated from the following files:<ul> <li>src/ompl/base/<a class="el" href="PlannerTerminationCondition_8h_source.html">PlannerTerminationCondition.h</a></li> <li>src/ompl/base/src/<a class="el" href="PlannerTerminationCondition_8cpp_source.html">PlannerTerminationCondition.cpp</a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div> <div class="footer span-22 push-2 last"> <a href="http://www.kavrakilab.org">Physical and Biological Computing Group</a> • <a href="http://www.cs.rice.edu">Department of Computer Science</a> • <a href="http://www.rice.edu">Rice University</a><br> <div class="gray">Generated on Sun Oct 9 2011 23:04:42 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.7.4</div> </div> </div> </body> </html>