Skip to content

Commit

Permalink
deploy: e9f3504
Browse files Browse the repository at this point in the history
  • Loading branch information
chapulina committed Jan 8, 2025
1 parent 04e1c21 commit 7437b9a
Show file tree
Hide file tree
Showing 17 changed files with 481 additions and 805 deletions.
12 changes: 6 additions & 6 deletions api/sensors/8/thermalcameraigngazebo.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ <h3><a class="anchor" id="autotoc_md43"></a>
<p>It is recommended to specify the ambient temperature and world's temperature gradient, since this dictates how objects with no specified temperature appear. Here's an example that sets the ambient temperature to 300 kelvin, and the temperature gradient to 0.1 Kelvin/meter:</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">atmosphere</span> <span class="keyword">type</span>=<span class="stringliteral">&quot;adiabatic&quot;</span>&gt;</div>
<div class="line"> &lt;<span class="keywordtype">temperature</span>&gt;300&lt;/<span class="keywordtype">temperature</span>&gt;</div>
<div class="line"> <span class="comment">���� U</span></div>
<div class="line"><span class="comment">�s�·U</span></div>
<div class="line"><span class="comment">�s�·U</span></div>
<div class="line"><span class="comment">�O&#x2407;��</span></div>
<div class="line"><span class="comment">�s�·U</span></div>
<div class="line"><span class="comment">~&#x2405;�·U</span></div>
<div class="line"> <span class="comment">&#x2410;žê]</span></div>
<div class="line"><span class="comment">&#x241C;\ì]LV</span></div>
<div class="line"><span class="comment">&#x241C;\ì]LV</span></div>
<div class="line"><span class="comment">ð?•ÿþ~</span></div>
<div class="line"><span class="comment">&#x241C;\ì]LV</span></div>
<div class="line"><span class="comment">üå&#x241B;]LV</span></div>
<div class="line"><span class="comment"> --&gt;</span></div>
<div class="line"> &lt;<span class="keywordtype">temperature_gradient</span>&gt;0.1&lt;/<span class="keywordtype">temperature_gradient</span>&gt;</div>
<div class="line">&lt;/<span class="keywordtype">atmosphere</span>&gt;</div>
Expand Down
4 changes: 2 additions & 2 deletions api/sim/8/meshtofuel.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ <h2><a class="anchor" id="autotoc_md185"></a>
<p>Copy <a href="https://github.com/gazebosim/gz-sim/raw/main/examples/worlds/import_mesh.sdf">this example world code</a> into a text editor and save it as <code>import_mesh.sdf</code>. This is a simple world SDF file, which you can learn more about on the <a href="http://sdformat.org/">SDF website</a>.</p>
<p>Scroll all the way to the bottom of the file until you see the <code>include</code> tag section following the <code>&lt;!-- mesh --&gt;</code> comment line.</p>
<div class="fragment"><div class="line">&lt;?<span class="keyword">xml</span> <span class="keyword">version</span>=<span class="stringliteral">&quot;1.0&quot;</span> ?&gt;</div>
<div class="line"><span class="comment">F8×o</span></div>
<div class="line"><span class="comment">&#x241A;²ÅoLV</span></div>
<div class="line"><span class="comment">š&#x241C;÷‡</span></div>
<div class="line"><span class="comment">N‘&#x2405;‡­U</span></div>
<div class="line"><span class="comment">--&gt;</span></div>
<div class="line">&lt;<span class="keywordtype">sdf</span> <span class="keyword">version</span>=<span class="stringliteral">&quot;1.6&quot;</span>&gt;</div>
<div class="line"> &lt;<span class="keywordtype">world</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;fuel&quot;</span>&gt;</div>
Expand Down
23 changes: 7 additions & 16 deletions api/sim/9/jointforcecmdcomponent.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ <h2>API Reference</h2>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>We will show how to use one of the components, <a class="el" href="namespacegz_1_1sim_1_1components.html#acb1fa80d3ae07408b4bd1efbeedaef15">gz::sim::components::JointForceCmd</a>, in a system. This component allows us to set the force command on a joint.</p>
<p>Programmatic usage of this component can be found in the source code for systems and integration tests, such as the <a href="https://github.com/gazebosim/gz-sim/blob/gz-sim8/test/integration/joint.cc">joint integration test</a>, the <a class="el" href="classgz_1_1sim_1_1systems_1_1ApplyJointForce.html">gz::sim::systems::ApplyJointForce</a> system (<a href="https://github.com/gazebosim/gz-sim/tree/gz-sim8/src/systems/apply_joint_force">source code</a>), and others.</p>
<p>The corresponding world SDF is <a href="https://github.com/gazebosim/gz-sim/blob/gz-sim8/examples/worlds/apply_joint_force.sdf"><code>apply_joint_force.sdf</code></a>, which you can look at in Gazebo:</p>
<p>Programmatic usage of this component can be found in the source code for systems and integration tests, such as the <a href="https://github.com/gazebosim/gz-sim/blob/gz-sim9/test/integration/joint.cc">joint integration test</a>, the <a class="el" href="classgz_1_1sim_1_1systems_1_1ApplyJointForce.html">gz::sim::systems::ApplyJointForce</a> system (<a href="https://github.com/gazebosim/gz-sim/tree/gz-sim9/src/systems/apply_joint_force">source code</a>), and others.</p>
<p>The corresponding world SDF is <a href="https://github.com/gazebosim/gz-sim/blob/gz-sim9/examples/worlds/apply_joint_force.sdf"><code>apply_joint_force.sdf</code></a>, which you can look at in Gazebo:</p>
<div class="fragment"><div class="line">gz sim apply_joint_force.sdf</div>
</div><!-- fragment --><p>We will walk through the relevant lines of source code in <code>ApplyJointForce</code> that interact with <code>JointForceCmd</code>.</p>
<h3><a class="anchor" id="autotoc_md70"></a>
Expand All @@ -166,20 +166,11 @@ <h3><a class="anchor" id="autotoc_md70"></a>
Modify the component</h3>
<p>Once we have the handle to an entity, we can modify components associated with it. A component may have been created at the time the world is loaded, or you may create a component at runtime if it does not exist yet.</p>
<p>In this case, we use the joint entity found above to look for and modify its <code>JointForceCmd</code> component. This will apply a force command to the joint.</p>
<p>In <code>PreUpdate()</code>, look for the component:</p>
<div class="fragment"><div class="line"> <span class="keyword">auto</span> force = _ecm.Component&lt;components::JointForceCmd&gt;(</div>
<div class="line"> this-&gt;dataPtr-&gt;jointEntity);</div>
</div><!-- fragment --><p>Create it if it does not exist yet, and modify it:</p>
<div class="fragment"><div class="line"> <span class="keywordflow">if</span> (force == <span class="keyword">nullptr</span>)</div>
<div class="line"> {</div>
<div class="line"> _ecm.CreateComponent(</div>
<div class="line"> this-&gt;dataPtr-&gt;jointEntity,</div>
<div class="line"> components::JointForceCmd({this-&gt;dataPtr-&gt;jointForceCmd}));</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">else</span></div>
<div class="line"> {</div>
<div class="line"> force-&gt;Data()[0] += this-&gt;dataPtr-&gt;jointForceCmd;</div>
<div class="line"> }</div>
<p>In <code>PreUpdate()</code>, look for the component. If it does not exist yet, create it, setting its default value to <code>{0.0}</code> (which means, in this particular case, a 1-element <code><a class="elRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt;double&gt;</code> with value 0.0 in its only element):</p>
<div class="fragment"><div class="line"> <span class="keyword">auto</span> force = _ecm.ComponentDefault&lt;components::JointForceCmd&gt;(</div>
<div class="line"> this-&gt;dataPtr-&gt;jointEntity, {0.0});</div>
</div><!-- fragment --><p>Now modify the value stored in the component:</p>
<div class="fragment"><div class="line"> force-&gt;Data()[0] += this-&gt;dataPtr-&gt;jointForceCmd;</div>
</div><!-- fragment --><p>where the scalar joint force command is declared as a member variable:</p>
<div class="fragment"><div class="line"> <span class="keyword">public</span>: <span class="keywordtype">double</span> jointForceCmd;</div>
</div><!-- fragment --><p>and a callback function allows the user to specify a force on a topic:</p>
Expand Down
9 changes: 5 additions & 4 deletions api/tools/2/dir_4de969a08cdb9e2945544977002a61e5.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,21 @@ <h2>API Reference</h2>
</div>
<main class="mdl-layout__content mdl-color--white">
<div id="top">
<!-- Generated by Doxygen 1.9.8 -->
<!-- Generated by Doxygen 1.9.1 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_4de969a08cdb9e2945544977002a61e5.html">gz-tools</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">gz-tools Directory Reference</div></div>
<div class="headertitle">
<div class="title">gz-tools Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="iconfclosed"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_7bb8401b5df17f91d90743e3448982a7.html">tutorials</a></td></tr>
<tr class="memitem:dir_7bb8401b5df17f91d90743e3448982a7"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_7bb8401b5df17f91d90743e3448982a7.html">tutorials</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
Expand Down
9 changes: 5 additions & 4 deletions api/tools/2/dir_68267d1309a1af8e8297ef4c3efbcdba.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,21 @@ <h2>API Reference</h2>
</div>
<main class="mdl-layout__content mdl-color--white">
<div id="top">
<!-- Generated by Doxygen 1.9.8 -->
<!-- Generated by Doxygen 1.9.1 -->
<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">src Directory Reference</div></div>
<div class="headertitle">
<div class="title">src Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="iconfclosed"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_4de969a08cdb9e2945544977002a61e5.html">gz-tools</a></td></tr>
<tr class="memitem:dir_4de969a08cdb9e2945544977002a61e5"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_4de969a08cdb9e2945544977002a61e5.html">gz-tools</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
Expand Down
5 changes: 3 additions & 2 deletions api/tools/2/dir_7bb8401b5df17f91d90743e3448982a7.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,15 @@ <h2>API Reference</h2>
</div>
<main class="mdl-layout__content mdl-color--white">
<div id="top">
<!-- Generated by Doxygen 1.9.8 -->
<!-- Generated by Doxygen 1.9.1 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_4de969a08cdb9e2945544977002a61e5.html">gz-tools</a></li><li class="navelem"><a class="el" href="dir_7bb8401b5df17f91d90743e3448982a7.html">tutorials</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">tutorials Directory Reference</div></div>
<div class="headertitle">
<div class="title">tutorials Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
Expand Down
Loading

0 comments on commit 7437b9a

Please sign in to comment.