-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_params_8hpp_source.html
More file actions
89 lines (87 loc) · 18 KB
/
_params_8hpp_source.html
File metadata and controls
89 lines (87 loc) · 18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Ackermann Controller: include/Params.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Ackermann Controller
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Params.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="_params_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include <memory></span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include <atomic></span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#include <limits></span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">namespace </span><a class="code" href="namespaceackermann.html">ackermann</a> {</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="structackermann_1_1_p_i_d_params.html"> 21</a></span> <span class="keyword">struct </span><a class="code" href="structackermann_1_1_p_i_d_params.html">PIDParams</a> {</div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="structackermann_1_1_p_i_d_params.html#ac94fb3a31bae97e0a81be34d59c01e23"> 25</a></span>  std::atomic<double> <a class="code" href="structackermann_1_1_p_i_d_params.html#ac94fb3a31bae97e0a81be34d59c01e23">kp</a>;</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="structackermann_1_1_p_i_d_params.html#abfd61b70a679bcf4c8fdde0caaee3e55"> 29</a></span>  std::atomic<double> <a class="code" href="structackermann_1_1_p_i_d_params.html#abfd61b70a679bcf4c8fdde0caaee3e55">ki</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="structackermann_1_1_p_i_d_params.html#afe64009f02585364c495db3e271cafaa"> 33</a></span>  std::atomic<double> <a class="code" href="structackermann_1_1_p_i_d_params.html#afe64009f02585364c495db3e271cafaa">kd</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="comment">// constructor</span></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structackermann_1_1_p_i_d_params.html#abc40fbe7129262423b702336914df26a"> 42</a></span> <span class="comment"></span> <span class="keyword">explicit</span> <a class="code" href="structackermann_1_1_p_i_d_params.html#abc40fbe7129262423b702336914df26a">PIDParams</a>(<span class="keywordtype">double</span> kp_ = 0.0, <span class="keywordtype">double</span> ki_ = 0.0, <span class="keywordtype">double</span> kd_ = 0.0)</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  : kp(kp_), ki(ki_), kd(kd_)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  {};</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> };</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html"> 50</a></span> <span class="keyword">struct </span><a class="code" href="structackermann_1_1_params.html">Params</a> {</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a065f737848871356232ff7092baed140"> 54</a></span>  std::atomic<double> control_frequency {100.0};</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#ab41d61361183158ea37d6c8577dcad82"> 59</a></span>  std::atomic<double> velocity_max {10.0};</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#ad6c5babc5a52cf56d57ea664ca5a0c04"> 64</a></span>  std::atomic<double> velocity_min {0.0};</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a7273215906e350eb609b463398acbfba"> 68</a></span>  std::atomic<double> acceleration_max {50.0};</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a9b8d3b799a556afb69f3f8acd0abfa66"> 72</a></span>  std::atomic<double> acceleration_min {-50.0};</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#aad93f5ef58bf87db04c9e21f3c1067ca"> 77</a></span>  std::atomic<double> angular_velocity_max {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  std::numeric_limits<double>::max()};</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a20071280825a5dfdf0eba12fa45c6886"> 83</a></span>  std::atomic<double> angular_velocity_min {</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  std::numeric_limits<double>::lowest()};</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a69fd058a9c869f1db12b030a99f3141d"> 89</a></span>  std::atomic<double> angular_acceleration_max {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  std::numeric_limits<double>::max()};</div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a5baf993ebf740d79eeb1e19e041ceb8e"> 95</a></span>  std::atomic<double> angular_acceleration_min {</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  std::numeric_limits<double>::lowest()};</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a77e9e8355199625173a243b96963a543"> 100</a></span>  std::atomic<double> throttle_max {1.0};</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a105dda9186730914c63f6e39593d0e77"> 104</a></span>  std::atomic<double> throttle_min {0.0};</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="comment">// PID parameters</span></div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#adcbcf331c428efc01e2be5da332b6e99"> 110</a></span> <span class="comment"></span> <span class="keyword">const</span> std::shared_ptr<PIDParams> <a class="code" href="structackermann_1_1_params.html#adcbcf331c428efc01e2be5da332b6e99">pid_speed</a>;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#ab8ef5ea67822f187c7a03f94e20a24d0"> 114</a></span>  <span class="keyword">const</span> std::shared_ptr<PIDParams> <a class="code" href="structackermann_1_1_params.html#ab8ef5ea67822f187c7a03f94e20a24d0">pid_heading</a>;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// required parameters</span></div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a68ecfa01510e295926dd23b1cfb1d83a"> 120</a></span> <span class="comment"></span> std::atomic<double> <a class="code" href="structackermann_1_1_params.html#a68ecfa01510e295926dd23b1cfb1d83a">wheel_base</a>;</div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a429093b21328bce330f930f55c1e3b3c"> 124</a></span>  std::atomic<double> <a class="code" href="structackermann_1_1_params.html#a429093b21328bce330f930f55c1e3b3c">track_width</a>;</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="structackermann_1_1_params.html#a7bfb774e679c8e5372ec512a62f5d0ce"> 128</a></span>  std::atomic<double> <a class="code" href="structackermann_1_1_params.html#a7bfb774e679c8e5372ec512a62f5d0ce">max_steering_angle</a>;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> </div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="comment">/* @brief Constructor */</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <a class="code" href="structackermann_1_1_params.html">Params</a>(<span class="keywordtype">double</span> wheel_base_,</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordtype">double</span> track_width_,</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordtype">double</span> max_steering_angle_,</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordtype">double</span> kp_speed_,</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordtype">double</span> kp_heading_)</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  : pid_speed(std::make_shared<<a class="code" href="structackermann_1_1_p_i_d_params.html">PIDParams</a>>(kp_speed_)),</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  pid_heading(std::make_shared<<a class="code" href="structackermann_1_1_p_i_d_params.html">PIDParams</a>>(kp_heading_)),</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  wheel_base(wheel_base_),</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  track_width(track_width_),</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  max_steering_angle(max_steering_angle_)</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  {}</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> };</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span> } <span class="comment">// namespace ackermann</span></div><div class="ttc" id="structackermann_1_1_params_html_a7bfb774e679c8e5372ec512a62f5d0ce"><div class="ttname"><a href="structackermann_1_1_params.html#a7bfb774e679c8e5372ec512a62f5d0ce">ackermann::Params::max_steering_angle</a></div><div class="ttdeci">std::atomic< double > max_steering_angle</div><div class="ttdoc">Maximum angle of steering mechanism (rad) </div><div class="ttdef"><b>Definition:</b> Params.hpp:128</div></div>
<div class="ttc" id="structackermann_1_1_p_i_d_params_html_abc40fbe7129262423b702336914df26a"><div class="ttname"><a href="structackermann_1_1_p_i_d_params.html#abc40fbe7129262423b702336914df26a">ackermann::PIDParams::PIDParams</a></div><div class="ttdeci">PIDParams(double kp_=0.0, double ki_=0.0, double kd_=0.0)</div><div class="ttdoc">Constructor for PID Parameter structure. </div><div class="ttdef"><b>Definition:</b> Params.hpp:42</div></div>
<div class="ttc" id="structackermann_1_1_params_html"><div class="ttname"><a href="structackermann_1_1_params.html">ackermann::Params</a></div><div class="ttdoc">Structure containing rover characteristics and limitations. </div><div class="ttdef"><b>Definition:</b> Params.hpp:50</div></div>
<div class="ttc" id="structackermann_1_1_params_html_adcbcf331c428efc01e2be5da332b6e99"><div class="ttname"><a href="structackermann_1_1_params.html#adcbcf331c428efc01e2be5da332b6e99">ackermann::Params::pid_speed</a></div><div class="ttdeci">const std::shared_ptr< PIDParams > pid_speed</div><div class="ttdoc">Speed controller PID parameters. </div><div class="ttdef"><b>Definition:</b> Params.hpp:110</div></div>
<div class="ttc" id="namespaceackermann_html"><div class="ttname"><a href="namespaceackermann.html">ackermann</a></div><div class="ttdoc">Namespace for Ackermann controller implementation. </div><div class="ttdef"><b>Definition:</b> Controller.cpp:14</div></div>
<div class="ttc" id="structackermann_1_1_p_i_d_params_html_abfd61b70a679bcf4c8fdde0caaee3e55"><div class="ttname"><a href="structackermann_1_1_p_i_d_params.html#abfd61b70a679bcf4c8fdde0caaee3e55">ackermann::PIDParams::ki</a></div><div class="ttdeci">std::atomic< double > ki</div><div class="ttdoc">Integral parameter for PID controller. </div><div class="ttdef"><b>Definition:</b> Params.hpp:29</div></div>
<div class="ttc" id="structackermann_1_1_p_i_d_params_html_afe64009f02585364c495db3e271cafaa"><div class="ttname"><a href="structackermann_1_1_p_i_d_params.html#afe64009f02585364c495db3e271cafaa">ackermann::PIDParams::kd</a></div><div class="ttdeci">std::atomic< double > kd</div><div class="ttdoc">Derivative parameter for PID controller. </div><div class="ttdef"><b>Definition:</b> Params.hpp:33</div></div>
<div class="ttc" id="structackermann_1_1_p_i_d_params_html"><div class="ttname"><a href="structackermann_1_1_p_i_d_params.html">ackermann::PIDParams</a></div><div class="ttdoc">Structure containing PID parameters. </div><div class="ttdef"><b>Definition:</b> Params.hpp:21</div></div>
<div class="ttc" id="structackermann_1_1_params_html_a429093b21328bce330f930f55c1e3b3c"><div class="ttname"><a href="structackermann_1_1_params.html#a429093b21328bce330f930f55c1e3b3c">ackermann::Params::track_width</a></div><div class="ttdeci">std::atomic< double > track_width</div><div class="ttdoc">Width between left and right tires (m) </div><div class="ttdef"><b>Definition:</b> Params.hpp:124</div></div>
<div class="ttc" id="structackermann_1_1_params_html_a68ecfa01510e295926dd23b1cfb1d83a"><div class="ttname"><a href="structackermann_1_1_params.html#a68ecfa01510e295926dd23b1cfb1d83a">ackermann::Params::wheel_base</a></div><div class="ttdeci">std::atomic< double > wheel_base</div><div class="ttdoc">Length between front and rear axles (m) </div><div class="ttdef"><b>Definition:</b> Params.hpp:120</div></div>
<div class="ttc" id="structackermann_1_1_params_html_ab8ef5ea67822f187c7a03f94e20a24d0"><div class="ttname"><a href="structackermann_1_1_params.html#ab8ef5ea67822f187c7a03f94e20a24d0">ackermann::Params::pid_heading</a></div><div class="ttdeci">const std::shared_ptr< PIDParams > pid_heading</div><div class="ttdoc">Heading controller PID parameters. </div><div class="ttdef"><b>Definition:</b> Params.hpp:114</div></div>
<div class="ttc" id="structackermann_1_1_p_i_d_params_html_ac94fb3a31bae97e0a81be34d59c01e23"><div class="ttname"><a href="structackermann_1_1_p_i_d_params.html#ac94fb3a31bae97e0a81be34d59c01e23">ackermann::PIDParams::kp</a></div><div class="ttdeci">std::atomic< double > kp</div><div class="ttdoc">Proportinal parameter for PID controller. </div><div class="ttdef"><b>Definition:</b> Params.hpp:25</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>