Skip to content

Commit

Permalink
Adding PR preview for PR 1157
Browse files Browse the repository at this point in the history
  • Loading branch information
uf-mil-bot committed Mar 30, 2024
1 parent 00eed19 commit 4f6e033
Show file tree
Hide file tree
Showing 72 changed files with 249 additions and 92 deletions.
4 changes: 2 additions & 2 deletions pr-docs/1157/_modules/axros/action.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ <h1>Source code for axros.action</h1><div class="highlight"><pre>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Args:</span>
<span class="sd"> action_client (ActionClient): The txROS action client to use to manage</span>
<span class="sd"> action_client (ActionClient): The axros action client to use to manage</span>
<span class="sd"> the goal.</span>
<span class="sd"> goal (Goal): The txROS goal to manage.</span>
<span class="sd"> goal (Goal): The axros goal to manage.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_action_client</span> <span class="o">=</span> <span class="n">action_client</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_goal</span> <span class="o">=</span> <span class="n">goal</span>
Expand Down
2 changes: 1 addition & 1 deletion pr-docs/1157/_modules/axros/axros_tf.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h1>Source code for axros.axros_tf</h1><div class="highlight"><pre>

<div class="viewcode-block" id="Transform"><a class="viewcode-back" href="../../reference/axros/api.html#axros.Transform">[docs]</a><span class="k">class</span> <span class="nc">Transform</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Represents a tf transform in the txROS suite.</span>
<span class="sd"> Represents a tf transform in the axros suite.</span>

<span class="sd"> .. container:: operations</span>

Expand Down
2 changes: 1 addition & 1 deletion pr-docs/1157/_modules/axros/exceptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h1>Source code for axros.exceptions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="AxrosException"><a class="viewcode-back" href="../../reference/axros/api.html#axros.AxrosException">[docs]</a><span class="k">class</span> <span class="nc">AxrosException</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Exception related to txROS. Inherits from :class:`Exception`.</span>
<span class="sd"> Exception related to axros. Inherits from :class:`Exception`.</span>

<span class="sd"> Attributes:</span>
<span class="sd"> node_handle (axros.NodeHandle): The node handle which caused the exception.</span>
Expand Down
2 changes: 1 addition & 1 deletion pr-docs/1157/_modules/axros/publisher.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h1>Source code for axros.publisher</h1><div class="highlight"><pre>

<div class="viewcode-block" id="Publisher"><a class="viewcode-back" href="../../reference/axros/api.html#axros.Publisher">[docs]</a><span class="k">class</span> <span class="nc">Publisher</span><span class="p">(</span><span class="n">Generic</span><span class="p">[</span><span class="n">M</span><span class="p">]):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A Publisher in the txROS suite. Allows for the publishing of messages onto a</span>
<span class="sd"> A Publisher in the axros suite. Allows for the publishing of messages onto a</span>
<span class="sd"> certain ROS topic. This class should usually be made through :meth:`axros.NodeHandle.advertise`.</span>

<span class="sd"> Before use, the publisher must be :meth:`~.setup` and after use, it must be</span>
Expand Down
2 changes: 1 addition & 1 deletion pr-docs/1157/_modules/axros/rosxmlrpc.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ <h1>Source code for axros.rosxmlrpc</h1><div class="highlight"><pre>

<div class="viewcode-block" id="ROSMasterProxy"><a class="viewcode-back" href="../../reference/axros/api.html#axros.ROSMasterProxy">[docs]</a><span class="k">class</span> <span class="nc">ROSMasterProxy</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> The txROS proxy to the ROS master server. This class does not provide a general</span>
<span class="sd"> The axros proxy to the ROS master server. This class does not provide a general</span>
<span class="sd"> suite of discrete methods for contracting with the master server, rather all</span>
<span class="sd"> method requests are forwarded to the server through the class&#39; ``__getattr__``</span>
<span class="sd"> method.</span>
Expand Down
2 changes: 1 addition & 1 deletion pr-docs/1157/_modules/axros/service.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h1>Source code for axros.service</h1><div class="highlight"><pre>

<div class="viewcode-block" id="Service"><a class="viewcode-back" href="../../reference/axros/api.html#axros.Service">[docs]</a><span class="k">class</span> <span class="nc">Service</span><span class="p">(</span><span class="n">Generic</span><span class="p">[</span><span class="n">Request</span><span class="p">,</span> <span class="n">Reply</span><span class="p">]):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A service in the txROS suite. Handles incoming requests through a user-supplied</span>
<span class="sd"> A service in the axros suite. Handles incoming requests through a user-supplied</span>
<span class="sd"> asynchronous callback function, which is expected to return a response message.</span>

<span class="sd"> This class completes the server aspect of the server-client relationship in</span>
Expand Down
4 changes: 2 additions & 2 deletions pr-docs/1157/_modules/axros/serviceclient.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1>Source code for axros.serviceclient</h1><div class="highlight"><pre>

<div class="viewcode-block" id="ServiceError"><a class="viewcode-back" href="../../reference/axros/api.html#axros.ServiceError">[docs]</a><span class="k">class</span> <span class="nc">ServiceError</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Represents an error with a service client in txROS.</span>
<span class="sd"> Represents an error with a service client in axros.</span>

<span class="sd"> Inherits from :class:`Exception`.</span>

Expand All @@ -130,7 +130,7 @@ <h1>Source code for axros.serviceclient</h1><div class="highlight"><pre>

<div class="viewcode-block" id="ServiceClient"><a class="viewcode-back" href="../../reference/axros/api.html#axros.ServiceClient">[docs]</a><span class="k">class</span> <span class="nc">ServiceClient</span><span class="p">(</span><span class="n">Generic</span><span class="p">[</span><span class="n">S</span><span class="p">]):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A client connected to a service in txROS. This is the client class of the</span>
<span class="sd"> A client connected to a service in axros. This is the client class of the</span>
<span class="sd"> client-server relationship in ROS; the server is the :class:`axros.Service`</span>
<span class="sd"> class.</span>

Expand Down
2 changes: 1 addition & 1 deletion pr-docs/1157/_modules/axros/subscriber.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h1>Source code for axros.subscriber</h1><div class="highlight"><pre>

<div class="viewcode-block" id="Subscriber"><a class="viewcode-back" href="../../reference/axros/api.html#axros.Subscriber">[docs]</a><span class="k">class</span> <span class="nc">Subscriber</span><span class="p">(</span><span class="n">Generic</span><span class="p">[</span><span class="n">M</span><span class="p">]):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A subscriber in the txROS suite. This class should usually be made through</span>
<span class="sd"> A subscriber in the axros suite. This class should usually be made through</span>
<span class="sd"> :meth:`axros.NodeHandle.subscribe`.</span>

<span class="sd"> .. container:: operations</span>
Expand Down
34 changes: 17 additions & 17 deletions pr-docs/1157/_sources/reference/axros/examples.rst.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Examples
^^^^^^^^

The following example starts a sublisher and a subscriber which listens to the messages
sublished by the sublisher. After two seconds, it reports how many messages it was
The following example starts a publisher and a subscriber which listens to the messages
published by the publisher. After two seconds, it reports how many messages it was
able to successfully receive.

.. code-block:: python
import asyncio
from rosgraph_msgs.msg import Clock
from axros import NodeHandle, sublisher, Subscriber
from axros import NodeHandle, Publisher, Subscriber
import uvloop
async def subsub(nh: NodeHandle, sub: sublisher, sub: Subscriber):
async def pubsub(nh: NodeHandle, pub: Publisher, sub: Subscriber):
count = 0
try:
while True:
await asyncio.sleep(0)
msg = (Clock(nh.get_time()))
sub.sublish(msg)
pub.publish(msg)
recv = await sub.get_next_message()
if (recv == msg):
count += 1
Expand All @@ -30,13 +30,13 @@ able to successfully receive.
async def main():
nh = await NodeHandle.from_argv("node", "", anonymous = True)
async with nh:
sub = nh.advertise('clock2', Clock, latching = True)
pub = nh.advertise('clock2', Clock, latching = True)
sub = nh.subscribe('clock2', Clock)
await asyncio.gather(sub.setup(), sub.setup())
subsub_task = asyncio.create_task(subsub(nh, sub, sub))
await asyncio.gather(pub.setup(), sub.setup())
pubsub_task = asyncio.create_task(pubsub(nh, pub, sub))
print("Everything is setup. Waiting two seconds.")
await asyncio.sleep(2)
subsub_task.cancel()
pubsub_task.cancel()
if __name__ == "__main__":
uvloop.install()
Expand All @@ -62,28 +62,28 @@ The node handle can be used for general purposes, such as parameters and sleepin
This parameter does not exist!
>>> await nh.sleep(2) # Sleeps for 2 seconds
The node handle can also be used for sublishing and subscribing to topics. Note
that all sublishers and subscribers must be setup.
The node handle can also be used for publishing and subscribing to topics. Note
that all Publishers and subscribers must be setup.

.. code-block:: python
>>> import os
>>> import axros
>>> nh = await axros.NodeHandle("/test", "special_node", "localhost", os.environ["ROS_MASTER_URI"], {})
>>> from std_msgs.msg import Int32
>>> sub = nh.advertise("running_time", Int32)
>>> await sub.setup()
>>> async def sublish():
>>> pub = nh.advertise("running_time", Int32)
>>> await pub.setup()
>>> async def publish():
... try:
... count = 0
... while True:
... sub.sublish(Int32(count))
... pub.publish(Int32(count))
... count += 1
... await asyncio.sleep(1)
... except asyncio.CancelledError as _:
... # When task gets cancelled, stop sublishing
... # When task gets cancelled, stop publishing
... pass
>>> task = asyncio.create_task(sublish()) # Start sublishing!
>>> task = asyncio.create_task(publish()) # Start publishing!
>>> sub = nh.subscribe("running_time", Int32)
>>> await sub.setup()
>>> while True:
Expand Down
1 change: 0 additions & 1 deletion pr-docs/1157/_sources/reference/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ by MIL. These subsystems relate to a variety of processes.
pneumatic
sabertooth
bagging
preflight
1 change: 1 addition & 0 deletions pr-docs/1157/_sources/software/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Various documentation related to practices followed by the MIL Software team.
rqt
rostest
alarms
preflight
Bash Style Guide <bash_style.md>
C++ Style Guide <cpp_style.md>
Python Style Guide <python_style.md>
Expand Down
2 changes: 2 additions & 0 deletions pr-docs/1157/_sources/software/preflight.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../../mil_common/utils/mil_tools/scripts/mil-preflight/preflight.md
```
1 change: 1 addition & 0 deletions pr-docs/1157/infrastructure/network.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ <h3><a href="../index.html">Table of Contents</a></h3>
<li class="toctree-l2"><a class="reference internal" href="../software/rqt.html">Implementing GUI Based Tools Using <code class="docutils literal notranslate"><span class="pre">rqt</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../software/rostest.html">Writing Unit Tests with <code class="docutils literal notranslate"><span class="pre">rostest</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../software/alarms.html">Alarms in ROS</a></li>
<li class="toctree-l2"><a class="reference internal" href="../software/preflight.html">Preflight- Autonomous Robot Verification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../software/bash_style.html">Bash Style Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../software/cpp_style.html">C++ Style Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../software/python_style.html">Python Style Guide</a></li>
Expand Down
Binary file modified pr-docs/1157/objects.inv
Binary file not shown.
1 change: 0 additions & 1 deletion pr-docs/1157/reference/actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ <h3><a href="../index.html">Table of Contents</a></h3>
<li class="toctree-l2"><a class="reference internal" href="pneumatic.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mil_pneumatic_actuator</span></code> - Pneumatic Actuator Board</a></li>
<li class="toctree-l2"><a class="reference internal" href="sabertooth.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sabertooth2x12</span></code> - Sabertooth 2x12</a></li>
<li class="toctree-l2"><a class="reference internal" href="bagging.html">Online Bagger</a></li>
<li class="toctree-l2"><a class="reference internal" href="preflight.html">Preflight- Autonomous Robot Verification</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../subjugator/reference.html">Subjugator Software Reference</a></li>
Expand Down
1 change: 0 additions & 1 deletion pr-docs/1157/reference/alarms.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ <h3><a href="../index.html">Table of Contents</a></h3>
<li class="toctree-l2"><a class="reference internal" href="pneumatic.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mil_pneumatic_actuator</span></code> - Pneumatic Actuator Board</a></li>
<li class="toctree-l2"><a class="reference internal" href="sabertooth.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sabertooth2x12</span></code> - Sabertooth 2x12</a></li>
<li class="toctree-l2"><a class="reference internal" href="bagging.html">Online Bagger</a></li>
<li class="toctree-l2"><a class="reference internal" href="preflight.html">Preflight- Autonomous Robot Verification</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../subjugator/reference.html">Subjugator Software Reference</a></li>
Expand Down
Loading

0 comments on commit 4f6e033

Please sign in to comment.