Skip to content

Commit

Permalink
Make code samples more consistent (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Nov 1, 2024
1 parent 3cde16a commit f5c2676
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/viam/components/camera/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ async def get_point_cloud(
import numpy as np
import open3d as o3d
my_camera = Camera.from_robot(robot=machine, name="my_camera")
data, _ = await my_camera.get_point_cloud()
# write the point cloud into a temporary file
Expand Down
2 changes: 2 additions & 0 deletions src/viam/components/input/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ async def trigger_event(
"""Directly send an Event (such as a button press) from external code
::
my_controller = Controller.from_robot(
robot=machine, name="my_controller")
# Get your controller from the machine.
my_controller = Controller.from_robot(
Expand Down
2 changes: 2 additions & 0 deletions src/viam/services/motion/motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ async def stop_plan(
::
motion = MotionClient.from_robot(robot=machine, name="builtin")
# Assuming a `move_on_globe()` started the execution
# Stop the base component which was instructed to move by `move_on_globe()`
# or `move_on_map()`
Expand Down

0 comments on commit f5c2676

Please sign in to comment.