Skip to content

Commit

Permalink
deploy: f7b35b8
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Nov 6, 2024
1 parent 5ce69b0 commit 03578e0
Show file tree
Hide file tree
Showing 88 changed files with 531 additions and 531 deletions.
12 changes: 6 additions & 6 deletions _modules/viam/components/gantry/gantry.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h1>Source code for viam.components.gantry.gantry</h1><div class="highlight"><pr

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

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

<span class="sd"> # Get the current positions of the axes of the gantry in millimeters.</span>
<span class="sd"> positions = await my_gantry.get_position()</span>
Expand All @@ -148,7 +148,7 @@ <h1>Source code for viam.components.gantry.gantry</h1><div class="highlight"><pr

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

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

<span class="sd"> # Create a list of positions for the axes of the gantry to move to. Assume in</span>
<span class="sd"> # this example that the gantry is multi-axis, with 3 axes.</span>
Expand All @@ -175,7 +175,7 @@ <h1>Source code for viam.components.gantry.gantry</h1><div class="highlight"><pr

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

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

<span class="sd"> await my_gantry.home()</span>

Expand All @@ -192,7 +192,7 @@ <h1>Source code for viam.components.gantry.gantry</h1><div class="highlight"><pr

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

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

<span class="sd"> # Get the lengths of the axes of the gantry in millimeters.</span>
<span class="sd"> lengths_mm = await my_gantry.get_lengths()</span>
Expand All @@ -211,7 +211,7 @@ <h1>Source code for viam.components.gantry.gantry</h1><div class="highlight"><pr

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

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

<span class="sd"> # Stop all motion of the gantry. It is assumed that the gantry stops</span>
<span class="sd"> # immediately.</span>
Expand All @@ -228,7 +228,7 @@ <h1>Source code for viam.components.gantry.gantry</h1><div class="highlight"><pr

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

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

<span class="sd"> # Stop all motion of the gantry. It is assumed that the</span>
<span class="sd"> # gantry stops immediately.</span>
Expand Down
8 changes: 4 additions & 4 deletions _modules/viam/components/gripper/gripper.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h1>Source code for viam.components.gripper.gripper</h1><div class="highlight"><

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

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

<span class="sd"> # Open the gripper.</span>
<span class="sd"> await my_gripper.open()</span>
Expand All @@ -148,7 +148,7 @@ <h1>Source code for viam.components.gripper.gripper</h1><div class="highlight"><

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

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

<span class="sd"> # Grab with the gripper.</span>
<span class="sd"> grabbed = await my_gripper.grab()</span>
Expand All @@ -173,7 +173,7 @@ <h1>Source code for viam.components.gripper.gripper</h1><div class="highlight"><

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

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

<span class="sd"> # Stop the gripper.</span>
<span class="sd"> await my_gripper.stop()</span>
Expand All @@ -189,7 +189,7 @@ <h1>Source code for viam.components.gripper.gripper</h1><div class="highlight"><

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

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

<span class="sd"> # Check whether the gripper is currently moving.</span>
<span class="sd"> moving = await my_gripper.is_moving()</span>
Expand Down
20 changes: 10 additions & 10 deletions _modules/viam/components/motor/motor.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Set the power to 40% forwards.</span>
<span class="sd"> await my_motor.set_power(power=0.4)</span>
Expand Down Expand Up @@ -163,7 +163,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Turn the motor 7.2 revolutions at 60 RPM.</span>
<span class="sd"> await my_motor.go_for(rpm=60, revolutions=7.2)</span>
Expand Down Expand Up @@ -196,7 +196,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Turn the motor to 8.3 revolutions from home at 75 RPM.</span>
<span class="sd"> await my_motor.go_to(rpm=75, revolutions=8.3)</span>
Expand Down Expand Up @@ -224,7 +224,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Spin the motor at 75 RPM.</span>
<span class="sd"> await my_motor.set_rpm(rpm=75)</span>
Expand All @@ -250,7 +250,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Set the current position as the new home position with no offset.</span>
<span class="sd"> await my_motor.reset_zero_position(offset=0.0)</span>
Expand All @@ -277,7 +277,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Get the current position of the motor.</span>
<span class="sd"> position = await my_motor.get_position()</span>
Expand All @@ -303,7 +303,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Report a dictionary mapping optional properties to whether it is supported by</span>
<span class="sd"> # this motor.</span>
Expand Down Expand Up @@ -332,7 +332,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Stop the motor.</span>
<span class="sd"> await my_motor.stop()</span>
Expand All @@ -354,7 +354,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Check whether the motor is currently running.</span>
<span class="sd"> powered = await my_motor.is_powered()</span>
Expand All @@ -376,7 +376,7 @@ <h1>Source code for viam.components.motor.motor</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Check whether the motor is currently moving.</span>
<span class="sd"> moving = await my_motor.is_moving()</span>
Expand Down
8 changes: 4 additions & 4 deletions _modules/viam/components/power_sensor/power_sensor.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>Source code for viam.components.power_sensor.power_sensor</h1><div class="hi

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

<span class="sd"> my_power_sensor = PowerSensor.from_robot(robot=robot, name=&#39;my_power_sensor&#39;)</span>
<span class="sd"> my_power_sensor = PowerSensor.from_robot(robot=machine, name=&#39;my_power_sensor&#39;)</span>

<span class="sd"> # Get the voltage reading from the power sensor</span>
<span class="sd"> voltage, is_ac = await my_power_sensor.get_voltage()</span>
Expand All @@ -138,7 +138,7 @@ <h1>Source code for viam.components.power_sensor.power_sensor</h1><div class="hi

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

<span class="sd"> my_power_sensor = PowerSensor.from_robot(robot=robot, name=&#39;my_power_sensor&#39;)</span>
<span class="sd"> my_power_sensor = PowerSensor.from_robot(robot=machine, name=&#39;my_power_sensor&#39;)</span>

<span class="sd"> # Get the current reading from the power sensor</span>
<span class="sd"> current, is_ac = await my_power_sensor.get_current()</span>
Expand All @@ -158,7 +158,7 @@ <h1>Source code for viam.components.power_sensor.power_sensor</h1><div class="hi

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

<span class="sd"> my_power_sensor = PowerSensor.from_robot(robot=robot, name=&#39;my_power_sensor&#39;)</span>
<span class="sd"> my_power_sensor = PowerSensor.from_robot(robot=machine, name=&#39;my_power_sensor&#39;)</span>

<span class="sd"> # Get the power reading from the power sensor</span>
<span class="sd"> power = await my_power_sensor.get_power()</span>
Expand All @@ -179,7 +179,7 @@ <h1>Source code for viam.components.power_sensor.power_sensor</h1><div class="hi

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

<span class="sd"> my_power_sensor = PowerSensor.from_robot(robot=robot, name=&#39;my_power_sensor&#39;)</span>
<span class="sd"> my_power_sensor = PowerSensor.from_robot(robot=machine, name=&#39;my_power_sensor&#39;)</span>

<span class="sd"> # Get the readings provided by the sensor.</span>
<span class="sd"> readings = await my_power_sensor.get_readings()</span>
Expand Down
2 changes: 1 addition & 1 deletion _modules/viam/components/sensor/sensor.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h1>Source code for viam.components.sensor.sensor</h1><div class="highlight"><pr

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

<span class="sd"> my_sensor = Sensor.from_robot(robot=robot, name=&#39;my_sensor&#39;)</span>
<span class="sd"> my_sensor = Sensor.from_robot(robot=machine, name=&#39;my_sensor&#39;)</span>

<span class="sd"> # Get the readings provided by the sensor.</span>
<span class="sd"> readings = await my_sensor.get_readings()</span>
Expand Down
8 changes: 4 additions & 4 deletions _modules/viam/components/servo/servo.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h1>Source code for viam.components.servo.servo</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Move the servo from its origin to the desired angle of 10 degrees.</span>
<span class="sd"> await my_servo.move(10)</span>
Expand All @@ -143,7 +143,7 @@ <h1>Source code for viam.components.servo.servo</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Move the servo from its origin to the desired angle of 10 degrees.</span>
<span class="sd"> await my_servo.move(10)</span>
Expand Down Expand Up @@ -171,7 +171,7 @@ <h1>Source code for viam.components.servo.servo</h1><div class="highlight"><pre>

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

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

<span class="sd"> # Move the servo from its origin to the desired angle of 10 degrees.</span>
<span class="sd"> await my_servo.move(10)</span>
Expand All @@ -190,7 +190,7 @@ <h1>Source code for viam.components.servo.servo</h1><div class="highlight"><pre>

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

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

<span class="sd"> print(await my_servo.is_moving())</span>

Expand Down
4 changes: 2 additions & 2 deletions _modules/viam/services/mlmodel/mlmodel.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h1>Source code for viam.services.mlmodel.mlmodel</h1><div class="highlight"><pr

<span class="sd"> import numpy as np</span>

<span class="sd"> my_mlmodel = MLModelClient.from_robot(robot=robot, name=&quot;my_mlmodel_service&quot;)</span>
<span class="sd"> my_mlmodel = MLModelClient.from_robot(robot=machine, name=&quot;my_mlmodel_service&quot;)</span>

<span class="sd"> nd_array = np.array([1, 2, 3], dtype=np.float64)</span>
<span class="sd"> input_tensors = {&quot;0&quot;: nd_array}</span>
Expand All @@ -144,7 +144,7 @@ <h1>Source code for viam.services.mlmodel.mlmodel</h1><div class="highlight"><pr

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

<span class="sd"> my_mlmodel = MLModelClient.from_robot(robot=robot, name=&quot;my_mlmodel_service&quot;)</span>
<span class="sd"> my_mlmodel = MLModelClient.from_robot(robot=machine, name=&quot;my_mlmodel_service&quot;)</span>

<span class="sd"> metadata = await my_mlmodel.metadata()</span>

Expand Down
12 changes: 6 additions & 6 deletions _modules/viam/services/motion/motion.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h1>Source code for viam.services.motion.motion</h1><div class="highlight"><pre>

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

<span class="sd"> motion = MotionClient.from_robot(robot=robot, name=&quot;builtin&quot;)</span>
<span class="sd"> motion = MotionClient.from_robot(robot=machine, name=&quot;builtin&quot;)</span>

<span class="sd"> # Assumes a gripper configured with name &quot;my_gripper&quot; on the machine</span>
<span class="sd"> gripper_name = Gripper.get_resource_name(&quot;my_gripper&quot;)</span>
Expand Down Expand Up @@ -199,7 +199,7 @@ <h1>Source code for viam.services.motion.motion</h1><div class="highlight"><pre>

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

<span class="sd"> motion = MotionClient.from_robot(robot=robot, name=&quot;builtin&quot;)</span>
<span class="sd"> motion = MotionClient.from_robot(robot=machine, name=&quot;builtin&quot;)</span>

<span class="sd"> # Get the ResourceNames of the base and movement sensor</span>
<span class="sd"> my_base_resource_name = Base.get_resource_name(&quot;my_base&quot;)</span>
Expand Down Expand Up @@ -273,7 +273,7 @@ <h1>Source code for viam.services.motion.motion</h1><div class="highlight"><pre>

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

<span class="sd"> motion = MotionClient.from_robot(robot=robot, name=&quot;builtin&quot;)</span>
<span class="sd"> motion = MotionClient.from_robot(robot=machine, name=&quot;builtin&quot;)</span>

<span class="sd"> # Get the ResourceNames of the base component and SLAM service</span>
<span class="sd"> my_base_resource_name = Base.get_resource_name(&quot;my_base&quot;)</span>
Expand Down Expand Up @@ -371,7 +371,7 @@ <h1>Source code for viam.services.motion.motion</h1><div class="highlight"><pre>

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

<span class="sd"> motion = MotionClient.from_robot(robot=robot, name=&quot;builtin&quot;)</span>
<span class="sd"> motion = MotionClient.from_robot(robot=machine, name=&quot;builtin&quot;)</span>
<span class="sd"> my_base_resource_name = Base.get_resource_name(&quot;my_base&quot;)</span>
<span class="sd"> # Get the plan(s) of the base component which was instructed to move by `MoveOnGlobe()` or `MoveOnMap()`</span>
<span class="sd"> resp = await motion.get_plan(component_name=my_base_resource_name)</span>
Expand Down Expand Up @@ -406,7 +406,7 @@ <h1>Source code for viam.services.motion.motion</h1><div class="highlight"><pre>

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

<span class="sd"> motion = MotionClient.from_robot(robot=robot, name=&quot;builtin&quot;)</span>
<span class="sd"> motion = MotionClient.from_robot(robot=machine, name=&quot;builtin&quot;)</span>
<span class="sd"> # List the plan statuses of the motion service within the TTL</span>
<span class="sd"> resp = await motion.list_plan_statuses()</span>

Expand Down Expand Up @@ -448,7 +448,7 @@ <h1>Source code for viam.services.motion.motion</h1><div class="highlight"><pre>
<span class="sd"> # Assume that the connect function is written and will return a valid machine.</span>
<span class="sd"> robot = await connect()</span>

<span class="sd"> motion = MotionClient.from_robot(robot=robot, name=&quot;builtin&quot;)</span>
<span class="sd"> motion = MotionClient.from_robot(robot=machine, name=&quot;builtin&quot;)</span>
<span class="sd"> gripperName = Gripper.get_resource_name(&quot;my_gripper&quot;)</span>
<span class="sd"> gripperPoseInWorld = await motion.get_pose(component_name=gripperName,</span>
<span class="sd"> destination_frame=&quot;world&quot;)</span>
Expand Down
Loading

0 comments on commit 03578e0

Please sign in to comment.