Skip to content

Commit

Permalink
deploy: 2ffc58e
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Nov 11, 2024
1 parent 0ee792f commit e795abd
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 25 deletions.
3 changes: 2 additions & 1 deletion _modules/viam/components/camera/camera.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h1>Source code for viam.components.camera.camera</h1><div class="highlight"><pr

<span class="sd"> ::</span>

<span class="sd"> from viam.media.video import CameraMimeType</span>
<span class="sd"> from viam.media.video import CameraMimeType</span>

<span class="sd"> my_camera = Camera.from_robot(robot=machine, name=&quot;my_camera&quot;)</span>

Expand Down Expand Up @@ -191,6 +191,7 @@ <h1>Source code for viam.components.camera.camera</h1><div class="highlight"><pr
<span class="sd"> by the mimetype.</span>

<span class="sd"> To deserialize the returned information into a numpy array, use the Open3D library.</span>

<span class="sd"> ::</span>

<span class="sd"> import numpy as np</span>
Expand Down
3 changes: 2 additions & 1 deletion _sources/autoapi/viam/components/camera/camera/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Module Contents

::

from viam.media.video import CameraMimeType
from viam.media.video import CameraMimeType

my_camera = Camera.from_robot(robot=machine, name="my_camera")

Expand Down Expand Up @@ -118,6 +118,7 @@ Module Contents
by the mimetype.

To deserialize the returned information into a numpy array, use the Open3D library.

::

import numpy as np
Expand Down
3 changes: 2 additions & 1 deletion _sources/autoapi/viam/components/camera/client/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Module Contents

::

from viam.media.video import CameraMimeType
from viam.media.video import CameraMimeType

my_camera = Camera.from_robot(robot=machine, name="my_camera")

Expand Down Expand Up @@ -96,6 +96,7 @@ Module Contents
by the mimetype.

To deserialize the returned information into a numpy array, use the Open3D library.

::

import numpy as np
Expand Down
3 changes: 2 additions & 1 deletion _sources/autoapi/viam/components/camera/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Package Contents

::

from viam.media.video import CameraMimeType
from viam.media.video import CameraMimeType

my_camera = Camera.from_robot(robot=machine, name="my_camera")

Expand Down Expand Up @@ -231,6 +231,7 @@ Package Contents
by the mimetype.

To deserialize the returned information into a numpy array, use the Open3D library.

::

import numpy as np
Expand Down
12 changes: 6 additions & 6 deletions autoapi/viam/components/camera/camera/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,14 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalin
to convert the data to a standard representation.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">viam.media.video</span> <span class="kn">import</span> <span class="n">CameraMimeType</span>

<span class="n">my_camera</span> <span class="o">=</span> <span class="n">Camera</span><span class="o">.</span><span class="n">from_robot</span><span class="p">(</span><span class="n">robot</span><span class="o">=</span><span class="n">machine</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;my_camera&quot;</span><span class="p">)</span>
<span class="n">my_camera</span> <span class="o">=</span> <span class="n">Camera</span><span class="o">.</span><span class="n">from_robot</span><span class="p">(</span><span class="n">robot</span><span class="o">=</span><span class="n">machine</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;my_camera&quot;</span><span class="p">)</span>

<span class="c1"># Assume &quot;frame&quot; has a mime_type of &quot;image/vnd.viam.dep&quot;</span>
<span class="n">frame</span> <span class="o">=</span> <span class="k">await</span> <span class="n">my_camera</span><span class="o">.</span><span class="n">get_image</span><span class="p">(</span><span class="n">mime_type</span> <span class="o">=</span> <span class="n">CameraMimeType</span><span class="o">.</span><span class="n">VIAM_RAW_DEPTH</span><span class="p">)</span>
<span class="c1"># Assume &quot;frame&quot; has a mime_type of &quot;image/vnd.viam.dep&quot;</span>
<span class="n">frame</span> <span class="o">=</span> <span class="k">await</span> <span class="n">my_camera</span><span class="o">.</span><span class="n">get_image</span><span class="p">(</span><span class="n">mime_type</span> <span class="o">=</span> <span class="n">CameraMimeType</span><span class="o">.</span><span class="n">VIAM_RAW_DEPTH</span><span class="p">)</span>

<span class="c1"># Convert &quot;frame&quot; to a standard 2D image representation.</span>
<span class="c1"># Remove the 1st 3x8 bytes and reshape the raw bytes to List[List[Int]].</span>
<span class="n">standard_frame</span> <span class="o">=</span> <span class="n">frame</span><span class="o">.</span><span class="n">bytes_to_depth_array</span><span class="p">()</span>
<span class="c1"># Convert &quot;frame&quot; to a standard 2D image representation.</span>
<span class="c1"># Remove the 1st 3x8 bytes and reshape the raw bytes to List[List[Int]].</span>
<span class="n">standard_frame</span> <span class="o">=</span> <span class="n">frame</span><span class="o">.</span><span class="n">bytes_to_depth_array</span><span class="p">()</span>
</pre></div>
</div>
<dl class="field-list simple">
Expand Down
12 changes: 6 additions & 6 deletions autoapi/viam/components/camera/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalin
to convert the data to a standard representation.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">viam.media.video</span> <span class="kn">import</span> <span class="n">CameraMimeType</span>

<span class="n">my_camera</span> <span class="o">=</span> <span class="n">Camera</span><span class="o">.</span><span class="n">from_robot</span><span class="p">(</span><span class="n">robot</span><span class="o">=</span><span class="n">machine</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;my_camera&quot;</span><span class="p">)</span>
<span class="n">my_camera</span> <span class="o">=</span> <span class="n">Camera</span><span class="o">.</span><span class="n">from_robot</span><span class="p">(</span><span class="n">robot</span><span class="o">=</span><span class="n">machine</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;my_camera&quot;</span><span class="p">)</span>

<span class="c1"># Assume &quot;frame&quot; has a mime_type of &quot;image/vnd.viam.dep&quot;</span>
<span class="n">frame</span> <span class="o">=</span> <span class="k">await</span> <span class="n">my_camera</span><span class="o">.</span><span class="n">get_image</span><span class="p">(</span><span class="n">mime_type</span> <span class="o">=</span> <span class="n">CameraMimeType</span><span class="o">.</span><span class="n">VIAM_RAW_DEPTH</span><span class="p">)</span>
<span class="c1"># Assume &quot;frame&quot; has a mime_type of &quot;image/vnd.viam.dep&quot;</span>
<span class="n">frame</span> <span class="o">=</span> <span class="k">await</span> <span class="n">my_camera</span><span class="o">.</span><span class="n">get_image</span><span class="p">(</span><span class="n">mime_type</span> <span class="o">=</span> <span class="n">CameraMimeType</span><span class="o">.</span><span class="n">VIAM_RAW_DEPTH</span><span class="p">)</span>

<span class="c1"># Convert &quot;frame&quot; to a standard 2D image representation.</span>
<span class="c1"># Remove the 1st 3x8 bytes and reshape the raw bytes to List[List[Int]].</span>
<span class="n">standard_frame</span> <span class="o">=</span> <span class="n">frame</span><span class="o">.</span><span class="n">bytes_to_depth_array</span><span class="p">()</span>
<span class="c1"># Convert &quot;frame&quot; to a standard 2D image representation.</span>
<span class="c1"># Remove the 1st 3x8 bytes and reshape the raw bytes to List[List[Int]].</span>
<span class="n">standard_frame</span> <span class="o">=</span> <span class="n">frame</span><span class="o">.</span><span class="n">bytes_to_depth_array</span><span class="p">()</span>
</pre></div>
</div>
<dl class="field-list simple">
Expand Down
12 changes: 6 additions & 6 deletions autoapi/viam/components/camera/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ <h2>Package Contents<a class="headerlink" href="#package-contents" title="Permal
to convert the data to a standard representation.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">viam.media.video</span> <span class="kn">import</span> <span class="n">CameraMimeType</span>

<span class="n">my_camera</span> <span class="o">=</span> <span class="n">Camera</span><span class="o">.</span><span class="n">from_robot</span><span class="p">(</span><span class="n">robot</span><span class="o">=</span><span class="n">machine</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;my_camera&quot;</span><span class="p">)</span>
<span class="n">my_camera</span> <span class="o">=</span> <span class="n">Camera</span><span class="o">.</span><span class="n">from_robot</span><span class="p">(</span><span class="n">robot</span><span class="o">=</span><span class="n">machine</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;my_camera&quot;</span><span class="p">)</span>

<span class="c1"># Assume &quot;frame&quot; has a mime_type of &quot;image/vnd.viam.dep&quot;</span>
<span class="n">frame</span> <span class="o">=</span> <span class="k">await</span> <span class="n">my_camera</span><span class="o">.</span><span class="n">get_image</span><span class="p">(</span><span class="n">mime_type</span> <span class="o">=</span> <span class="n">CameraMimeType</span><span class="o">.</span><span class="n">VIAM_RAW_DEPTH</span><span class="p">)</span>
<span class="c1"># Assume &quot;frame&quot; has a mime_type of &quot;image/vnd.viam.dep&quot;</span>
<span class="n">frame</span> <span class="o">=</span> <span class="k">await</span> <span class="n">my_camera</span><span class="o">.</span><span class="n">get_image</span><span class="p">(</span><span class="n">mime_type</span> <span class="o">=</span> <span class="n">CameraMimeType</span><span class="o">.</span><span class="n">VIAM_RAW_DEPTH</span><span class="p">)</span>

<span class="c1"># Convert &quot;frame&quot; to a standard 2D image representation.</span>
<span class="c1"># Remove the 1st 3x8 bytes and reshape the raw bytes to List[List[Int]].</span>
<span class="n">standard_frame</span> <span class="o">=</span> <span class="n">frame</span><span class="o">.</span><span class="n">bytes_to_depth_array</span><span class="p">()</span>
<span class="c1"># Convert &quot;frame&quot; to a standard 2D image representation.</span>
<span class="c1"># Remove the 1st 3x8 bytes and reshape the raw bytes to List[List[Int]].</span>
<span class="n">standard_frame</span> <span class="o">=</span> <span class="n">frame</span><span class="o">.</span><span class="n">bytes_to_depth_array</span><span class="p">()</span>
</pre></div>
</div>
<dl class="field-list simple">
Expand Down
4 changes: 2 additions & 2 deletions examples/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ <h2>Connect as a client<a class="headerlink" href="#connect-as-a-client" title="
<span class="expanded">Hide code cell output</span>
</summary>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;viam.proto.common.ResourceName rdk:component:sensor/sensor0 at 0x7f67e8f5f3d0&gt;, &lt;viam.proto.common.ResourceName rdk:component:audio_input/audio_input0 at 0x7f67f09ac0e0&gt;, &lt;viam.proto.common.ResourceName rdk:component:arm/arm0 at 0x7f67f09ac130&gt;, &lt;viam.proto.common.ResourceName rdk:component:base/base0 at 0x7f67f09ac180&gt;, &lt;viam.proto.common.ResourceName rdk:service:mlmodel/mlmodel0 at 0x7f67f09ac1d0&gt;, &lt;viam.proto.common.ResourceName rdk:component:gripper/gripper0 at 0x7f67f09ac220&gt;, &lt;viam.proto.common.ResourceName rdk:component:encoder/encoder0 at 0x7f67f09ac270&gt;, &lt;viam.proto.common.ResourceName rdk:component:gantry/gantry0 at 0x7f67f09ac2c0&gt;, &lt;viam.proto.common.ResourceName rdk:component:motor/motor0 at 0x7f67f09ac310&gt;, &lt;viam.proto.common.ResourceName rdk:component:camera/camera0 at 0x7f67f09ac360&gt;, &lt;viam.proto.common.ResourceName rdk:component:pose_tracker/pose_tracker0 at 0x7f67f09ac3b0&gt;, &lt;viam.proto.common.ResourceName rdk:component:servo/servo0 at 0x7f67f09ac400&gt;, &lt;viam.proto.common.ResourceName rdk:component:movement_sensor/movement_sensor0 at 0x7f67f09ac450&gt;, &lt;viam.proto.common.ResourceName rdk:component:board/board at 0x7f67f09ac4a0&gt;, &lt;viam.proto.common.ResourceName rdk:service:slam/slam0 at 0x7f67f09ac4f0&gt;]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;viam.proto.common.ResourceName rdk:component:camera/camera0 at 0x7f58c4a83470&gt;, &lt;viam.proto.common.ResourceName rdk:component:sensor/sensor0 at 0x7f58c4a58220&gt;, &lt;viam.proto.common.ResourceName rdk:component:motor/motor0 at 0x7f58c4a581d0&gt;, &lt;viam.proto.common.ResourceName rdk:component:board/board at 0x7f58c4a58270&gt;, &lt;viam.proto.common.ResourceName rdk:component:audio_input/audio_input0 at 0x7f58c4a582c0&gt;, &lt;viam.proto.common.ResourceName rdk:service:slam/slam0 at 0x7f58c4a58310&gt;, &lt;viam.proto.common.ResourceName rdk:component:gripper/gripper0 at 0x7f58c4a58360&gt;, &lt;viam.proto.common.ResourceName rdk:service:mlmodel/mlmodel0 at 0x7f58c4a583b0&gt;, &lt;viam.proto.common.ResourceName rdk:component:encoder/encoder0 at 0x7f58c4a58400&gt;, &lt;viam.proto.common.ResourceName rdk:component:arm/arm0 at 0x7f58c4a58450&gt;, &lt;viam.proto.common.ResourceName rdk:component:pose_tracker/pose_tracker0 at 0x7f58c4a584a0&gt;, &lt;viam.proto.common.ResourceName rdk:component:movement_sensor/movement_sensor0 at 0x7f58c4a584f0&gt;, &lt;viam.proto.common.ResourceName rdk:component:base/base0 at 0x7f58c4a58540&gt;, &lt;viam.proto.common.ResourceName rdk:component:servo/servo0 at 0x7f58c4a58590&gt;, &lt;viam.proto.common.ResourceName rdk:component:gantry/gantry0 at 0x7f58c4a585e0&gt;]
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -197,7 +197,7 @@ <h2>Connect as a client<a class="headerlink" href="#connect-as-a-client" title="
<span class="expanded">Hide code cell outputs</span>
</summary>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;viam.media.video.ViamImage at 0x7f67f0577020&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;viam.media.video.ViamImage at 0x7f58c4596e40&gt;
</pre></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit e795abd

Please sign in to comment.