@@ -613,6 +613,7 @@ async def get_status(self, components: Optional[List[ResourceName]] = None) -> L
613
613
614
614
# Get the status of the resources on the machine.
615
615
statuses = await machine.get_status()
616
+ resource_statuses = machine_status.resources
616
617
617
618
Args:
618
619
components (Optional[List[viam.proto.common.ResourceName]]): Optional list of
@@ -713,7 +714,24 @@ async def transform_pose(
713
714
714
715
::
715
716
716
- pose = await machine.transform_pose(PoseInFrame(), "origin")
717
+ from viam.proto.common import Pose, PoseInFrame
718
+
719
+ pose = Pose(
720
+ x=1.0, # X coordinate in mm
721
+ y=2.0, # Y coordinate in mm
722
+ z=3.0, # Z coordinate in mm
723
+ o_x=0.0, # X component of orientation vector
724
+ o_y=0.0, # Y component of orientation vector
725
+ o_z=0.0, # Z component of orientation vector
726
+ theta=0.0 # Orientation angle in degrees
727
+ )
728
+
729
+ pose_in_frame = PoseInFrame(
730
+ reference_frame="world",
731
+ pose=pose
732
+ )
733
+
734
+ transformed_pose = await machine.transform_pose(pose_in_frame, "world")
717
735
718
736
Args:
719
737
@@ -741,12 +759,15 @@ async def discover_components(
741
759
queries : List [DiscoveryQuery ],
742
760
) -> List [Discovery ]:
743
761
"""
744
- Get the list of discovered component configurations.
762
+ Get a list of discovered potential component configurations, for example listing different supported resolutions. Currently only works for some cameras.
763
+ Returns module names for modules.
745
764
746
765
::
747
766
767
+ from viam.proto.robot import DiscoveryQuery
768
+
748
769
# Define a new discovery query.
749
- q = machine. DiscoveryQuery(subtype=acme.API , model="some model ")
770
+ q = DiscoveryQuery(subtype="camera" , model="webcam ")
750
771
751
772
# Define a list of discovery queries.
752
773
qs = [q]
@@ -756,10 +777,10 @@ async def discover_components(
756
777
757
778
Args:
758
779
759
- queries (List[viam.proto.robot.DiscoveryQuery]): The list of component models to lookup configurations for.
780
+ queries (List[viam.proto.robot.DiscoveryQuery]): The list of component models to lookup potential configurations for.
760
781
761
782
Returns:
762
- List[Discovery]: A list of discovered component configurations.
783
+ List[Discovery]: A list of discovered potential component configurations.
763
784
764
785
For more information, see `Machine Management API <https://docs.viam.com/appendix/apis/robot/>`_.
765
786
"""
0 commit comments