<!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::control::CompoundControlSampler 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_1control.html">control</a> </li> <li class="navelem"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html">CompoundControlSampler</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pro-attribs">Protected Attributes</a> </div> <div class="headertitle"> <div class="title">ompl::control::CompoundControlSampler Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="ompl::control::CompoundControlSampler" --><!-- doxytag: inherits="ompl::control::ControlSampler" --> <p>Definition of a compound control sampler. This is useful to construct samplers for compound controls. <a href="classompl_1_1control_1_1CompoundControlSampler.html#details">More...</a></p> <p><code>#include <<a class="el" href="ControlSampler_8h_source.html">ControlSampler.h</a>></code></p> <div class="dynheader"> Inheritance diagram for ompl::control::CompoundControlSampler:</div> <div class="dyncontent"> <div class="center"><img src="classompl_1_1control_1_1CompoundControlSampler__inherit__graph.png" border="0" usemap="#ompl_1_1control_1_1CompoundControlSampler_inherit__map" alt="Inheritance graph"/></div> <map name="ompl_1_1control_1_1CompoundControlSampler_inherit__map" id="ompl_1_1control_1_1CompoundControlSampler_inherit__map"> <area shape="rect" id="node2" href="classompl_1_1control_1_1ControlSampler.html" title="Abstract definition of a control sampler. Motion planners that need to sample controls will call func..." alt="" coords="37,5,232,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classompl_1_1control_1_1CompoundControlSampler-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="ac54b1bec066cc5c008fa775862259b26"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::CompoundControlSampler" ref="ac54b1bec066cc5c008fa775862259b26" args="(const ControlSpace *space)" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#ac54b1bec066cc5c008fa775862259b26">CompoundControlSampler</a> (const <a class="el" href="classompl_1_1control_1_1ControlSpace.html">ControlSpace</a> *space)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05f5cb008f8a6726c15eafaab43be96c"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::~CompoundControlSampler" ref="a05f5cb008f8a6726c15eafaab43be96c" args="(void)" --> virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a05f5cb008f8a6726c15eafaab43be96c">~CompoundControlSampler</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. This frees the added samplers as well. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a52d2e68db2f9b1531de74a35ff9a7e8b"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::addSampler" ref="a52d2e68db2f9b1531de74a35ff9a7e8b" args="(const ControlSamplerPtr &sampler)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a52d2e68db2f9b1531de74a35ff9a7e8b">addSampler</a> (const <a class="el" href="classompl_1_1control_1_1ControlSamplerPtr.html">ControlSamplerPtr</a> &sampler)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a sampler as part of the new compound sampler. This sampler is used to sample part of the compound control. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6314112308482364122c771c7456fcaf"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::sample" ref="a6314112308482364122c771c7456fcaf" args="(Control *control)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a6314112308482364122c771c7456fcaf">sample</a> (<a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *control)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sample a control. All other control sampling functions default to this one, unless a user-specified implementation is given. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0c643e31087483d3f1bdd5ca25bdd86"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::sample" ref="af0c643e31087483d3f1bdd5ca25bdd86" args="(Control *control, const base::State *state)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#af0c643e31087483d3f1bdd5ca25bdd86">sample</a> (<a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *control, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *state)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sample a control, given it is applied to a specific state (<em>state</em>). The default implementation calls the previous definition of <a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a6314112308482364122c771c7456fcaf" title="Sample a control. All other control sampling functions default to this one, unless a user-specified i...">sample()</a>. Providing a different implementation of this function is useful if, for example, the sampling of controls depends on the state of the system. When attempting to sample controls that keep a system stable, for example, knowing the state at which the control is applied is important. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d33f40da510aad59525e4717e69c509"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::sampleNext" ref="a0d33f40da510aad59525e4717e69c509" args="(Control *control, const Control *previous)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a0d33f40da510aad59525e4717e69c509">sampleNext</a> (<a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *control, const <a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *previous)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sample a control, given the previously applied control. The default implementation calls the first definition of <a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a6314112308482364122c771c7456fcaf" title="Sample a control. All other control sampling functions default to this one, unless a user-specified i...">sample()</a>. For some systems it is possible that large changes in controls are not desirable. For example, switching from maximum acceleration to maximum deceleration is not desirable when driving a car. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad94fe6ad00a8e302bf9952c25de54ba3"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::sampleNext" ref="ad94fe6ad00a8e302bf9952c25de54ba3" args="(Control *control, const Control *previous, const base::State *state)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#ad94fe6ad00a8e302bf9952c25de54ba3">sampleNext</a> (<a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *control, const <a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *previous, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *state)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sample a control, given the previously applied control and that it is applied to a specific state. The default implementation calls the first definition of <a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a6314112308482364122c771c7456fcaf" title="Sample a control. All other control sampling functions default to this one, unless a user-specified i...">sample()</a>, even if other implementations of the <a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a0d33f40da510aad59525e4717e69c509" title="Sample a control, given the previously applied control. The default implementation calls the first de...">sampleNext()</a> shown above are provided. Often this function needs to be overridden as it is the function planners typically call. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a79a7d8e1c4dfc41179de2d728890e8a2"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::sampleTo" ref="a79a7d8e1c4dfc41179de2d728890e8a2" args="(Control *control, const base::State *source, const base::State *target)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a79a7d8e1c4dfc41179de2d728890e8a2">sampleTo</a> (<a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *control, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *source, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *target)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sample a control given that it will be applied to state <em>state</em> and the intention is to reach state <em>target</em>. This is useful for some algorithms that have a notion of direction in their exploration (e.g., ). By default, this function calls the first definition of <a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a6314112308482364122c771c7456fcaf" title="Sample a control. All other control sampling functions default to this one, unless a user-specified i...">sample()</a>. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac6a55ad76717944561e500a1d44cb879"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::sampleTo" ref="ac6a55ad76717944561e500a1d44cb879" args="(Control *control, const Control *previous, const base::State *source, const base::State *target)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#ac6a55ad76717944561e500a1d44cb879">sampleTo</a> (<a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *control, const <a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *previous, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *source, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *target)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sample a control given that it will be applied to state <em>state</em> and the intention is to reach state <em>target</em>. Also take into account the fact that the previously applied control is <em>previous</em>. This is useful for some algorithms that have a notion of direction in their exploration (e.g., ). By default, this function calls the first definition of <a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a6314112308482364122c771c7456fcaf" title="Sample a control. All other control sampling functions default to this one, unless a user-specified i...">sample()</a>. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a823da7ae5d940288d0daef39e5c2623d"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::sampleTo" ref="a823da7ae5d940288d0daef39e5c2623d" args="(Control *control, unsigned int minSteps, unsigned int maxSteps, const base::State *source, const base::State *target)" --> virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a823da7ae5d940288d0daef39e5c2623d">sampleTo</a> (<a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *control, unsigned int minSteps, unsigned int maxSteps, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *source, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *target)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sample a control given that it will be applied to state <em>state</em> and the intention is to reach state <em>target</em>. This is useful for some algorithms that have a notion of direction in their exploration (e.g., ). Furthermore, return the duration for which this control should be applied. By default, this function calls the first definition of <a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a6314112308482364122c771c7456fcaf" title="Sample a control. All other control sampling functions default to this one, unless a user-specified i...">sample()</a> and returns the value of sampleStepCount(<em>minSteps</em>, <em>maxSteps</em>). <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a286b62e74049f558b8d397e6709039e2"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::sampleTo" ref="a286b62e74049f558b8d397e6709039e2" args="(Control *control, unsigned int minSteps, unsigned int maxSteps, const Control *previous, const base::State *source, const base::State *target)" --> virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a286b62e74049f558b8d397e6709039e2">sampleTo</a> (<a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *control, unsigned int minSteps, unsigned int maxSteps, const <a class="el" href="classompl_1_1control_1_1Control.html">Control</a> *previous, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *source, const <a class="el" href="classompl_1_1base_1_1State.html">base::State</a> *target)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sample a control given that it will be applied to state <em>state</em> and the intention is to reach state <em>target</em>. Also take into account the fact that the previously applied control is <em>previous</em>. This is useful for some algorithms that have a notion of direction in their exploration (e.g., ). Furthermore, return the duration for which this control should be applied. By default, this function calls the first definition of <a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#a6314112308482364122c771c7456fcaf" title="Sample a control. All other control sampling functions default to this one, unless a user-specified i...">sample()</a> and returns the value of sampleStepCount(<em>minSteps</em>, <em>maxSteps</em>). <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="ab2ac5717ef0a8cfd0b2641496d9218e8"></a><!-- doxytag: member="ompl::control::CompoundControlSampler::samplers_" ref="ab2ac5717ef0a8cfd0b2641496d9218e8" args="" --> std::vector< <a class="el" href="classompl_1_1control_1_1ControlSamplerPtr.html">ControlSamplerPtr</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classompl_1_1control_1_1CompoundControlSampler.html#ab2ac5717ef0a8cfd0b2641496d9218e8">samplers_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The instances of samplers used for compound sampler. <br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Definition of a compound control sampler. This is useful to construct samplers for compound controls. </p> <p>Definition at line <a class="el" href="ControlSampler_8h_source.html#l00165">165</a> of file <a class="el" href="ControlSampler_8h_source.html">ControlSampler.h</a>.</p> </div><hr/>The documentation for this class was generated from the following files:<ul> <li>src/ompl/control/<a class="el" href="ControlSampler_8h_source.html">ControlSampler.h</a></li> <li>src/ompl/control/src/<a class="el" href="ControlSampler_8cpp_source.html">ControlSampler.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>