Skip to content

Commit

Permalink
Deployed f5cc1fa to main with MkDocs 1.4.3 and mike 2.2.0.dev0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 8, 2025
1 parent 822bf86 commit 6f777f7
Show file tree
Hide file tree
Showing 5 changed files with 340 additions and 332 deletions.
40 changes: 20 additions & 20 deletions main/contributing/testing-guidelines/integration-testing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7811,21 +7811,21 @@ <h3 id="integration-test-with-a-single-node-component-test">Integration test wit
or follow the steps below.</p>
<p>Taking <a href="https://github.com/autowarefoundation/autoware.universe/blob/main/map/autoware_map_loader/test/lanelet2_map_loader_launch.test.py"><code>test/lanelet2_map_loader_launch.test.py</code></a> as an example,
first dependencies are imported:</p>
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">unittest</span>

<span class="kn">from</span> <span class="nn">ament_index_python</span> <span class="kn">import</span> <span class="n">get_package_share_directory</span>
<span class="kn">import</span> <span class="nn">launch</span>
<span class="kn">from</span> <span class="nn">launch</span> <span class="kn">import</span> <span class="n">LaunchDescription</span>
<span class="kn">from</span> <span class="nn">launch_ros.actions</span> <span class="kn">import</span> <span class="n">Node</span>
<span class="kn">import</span> <span class="nn">launch_testing</span>
<span class="kn">import</span> <span class="nn">pytest</span>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">unittest</span>

<span class="kn">from</span><span class="w"> </span><span class="nn">ament_index_python</span><span class="w"> </span><span class="kn">import</span> <span class="n">get_package_share_directory</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">launch</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch</span><span class="w"> </span><span class="kn">import</span> <span class="n">LaunchDescription</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">launch_ros.actions</span><span class="w"> </span><span class="kn">import</span> <span class="n">Node</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">launch_testing</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">pytest</span>
</code></pre></div>
<p>Then a launch description is created to launch the node under test.
Note that the <a href="https://github.com/autowarefoundation/autoware.universe/blob/main/map/autoware_map_loader/test/data/test_map.osm"><code>test_map.osm</code></a> file path is found and passed to the node,
something that cannot be done with the <a href="#smoke-tests">smoke testing API</a>:</p>
<div class="highlight"><pre><span></span><code><span class="nd">@pytest</span><span class="o">.</span><span class="n">mark</span><span class="o">.</span><span class="n">launch_test</span>
<span class="k">def</span> <span class="nf">generate_test_description</span><span class="p">():</span>
<span class="k">def</span><span class="w"> </span><span class="nf">generate_test_description</span><span class="p">():</span>

<span class="n">lanelet2_map_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
<span class="n">get_package_share_directory</span><span class="p">(</span><span class="s2">"autoware_map_loader"</span><span class="p">),</span> <span class="s2">"test/data/test_map.osm"</span>
Expand Down Expand Up @@ -7863,8 +7863,8 @@ <h3 id="integration-test-with-a-single-node-component-test">Integration test wit
<p>Finally, a test is executed after the node executable has been shut down (<code>post_shutdown_test</code>).
Here we ensure that the node was launched without error and exited cleanly.</p>
<div class="highlight"><pre><span></span><code><span class="nd">@launch_testing</span><span class="o">.</span><span class="n">post_shutdown_test</span><span class="p">()</span>
<span class="k">class</span> <span class="nc">TestProcessOutput</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">test_exit_code</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">proc_info</span><span class="p">):</span>
<span class="k">class</span><span class="w"> </span><span class="nc">TestProcessOutput</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">test_exit_code</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">proc_info</span><span class="p">):</span>
<span class="c1"># Check that process exits with code 0: no error</span>
<span class="n">launch_testing</span><span class="o">.</span><span class="n">asserts</span><span class="o">.</span><span class="n">assertExitCodes</span><span class="p">(</span><span class="n">proc_info</span><span class="p">)</span>
</code></pre></div>
Expand All @@ -7890,21 +7890,21 @@ <h4 id="testing-the-output-of-a-node">Testing the output of a node<a class="head
<p>To test while the node is running,
create an <a href="https://github.com/ros2/launch/tree/foxy/launch_testing#active-tests"><em>active test</em></a> by adding a subclass of Python's <code>unittest.TestCase</code> to <code>*launch.test.py</code>.
Some boilerplate code is required to access output by creating a node and a subscription to a particular topic, e.g.</p>
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">unittest</span>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">unittest</span>

<span class="k">class</span> <span class="nc">TestRunningDataPublisher</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
<span class="k">class</span><span class="w"> </span><span class="nc">TestRunningDataPublisher</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>

<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">setUpClass</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">setUpClass</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="bp">cls</span><span class="o">.</span><span class="n">context</span> <span class="o">=</span> <span class="n">Context</span><span class="p">()</span>
<span class="n">rclpy</span><span class="o">.</span><span class="n">init</span><span class="p">(</span><span class="n">context</span><span class="o">=</span><span class="bp">cls</span><span class="o">.</span><span class="n">context</span><span class="p">)</span>
<span class="bp">cls</span><span class="o">.</span><span class="n">node</span> <span class="o">=</span> <span class="n">rclpy</span><span class="o">.</span><span class="n">create_node</span><span class="p">(</span><span class="s2">"test_node"</span><span class="p">,</span> <span class="n">context</span><span class="o">=</span><span class="bp">cls</span><span class="o">.</span><span class="n">context</span><span class="p">)</span>

<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">tearDownClass</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">tearDownClass</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="n">rclpy</span><span class="o">.</span><span class="n">shutdown</span><span class="p">(</span><span class="n">context</span><span class="o">=</span><span class="bp">cls</span><span class="o">.</span><span class="n">context</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">setUp</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">setUp</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">msgs</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">sub</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">node</span><span class="o">.</span><span class="n">create_subscription</span><span class="p">(</span>
<span class="n">msg_type</span><span class="o">=</span><span class="n">my_msg_type</span><span class="p">,</span>
Expand All @@ -7913,11 +7913,11 @@ <h4 id="testing-the-output-of-a-node">Testing the output of a node<a class="head
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">addCleanup</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">node</span><span class="o">.</span><span class="n">destroy_subscription</span><span class="p">,</span> <span class="n">sub</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">_msg_received</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">_msg_received</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="p">):</span>
<span class="c1"># Callback for ROS 2 subscriber used in the test</span>
<span class="bp">self</span><span class="o">.</span><span class="n">msgs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">get_message</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">get_message</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">startlen</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">msgs</span><span class="p">)</span>

<span class="n">executor</span> <span class="o">=</span> <span class="n">rclpy</span><span class="o">.</span><span class="n">executors</span><span class="o">.</span><span class="n">SingleThreadedExecutor</span><span class="p">(</span><span class="n">context</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="p">)</span>
Expand All @@ -7936,7 +7936,7 @@ <h4 id="testing-the-output-of-a-node">Testing the output of a node<a class="head
<span class="k">finally</span><span class="p">:</span>
<span class="n">executor</span><span class="o">.</span><span class="n">remove_node</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">node</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">test_message_content</span><span class="p">():</span>
<span class="k">def</span><span class="w"> </span><span class="nf">test_message_content</span><span class="p">():</span>
<span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_message</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="s2">"Hello, world"</span><span class="p">)</span>
</code></pre></div>
Expand Down
10 changes: 9 additions & 1 deletion main/reference-hw/ad-computers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7678,7 +7678,7 @@
<h2 id="adlink-in-vehicle-computers"><strong>ADLINK In-Vehicle Computers</strong><a class="headerlink" href="#adlink-in-vehicle-computers" title="Permanent link">#</a></h2>
<p><img alt="ad_comp-adlink.png" src="../images/ad_comp-adlink.png"></p>
<p>ADLINK solutions which is used for autonomous driving and tested by one or more community members are listed below:</p>
<!-- cspell: ignore Altra BLUEBOX -->
<!-- cspell: ignore Altra BLUEBOX Grms Quadro Vecow vecow -->

<table>
<thead>
Expand All @@ -7693,6 +7693,14 @@ <h2 id="adlink-in-vehicle-computers"><strong>ADLINK In-Vehicle Computers</strong
</thead>
<tbody>
<tr>
<td>ADM-AL30</td>
<td>Intel® 13/12th Gen Core™ I processor</td>
<td>Nvidia RTX 4000 SFF Ada</td>
<td>128GB RAM, Serial, USB, Automotive Ethernet (Base-T1), 10G Ethernet, CAN 2.0/ CAN-FD, M.2/SATA SSD</td>
<td>9~36 VDC, E-Mark, 7637-2, IEC 60068-2-64: Operating: 5Grms, random, 5-500Hz, 3 axes (with SSD)</td>
<td>Y</td>
</tr>
<tr>
<td>AVA-3510</td>
<td>Intel® Xeon® E-2278GE</td>
<td>Dual MXM RTX 5000</td>
Expand Down
2 changes: 1 addition & 1 deletion main/search/search_index.json

Large diffs are not rendered by default.

Loading

0 comments on commit 6f777f7

Please sign in to comment.