viam-sdk 0.25.2__py3-none-linux_armv7l.whl → 0.62.0__py3-none-linux_armv7l.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. viam/app/_logs.py +3 -6
  2. viam/app/app_client.py +606 -262
  3. viam/app/billing_client.py +60 -18
  4. viam/app/data_client.py +1086 -315
  5. viam/app/ml_training_client.py +51 -48
  6. viam/app/provisioning_client.py +3 -5
  7. viam/app/viam_client.py +105 -11
  8. viam/components/arm/__init__.py +1 -25
  9. viam/components/arm/arm.py +21 -22
  10. viam/components/arm/client.py +27 -30
  11. viam/components/arm/service.py +3 -3
  12. viam/components/audio_in/__init__.py +24 -0
  13. viam/components/audio_in/audio_in.py +74 -0
  14. viam/components/audio_in/client.py +76 -0
  15. viam/components/audio_in/service.py +83 -0
  16. viam/components/audio_input/__init__.py +1 -1
  17. viam/components/audio_input/audio_input.py +4 -3
  18. viam/components/audio_input/client.py +19 -8
  19. viam/components/audio_input/service.py +10 -0
  20. viam/components/audio_out/__init__.py +21 -0
  21. viam/components/audio_out/audio_out.py +72 -0
  22. viam/components/audio_out/client.py +67 -0
  23. viam/components/audio_out/service.py +63 -0
  24. viam/components/base/__init__.py +2 -10
  25. viam/components/base/base.py +20 -20
  26. viam/components/base/client.py +27 -30
  27. viam/components/board/__init__.py +2 -25
  28. viam/components/board/board.py +39 -77
  29. viam/components/board/client.py +39 -73
  30. viam/components/button/__init__.py +10 -0
  31. viam/components/button/button.py +41 -0
  32. viam/components/button/client.py +52 -0
  33. viam/components/button/service.py +46 -0
  34. viam/components/camera/__init__.py +1 -1
  35. viam/components/camera/camera.py +31 -22
  36. viam/components/camera/client.py +30 -20
  37. viam/components/camera/service.py +14 -12
  38. viam/components/component_base.py +10 -7
  39. viam/components/encoder/__init__.py +1 -1
  40. viam/components/encoder/client.py +15 -16
  41. viam/components/encoder/encoder.py +9 -9
  42. viam/components/gantry/__init__.py +1 -13
  43. viam/components/gantry/client.py +41 -28
  44. viam/components/gantry/gantry.py +48 -17
  45. viam/components/gantry/service.py +21 -5
  46. viam/components/generic/__init__.py +1 -1
  47. viam/components/generic/client.py +11 -7
  48. viam/components/generic/generic.py +3 -3
  49. viam/components/gripper/__init__.py +3 -12
  50. viam/components/gripper/client.py +43 -20
  51. viam/components/gripper/gripper.py +87 -12
  52. viam/components/gripper/service.py +32 -3
  53. viam/components/input/__init__.py +1 -14
  54. viam/components/input/client.py +22 -23
  55. viam/components/input/input.py +18 -12
  56. viam/components/motor/__init__.py +1 -21
  57. viam/components/motor/client.py +36 -42
  58. viam/components/motor/motor.py +24 -24
  59. viam/components/movement_sensor/__init__.py +1 -1
  60. viam/components/movement_sensor/client.py +33 -40
  61. viam/components/movement_sensor/movement_sensor.py +12 -12
  62. viam/components/pose_tracker/__init__.py +1 -1
  63. viam/components/pose_tracker/client.py +9 -8
  64. viam/components/pose_tracker/pose_tracker.py +2 -2
  65. viam/components/power_sensor/__init__.py +1 -1
  66. viam/components/power_sensor/client.py +15 -18
  67. viam/components/power_sensor/power_sensor.py +12 -12
  68. viam/components/sensor/__init__.py +1 -1
  69. viam/components/sensor/client.py +9 -8
  70. viam/components/sensor/sensor.py +5 -5
  71. viam/components/servo/__init__.py +1 -13
  72. viam/components/servo/client.py +18 -18
  73. viam/components/servo/servo.py +12 -12
  74. viam/components/switch/__init__.py +10 -0
  75. viam/components/switch/client.py +83 -0
  76. viam/components/switch/service.py +72 -0
  77. viam/components/switch/switch.py +95 -0
  78. viam/gen/app/agent/v1/agent_pb2.py +40 -29
  79. viam/gen/app/agent/v1/agent_pb2.pyi +73 -11
  80. viam/gen/app/cloudslam/v1/cloud_slam_pb2.py +45 -42
  81. viam/gen/app/data/v1/data_grpc.py +98 -2
  82. viam/gen/app/data/v1/data_pb2.py +238 -119
  83. viam/gen/app/data/v1/data_pb2.pyi +804 -34
  84. viam/gen/app/datapipelines/v1/data_pipelines_grpc.py +84 -0
  85. viam/gen/app/datapipelines/v1/data_pipelines_pb2.py +57 -0
  86. viam/gen/app/datapipelines/v1/data_pipelines_pb2.pyi +387 -0
  87. viam/gen/app/dataset/v1/dataset_grpc.py +10 -2
  88. viam/gen/app/dataset/v1/dataset_pb2.py +38 -31
  89. viam/gen/app/dataset/v1/dataset_pb2.pyi +36 -1
  90. viam/gen/app/datasync/v1/data_sync_grpc.py +1 -1
  91. viam/gen/app/datasync/v1/data_sync_pb2.py +61 -51
  92. viam/gen/app/datasync/v1/data_sync_pb2.pyi +52 -12
  93. viam/gen/app/mlinference/__init__.py +0 -0
  94. viam/gen/app/mlinference/v1/__init__.py +0 -0
  95. viam/gen/app/mlinference/v1/ml_inference_grpc.py +28 -0
  96. viam/gen/app/mlinference/v1/ml_inference_pb2.py +23 -0
  97. viam/gen/app/mlinference/v1/ml_inference_pb2.pyi +63 -0
  98. viam/gen/app/mltraining/v1/ml_training_grpc.py +18 -2
  99. viam/gen/app/mltraining/v1/ml_training_pb2.py +134 -101
  100. viam/gen/app/mltraining/v1/ml_training_pb2.pyi +193 -7
  101. viam/gen/app/packages/v1/packages_pb2.py +43 -40
  102. viam/gen/app/v1/app_grpc.py +290 -2
  103. viam/gen/app/v1/app_pb2.py +670 -453
  104. viam/gen/app/v1/app_pb2.pyi +3133 -947
  105. viam/gen/app/v1/billing_grpc.py +34 -2
  106. viam/gen/app/v1/billing_pb2.py +94 -35
  107. viam/gen/app/v1/billing_pb2.pyi +314 -61
  108. viam/gen/app/v1/end_user_pb2.py +50 -29
  109. viam/gen/app/v1/robot_pb2.py +120 -111
  110. viam/gen/app/v1/robot_pb2.pyi +137 -15
  111. viam/gen/common/v1/common_pb2.py +86 -66
  112. viam/gen/common/v1/common_pb2.pyi +184 -8
  113. viam/gen/component/arm/v1/arm_grpc.py +18 -2
  114. viam/gen/component/arm/v1/arm_pb2.py +68 -55
  115. viam/gen/component/arm/v1/arm_pb2.pyi +73 -3
  116. viam/gen/component/audioin/__init__.py +0 -0
  117. viam/gen/component/audioin/v1/__init__.py +0 -0
  118. viam/gen/component/audioin/v1/audioin_grpc.py +54 -0
  119. viam/gen/component/audioin/v1/audioin_pb2.py +34 -0
  120. viam/gen/component/audioin/v1/audioin_pb2.pyi +94 -0
  121. viam/gen/component/audioinput/v1/audioinput_pb2.py +35 -32
  122. viam/gen/component/audioout/__init__.py +0 -0
  123. viam/gen/component/audioout/v1/__init__.py +0 -0
  124. viam/gen/component/audioout/v1/audioout_grpc.py +54 -0
  125. viam/gen/component/audioout/v1/audioout_pb2.py +32 -0
  126. viam/gen/component/audioout/v1/audioout_pb2.pyi +47 -0
  127. viam/gen/component/base/v1/base_pb2.py +57 -54
  128. viam/gen/component/board/v1/board_pb2.py +93 -90
  129. viam/gen/component/button/__init__.py +0 -0
  130. viam/gen/component/button/v1/__init__.py +0 -0
  131. viam/gen/component/button/v1/button_grpc.py +38 -0
  132. viam/gen/component/button/v1/button_pb2.py +28 -0
  133. viam/gen/component/button/v1/button_pb2.pyi +39 -0
  134. viam/gen/component/camera/v1/camera_pb2.py +58 -55
  135. viam/gen/component/camera/v1/camera_pb2.pyi +31 -7
  136. viam/gen/component/encoder/v1/encoder_pb2.py +35 -32
  137. viam/gen/component/gantry/v1/gantry_grpc.py +9 -1
  138. viam/gen/component/gantry/v1/gantry_pb2.py +56 -51
  139. viam/gen/component/generic/v1/generic_pb2.py +15 -12
  140. viam/gen/component/gripper/v1/gripper_grpc.py +18 -2
  141. viam/gen/component/gripper/v1/gripper_pb2.py +48 -37
  142. viam/gen/component/gripper/v1/gripper_pb2.pyi +43 -1
  143. viam/gen/component/inputcontroller/v1/input_controller_pb2.py +45 -42
  144. viam/gen/component/motor/v1/motor_pb2.py +77 -74
  145. viam/gen/component/movementsensor/v1/movementsensor_pb2.py +69 -66
  146. viam/gen/component/posetracker/v1/pose_tracker_pb2.py +25 -22
  147. viam/gen/component/powersensor/v1/powersensor_pb2.py +33 -30
  148. viam/gen/component/sensor/v1/sensor_pb2.py +17 -14
  149. viam/gen/component/servo/v1/servo_pb2.py +41 -38
  150. viam/gen/component/switch/__init__.py +0 -0
  151. viam/gen/component/switch/v1/__init__.py +0 -0
  152. viam/gen/component/switch/v1/switch_grpc.py +54 -0
  153. viam/gen/component/switch/v1/switch_pb2.py +40 -0
  154. viam/gen/component/switch/v1/switch_pb2.pyi +116 -0
  155. viam/gen/component/testecho/v1/testecho_pb2.py +29 -26
  156. viam/gen/module/v1/module_pb2.py +36 -33
  157. viam/gen/module/v1/module_pb2.pyi +7 -2
  158. viam/gen/proto/rpc/examples/echo/v1/echo_pb2.py +26 -23
  159. viam/gen/proto/rpc/examples/echoresource/v1/echoresource_pb2.py +23 -20
  160. viam/gen/proto/rpc/v1/auth_pb2.py +27 -24
  161. viam/gen/proto/rpc/webrtc/v1/grpc_pb2.py +35 -32
  162. viam/gen/proto/rpc/webrtc/v1/signaling_pb2.py +62 -57
  163. viam/gen/proto/rpc/webrtc/v1/signaling_pb2.pyi +18 -4
  164. viam/gen/provisioning/v1/provisioning_grpc.py +10 -2
  165. viam/gen/provisioning/v1/provisioning_pb2.py +38 -31
  166. viam/gen/provisioning/v1/provisioning_pb2.pyi +20 -2
  167. viam/gen/robot/v1/robot_grpc.py +61 -29
  168. viam/gen/robot/v1/robot_pb2.py +186 -155
  169. viam/gen/robot/v1/robot_pb2.pyi +278 -59
  170. viam/gen/service/datamanager/v1/data_manager_grpc.py +11 -2
  171. viam/gen/service/datamanager/v1/data_manager_pb2.py +27 -17
  172. viam/gen/service/datamanager/v1/data_manager_pb2.pyi +47 -1
  173. viam/gen/service/discovery/__init__.py +0 -0
  174. viam/gen/service/discovery/v1/__init__.py +0 -0
  175. viam/gen/service/discovery/v1/discovery_grpc.py +39 -0
  176. viam/gen/service/discovery/v1/discovery_pb2.py +29 -0
  177. viam/gen/service/discovery/v1/discovery_pb2.pyi +51 -0
  178. viam/gen/service/generic/v1/generic_pb2.py +13 -10
  179. viam/gen/service/mlmodel/v1/mlmodel_pb2.py +75 -72
  180. viam/gen/service/motion/v1/motion_pb2.py +118 -85
  181. viam/gen/service/motion/v1/motion_pb2.pyi +130 -68
  182. viam/gen/service/navigation/v1/navigation_pb2.py +75 -72
  183. viam/gen/service/sensors/v1/sensors_pb2.py +59 -56
  184. viam/gen/service/shell/v1/shell_pb2.py +35 -32
  185. viam/gen/service/slam/v1/slam_pb2.py +43 -40
  186. viam/gen/service/slam/v1/slam_pb2.pyi +1 -1
  187. viam/gen/service/video/__init__.py +0 -0
  188. viam/gen/service/video/v1/__init__.py +0 -0
  189. viam/gen/service/video/v1/video_grpc.py +39 -0
  190. viam/gen/service/video/v1/video_pb2.py +29 -0
  191. viam/gen/service/video/v1/video_pb2.pyi +72 -0
  192. viam/gen/service/vision/v1/vision_pb2.py +60 -57
  193. viam/gen/service/vision/v1/vision_pb2.pyi +28 -3
  194. viam/gen/service/worldstatestore/__init__.py +0 -0
  195. viam/gen/service/worldstatestore/v1/__init__.py +0 -0
  196. viam/gen/service/worldstatestore/v1/world_state_store_grpc.py +55 -0
  197. viam/gen/service/worldstatestore/v1/world_state_store_pb2.py +39 -0
  198. viam/gen/service/worldstatestore/v1/world_state_store_pb2.pyi +171 -0
  199. viam/gen/stream/v1/stream_grpc.py +17 -1
  200. viam/gen/stream/v1/stream_pb2.py +34 -21
  201. viam/gen/stream/v1/stream_pb2.pyi +79 -1
  202. viam/gen/tagger/v1/tagger_pb2.py +9 -8
  203. viam/logging.py +77 -18
  204. viam/media/audio.py +28 -0
  205. viam/media/utils/pil/__init__.py +7 -3
  206. viam/media/video.py +80 -17
  207. viam/module/module.py +111 -38
  208. viam/module/resource_data_consumer.py +41 -0
  209. viam/module/service.py +9 -1
  210. viam/module/types.py +2 -4
  211. viam/proto/app/__init__.py +199 -0
  212. viam/proto/app/agent/__init__.py +5 -2
  213. viam/proto/app/billing.py +31 -4
  214. viam/proto/app/cloudslam/__init__.py +1 -0
  215. viam/proto/app/data/__init__.py +63 -0
  216. viam/proto/app/datapipelines/__init__.py +56 -0
  217. viam/proto/app/dataset/__init__.py +5 -0
  218. viam/proto/app/datasync/__init__.py +3 -0
  219. viam/proto/app/end_user.py +1 -0
  220. viam/proto/app/mlinference/__init__.py +15 -0
  221. viam/proto/app/mltraining/__init__.py +13 -0
  222. viam/proto/app/packages/__init__.py +1 -0
  223. viam/proto/app/robot.py +7 -0
  224. viam/proto/common/__init__.py +15 -0
  225. viam/proto/component/arm/__init__.py +7 -0
  226. viam/proto/component/audioin/__init__.py +16 -0
  227. viam/proto/component/audioinput/__init__.py +1 -0
  228. viam/proto/component/audioout/__init__.py +15 -0
  229. viam/proto/component/base/__init__.py +1 -0
  230. viam/proto/component/board/__init__.py +1 -0
  231. viam/proto/component/button/__init__.py +15 -0
  232. viam/proto/component/camera/__init__.py +1 -0
  233. viam/proto/component/encoder/__init__.py +1 -0
  234. viam/proto/component/gantry/__init__.py +1 -0
  235. viam/proto/component/generic/__init__.py +1 -0
  236. viam/proto/component/gripper/__init__.py +5 -0
  237. viam/proto/component/inputcontroller/__init__.py +1 -0
  238. viam/proto/component/motor/__init__.py +1 -0
  239. viam/proto/component/movementsensor/__init__.py +1 -0
  240. viam/proto/component/posetracker/__init__.py +1 -0
  241. viam/proto/component/powersensor/__init__.py +1 -0
  242. viam/proto/component/sensor/__init__.py +1 -0
  243. viam/proto/component/servo/__init__.py +1 -0
  244. viam/proto/component/switch/__init__.py +26 -0
  245. viam/proto/component/testecho/__init__.py +1 -0
  246. viam/proto/module/__init__.py +1 -0
  247. viam/proto/provisioning/__init__.py +5 -0
  248. viam/proto/robot/__init__.py +29 -8
  249. viam/proto/rpc/auth.py +1 -0
  250. viam/proto/rpc/examples/echo/__init__.py +1 -0
  251. viam/proto/rpc/examples/echoresource/__init__.py +1 -0
  252. viam/proto/rpc/webrtc/grpc.py +1 -0
  253. viam/proto/rpc/webrtc/signaling.py +3 -0
  254. viam/proto/service/datamanager/__init__.py +9 -1
  255. viam/proto/service/discovery/__init__.py +15 -0
  256. viam/proto/service/generic/__init__.py +1 -0
  257. viam/proto/service/mlmodel/__init__.py +1 -0
  258. viam/proto/service/motion/__init__.py +3 -0
  259. viam/proto/service/navigation/__init__.py +1 -0
  260. viam/proto/service/sensors/__init__.py +1 -0
  261. viam/proto/service/shell/__init__.py +1 -0
  262. viam/proto/service/slam/__init__.py +1 -0
  263. viam/proto/service/video/__init__.py +15 -0
  264. viam/proto/service/vision/__init__.py +1 -0
  265. viam/proto/service/worldstatestore/__init__.py +32 -0
  266. viam/proto/stream/__init__.py +11 -0
  267. viam/py.typed +0 -0
  268. viam/resource/base.py +12 -8
  269. viam/resource/easy_resource.py +24 -13
  270. viam/resource/manager.py +6 -5
  271. viam/resource/registry.py +39 -51
  272. viam/resource/rpc_client_base.py +33 -1
  273. viam/resource/types.py +13 -14
  274. viam/robot/client.py +190 -122
  275. viam/robot/service.py +2 -50
  276. viam/rpc/dial.py +54 -4
  277. viam/rpc/libviam_rust_utils.so +0 -0
  278. viam/rpc/server.py +25 -11
  279. viam/rpc/types.py +2 -4
  280. viam/services/discovery/__init__.py +12 -0
  281. viam/services/discovery/client.py +55 -0
  282. viam/services/discovery/discovery.py +52 -0
  283. viam/services/discovery/service.py +43 -0
  284. viam/services/generic/__init__.py +1 -1
  285. viam/services/generic/client.py +8 -5
  286. viam/services/generic/generic.py +2 -2
  287. viam/services/mlmodel/__init__.py +1 -1
  288. viam/services/mlmodel/client.py +17 -7
  289. viam/services/mlmodel/mlmodel.py +23 -12
  290. viam/services/mlmodel/service.py +5 -2
  291. viam/services/mlmodel/utils.py +11 -1
  292. viam/services/motion/__init__.py +2 -2
  293. viam/services/motion/client.py +32 -32
  294. viam/services/motion/motion.py +66 -62
  295. viam/services/navigation/__init__.py +1 -1
  296. viam/services/navigation/client.py +30 -20
  297. viam/services/navigation/navigation.py +23 -23
  298. viam/services/service_base.py +13 -9
  299. viam/services/service_client_base.py +3 -3
  300. viam/services/slam/__init__.py +1 -1
  301. viam/services/slam/client.py +15 -10
  302. viam/services/slam/slam.py +11 -11
  303. viam/services/vision/__init__.py +1 -1
  304. viam/services/vision/client.py +31 -24
  305. viam/services/vision/service.py +8 -8
  306. viam/services/vision/vision.py +36 -53
  307. viam/services/worldstatestore/__init__.py +18 -0
  308. viam/services/worldstatestore/client.py +94 -0
  309. viam/services/worldstatestore/service.py +55 -0
  310. viam/services/worldstatestore/worldstatestore.py +90 -0
  311. viam/sessions_client.py +115 -46
  312. viam/streams.py +3 -6
  313. viam/utils.py +44 -14
  314. viam/version_metadata.py +4 -0
  315. {viam_sdk-0.25.2.dist-info → viam_sdk-0.62.0.dist-info}/METADATA +27 -28
  316. viam_sdk-0.62.0.dist-info/RECORD +514 -0
  317. {viam_sdk-0.25.2.dist-info → viam_sdk-0.62.0.dist-info}/WHEEL +1 -1
  318. viam/gen/proto/rpc/examples/fileupload/v1/fileupload_grpc.py +0 -27
  319. viam/gen/proto/rpc/examples/fileupload/v1/fileupload_pb2.py +0 -18
  320. viam/gen/proto/rpc/examples/fileupload/v1/fileupload_pb2.pyi +0 -45
  321. viam/proto/rpc/examples/fileupload/__init__.py +0 -18
  322. viam/services/sensors/__init__.py +0 -5
  323. viam/services/sensors/client.py +0 -65
  324. viam_sdk-0.25.2.dist-info/LICENSE +0 -202
  325. viam_sdk-0.25.2.dist-info/RECORD +0 -442
  326. /viam/gen/{proto/rpc/examples/fileupload → app/datapipelines}/__init__.py +0 -0
  327. /viam/gen/{proto/rpc/examples/fileupload → app/datapipelines}/v1/__init__.py +0 -0
  328. /LICENSE → /viam_sdk-0.62.0.dist-info/licenses/LICENSE +0 -0
@@ -41,49 +41,59 @@ class NavigationClient(Navigation, ReconfigurableResourceRPCClientBase):
41
41
  self.client = NavigationServiceStub(channel)
42
42
  super().__init__(name)
43
43
 
44
- async def get_paths(self, *, timeout: Optional[float] = None) -> List[Path]:
44
+ async def get_paths(self, *, timeout: Optional[float] = None, **kwargs) -> List[Path]:
45
+ md = kwargs.get("metadata", self.Metadata()).proto
45
46
  request = GetPathsRequest(name=self.name)
46
- response: GetPathsResponse = await self.client.GetPaths(request, timeout=timeout)
47
+ response: GetPathsResponse = await self.client.GetPaths(request, timeout=timeout, metadata=md)
47
48
  return list(response.paths)
48
49
 
49
- async def get_location(self, *, timeout: Optional[float] = None) -> GeoPoint:
50
+ async def get_location(self, *, timeout: Optional[float] = None, **kwargs) -> GeoPoint:
51
+ md = kwargs.get("metadata", self.Metadata()).proto
50
52
  request = GetLocationRequest(name=self.name)
51
- response: GetLocationResponse = await self.client.GetLocation(request, timeout=timeout)
53
+ response: GetLocationResponse = await self.client.GetLocation(request, timeout=timeout, metadata=md)
52
54
  return response.location
53
55
 
54
- async def get_obstacles(self, *, timeout: Optional[float] = None) -> List[GeoGeometry]:
56
+ async def get_obstacles(self, *, timeout: Optional[float] = None, **kwargs) -> List[GeoGeometry]:
57
+ md = kwargs.get("metadata", self.Metadata()).proto
55
58
  request = GetObstaclesRequest(name=self.name)
56
- response: GetObstaclesResponse = await self.client.GetObstacles(request, timeout=timeout)
59
+ response: GetObstaclesResponse = await self.client.GetObstacles(request, timeout=timeout, metadata=md)
57
60
  return list(response.obstacles)
58
61
 
59
- async def get_waypoints(self, *, timeout: Optional[float] = None) -> List[Waypoint]:
62
+ async def get_waypoints(self, *, timeout: Optional[float] = None, **kwargs) -> List[Waypoint]:
63
+ md = kwargs.get("metadata", self.Metadata()).proto
60
64
  request = GetWaypointsRequest(name=self.name)
61
- response: GetWaypointsResponse = await self.client.GetWaypoints(request, timeout=timeout)
65
+ response: GetWaypointsResponse = await self.client.GetWaypoints(request, timeout=timeout, metadata=md)
62
66
  return list(response.waypoints)
63
67
 
64
- async def add_waypoint(self, point: GeoPoint, *, timeout: Optional[float] = None):
68
+ async def add_waypoint(self, point: GeoPoint, *, timeout: Optional[float] = None, **kwargs):
69
+ md = kwargs.get("metadata", self.Metadata()).proto
65
70
  request = AddWaypointRequest(name=self.name, location=point)
66
- await self.client.AddWaypoint(request, timeout=timeout)
71
+ await self.client.AddWaypoint(request, timeout=timeout, metadata=md)
67
72
 
68
- async def remove_waypoint(self, id: str, *, timeout: Optional[float] = None):
73
+ async def remove_waypoint(self, id: str, *, timeout: Optional[float] = None, **kwargs):
74
+ md = kwargs.get("metadata", self.Metadata()).proto
69
75
  request = RemoveWaypointRequest(name=self.name, id=id)
70
- await self.client.RemoveWaypoint(request, timeout=timeout)
76
+ await self.client.RemoveWaypoint(request, timeout=timeout, metadata=md)
71
77
 
72
- async def get_mode(self, *, timeout: Optional[float] = None) -> Mode.ValueType:
78
+ async def get_mode(self, *, timeout: Optional[float] = None, **kwargs) -> Mode.ValueType:
79
+ md = kwargs.get("metadata", self.Metadata()).proto
73
80
  request = GetModeRequest(name=self.name)
74
- response: GetModeResponse = await self.client.GetMode(request, timeout=timeout)
81
+ response: GetModeResponse = await self.client.GetMode(request, timeout=timeout, metadata=md)
75
82
  return response.mode
76
83
 
77
- async def set_mode(self, mode: Mode.ValueType, *, timeout: Optional[float] = None):
84
+ async def set_mode(self, mode: Mode.ValueType, *, timeout: Optional[float] = None, **kwargs):
85
+ md = kwargs.get("metadata", self.Metadata()).proto
78
86
  request = SetModeRequest(name=self.name, mode=mode)
79
- await self.client.SetMode(request, timeout=timeout)
87
+ await self.client.SetMode(request, timeout=timeout, metadata=md)
80
88
 
81
- async def get_properties(self, *, timeout: Optional[float] = None) -> MapType.ValueType:
89
+ async def get_properties(self, *, timeout: Optional[float] = None, **kwargs) -> MapType.ValueType:
90
+ md = kwargs.get("metadata", self.Metadata()).proto
82
91
  request = GetPropertiesRequest(name=self.name)
83
- response: GetPropertiesResponse = await self.client.GetProperties(request, timeout=timeout)
92
+ response: GetPropertiesResponse = await self.client.GetProperties(request, timeout=timeout, metadata=md)
84
93
  return response.map_type
85
94
 
86
- async def do_command(self, command: Mapping[str, ValueTypes], *, timeout: Optional[float] = None, **__) -> Mapping[str, ValueTypes]:
95
+ async def do_command(self, command: Mapping[str, ValueTypes], *, timeout: Optional[float] = None, **kwargs) -> Mapping[str, ValueTypes]:
96
+ md = kwargs.get("metadata", self.Metadata()).proto
87
97
  request = DoCommandRequest(name=self.name, command=dict_to_struct(command))
88
- response: DoCommandResponse = await self.client.DoCommand(request, timeout=timeout)
98
+ response: DoCommandResponse = await self.client.DoCommand(request, timeout=timeout, metadata=md)
89
99
  return struct_to_dict(response.result)
@@ -1,7 +1,7 @@
1
1
  import abc
2
2
  from typing import Final, List, Optional
3
3
 
4
- from viam.resource.types import RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_SERVICE, Subtype
4
+ from viam.resource.types import API, RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_SERVICE
5
5
 
6
6
  from ..service_base import ServiceBase
7
7
  from . import GeoGeometry, GeoPoint, MapType, Mode, Path, Waypoint
@@ -15,10 +15,10 @@ class Navigation(ServiceBase):
15
15
  navigation service implementations. This cannot be used on its own. If the ``__init__()`` function is
16
16
  overridden, it must call the ``super().__init__()`` function.
17
17
 
18
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
18
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/>`_.
19
19
  """
20
20
 
21
- SUBTYPE: Final = Subtype( # pyright: ignore [reportIncompatibleVariableOverride]
21
+ API: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
22
22
  RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_SERVICE, "navigation"
23
23
  )
24
24
 
@@ -30,7 +30,7 @@ class Navigation(ServiceBase):
30
30
 
31
31
  ::
32
32
 
33
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
33
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
34
34
 
35
35
  # Get a list containing each path stored by the navigation service
36
36
  paths = await my_nav.get_paths()
@@ -44,7 +44,7 @@ class Navigation(ServiceBase):
44
44
  a Waypoint, along with the corresponding set of geopoints. This outlines the route the machine is expected to take to
45
45
  reach the specified destination or Waypoint.
46
46
 
47
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
47
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#getpaths>`_.
48
48
  """
49
49
  ...
50
50
 
@@ -55,7 +55,7 @@ class Navigation(ServiceBase):
55
55
 
56
56
  ::
57
57
 
58
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
58
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
59
59
 
60
60
  # Get the current location of the robot in the navigation service
61
61
  location = await my_nav.get_location()
@@ -68,7 +68,7 @@ class Navigation(ServiceBase):
68
68
  navigation.GeoPoint: The current location of the robot in the navigation service,
69
69
  represented in a GeoPoint with latitude and longitude values.
70
70
 
71
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
71
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#getlocation>`_.
72
72
  """
73
73
  ...
74
74
 
@@ -82,7 +82,7 @@ class Navigation(ServiceBase):
82
82
 
83
83
  ::
84
84
 
85
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
85
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
86
86
 
87
87
  # Get a list containing each obstacle stored by the navigation service
88
88
  obstacles = await my_nav.get_obstacles()
@@ -95,7 +95,7 @@ class Navigation(ServiceBase):
95
95
  List[navigation.GeoGeometry]: A list comprised of each GeoGeometry in the service's data storage.
96
96
  These are objects designated for the robot to avoid when navigating.
97
97
 
98
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
98
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#getobstacles>`_.
99
99
  """
100
100
  ...
101
101
 
@@ -107,7 +107,7 @@ class Navigation(ServiceBase):
107
107
 
108
108
  ::
109
109
 
110
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
110
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
111
111
 
112
112
  # Get a list containing each waypoint stored by the navigation service
113
113
  waypoints = await my_nav.get_waypoints()
@@ -120,7 +120,7 @@ class Navigation(ServiceBase):
120
120
  List[navigation.Waypoint]: An array comprised of each Waypoint in the service's data storage.
121
121
  These are locations designated within a path for the robot to navigate to.
122
122
 
123
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
123
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#getwaypoints>`_.
124
124
  """
125
125
  ...
126
126
 
@@ -131,7 +131,7 @@ class Navigation(ServiceBase):
131
131
 
132
132
  ::
133
133
 
134
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
134
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
135
135
 
136
136
  # Create a new waypoint with latitude and longitude values of 0 degrees
137
137
  location = GeoPoint(latitude=0, longitude=0)
@@ -141,12 +141,12 @@ class Navigation(ServiceBase):
141
141
  await my_nav.add_waypoint(point=location)
142
142
 
143
143
  Args:
144
- point (navigation.GeoPoint): The current location of the robot in the navigation service,
145
- represented in a GeoPoint with latitude and longitude values.
144
+ point (navigation.GeoPoint): A waypoint represented in a GeoPoint with
145
+ latitude and longitude values.
146
146
  timeout (Optional[float]): An option to set how long to wait (in seconds)
147
147
  before calling a time-out and closing the underlying RPC call.
148
148
 
149
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
149
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#addwaypoint>`_.
150
150
  """
151
151
  ...
152
152
 
@@ -158,7 +158,7 @@ class Navigation(ServiceBase):
158
158
 
159
159
  ::
160
160
 
161
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
161
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
162
162
 
163
163
  # Remove the waypoint matching that ObjectID from the service's data storage
164
164
  await my_nav.remove_waypoint(waypoint_id)
@@ -168,7 +168,7 @@ class Navigation(ServiceBase):
168
168
  timeout (Optional[float]): An option to set how long to wait (in seconds)
169
169
  before calling a time-out and closing the underlying RPC call.
170
170
 
171
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
171
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#removewaypoint>`_.
172
172
  """
173
173
  ...
174
174
 
@@ -184,7 +184,7 @@ class Navigation(ServiceBase):
184
184
 
185
185
  ::
186
186
 
187
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
187
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
188
188
 
189
189
  # Get the Mode the service is operating in
190
190
  await my_nav.get_mode()
@@ -196,7 +196,7 @@ class Navigation(ServiceBase):
196
196
  Returns:
197
197
  navigation.Mode.ValueType: The Mode the service is operating in.
198
198
 
199
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
199
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#getmode>`_.
200
200
  """
201
201
  ...
202
202
 
@@ -212,7 +212,7 @@ class Navigation(ServiceBase):
212
212
 
213
213
  ::
214
214
 
215
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
215
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
216
216
 
217
217
  # Set the Mode the service is operating in to MODE_WAYPOINT and begin navigation
218
218
  await my_nav.set_mode(Mode.ValueType.MODE_WAYPOINT)
@@ -222,7 +222,7 @@ class Navigation(ServiceBase):
222
222
  before calling a time-out and closing the underlying RPC call.
223
223
  mode (navigation.Mode.ValueType): The Mode for the service to operate in.
224
224
 
225
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
225
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#setmode>`_.
226
226
  """
227
227
  ...
228
228
 
@@ -233,7 +233,7 @@ class Navigation(ServiceBase):
233
233
 
234
234
  ::
235
235
 
236
- my_nav = NavigationClient.from_robot(robot=robot, name="my_nav_service")
236
+ my_nav = NavigationClient.from_robot(robot=machine, name="my_nav_service")
237
237
 
238
238
  # Get the properties of the current navigation service.
239
239
  nav_properties = await my_nav.get_properties()
@@ -245,6 +245,6 @@ class Navigation(ServiceBase):
245
245
  Returns:
246
246
  MapType.ValueType: Information about the type of map the service is using.
247
247
 
248
- For more information, see `Navigation service <https://docs.viam.com/services/navigation/>`_.
248
+ For more information, see `Navigation service <https://docs.viam.com/dev/reference/apis/services/navigation/#getproperties>`_.
249
249
  """
250
250
  ...
@@ -1,13 +1,15 @@
1
1
  import abc
2
+ from logging import Logger
2
3
  from typing import TYPE_CHECKING, ClassVar, Mapping, Optional, cast
3
4
 
4
5
  from typing_extensions import Self
5
6
 
7
+ from viam.logging import getLogger
6
8
  from viam.resource.base import ResourceBase
7
9
  from viam.utils import ValueTypes
8
10
 
9
11
  if TYPE_CHECKING:
10
- from viam.resource.types import Subtype
12
+ from viam.resource.types import API
11
13
  from viam.robot.client import RobotClient
12
14
 
13
15
 
@@ -16,10 +18,11 @@ class ServiceBase(abc.ABC, ResourceBase):
16
18
  All services must inherit from this class.
17
19
  """
18
20
 
19
- SUBTYPE: ClassVar["Subtype"]
21
+ API: ClassVar["API"]
20
22
 
21
- def __init__(self, name: str) -> None:
23
+ def __init__(self, name: str, *, logger: Optional[Logger] = None) -> None:
22
24
  self.name = name
25
+ self.logger = logger if logger is not None else getLogger(f"{self.API}.{name}")
23
26
 
24
27
  @classmethod
25
28
  def from_robot(cls, robot: "RobotClient", name: str) -> Self:
@@ -27,16 +30,17 @@ class ServiceBase(abc.ABC, ResourceBase):
27
30
 
28
31
  ::
29
32
 
30
- async def connect() -> ViamClient:
33
+ async def connect() -> RobotClient:
31
34
  # Replace "<API-KEY>" (including brackets) with your API key and "<API-KEY-ID>" with your API key ID
32
- dial_options = DialOptions.with_api_key("<API-KEY>", "<API-KEY-ID>")
33
- return await ViamClient.create_from_dial_options(dial_options)
35
+ options = RobotClient.Options.with_api_key("<API-KEY>", "<API-KEY-ID>")
36
+ # Replace "<MACHINE-URL>" (included brackets) with your machine's connection URL or FQDN
37
+ return await RobotClient.at_address("<MACHINE-URL>", options)
34
38
 
35
39
  async def main():
36
40
  robot = await connect()
37
41
 
38
42
  # Can be used with any resource, using the motion service as an example
39
- motion = MotionClient.from_robot(robot=robot, name="builtin")
43
+ motion = MotionClient.from_robot(robot=machine, name="builtin")
40
44
 
41
45
  robot.close()
42
46
 
@@ -48,14 +52,14 @@ class ServiceBase(abc.ABC, ResourceBase):
48
52
  Self: The service, if it exists on the robot
49
53
  """
50
54
  service = robot.get_service(cls.get_resource_name(name))
51
- return cast(cls, service)
55
+ return cast(cls, service) # type: ignore
52
56
 
53
57
  async def do_command(self, command: Mapping[str, ValueTypes], *, timeout: Optional[float] = None, **kwargs) -> Mapping[str, ValueTypes]:
54
58
  """Send/receive arbitrary commands.
55
59
 
56
60
  ::
57
61
 
58
- service = SERVICE.from_robot(robot, "builtin") # replace SERVICE with the appropriate class
62
+ service = SERVICE.from_robot(robot=machine, "builtin") # replace SERVICE with the appropriate class
59
63
 
60
64
  my_command = {
61
65
  "cmnd": "dosomething",
@@ -6,7 +6,7 @@ from typing_extensions import Self
6
6
 
7
7
  from viam.errors import ResourceNotFoundError
8
8
  from viam.proto.common import ResourceName
9
- from viam.resource.base import ResourceBase, Subtype
9
+ from viam.resource.base import API, ResourceBase
10
10
  from viam.utils import ValueTypes
11
11
 
12
12
  if TYPE_CHECKING:
@@ -19,7 +19,7 @@ class ServiceClientBase(abc.ABC, ResourceBase):
19
19
  All service clients must inherit from this class.
20
20
  """
21
21
 
22
- SUBTYPE: ClassVar[Subtype]
22
+ API: ClassVar[API]
23
23
  channel: Channel
24
24
 
25
25
  def __init__(self, name: str, channel: Channel):
@@ -37,7 +37,7 @@ class ServiceClientBase(abc.ABC, ResourceBase):
37
37
  Returns:
38
38
  Self: The service client, if it exists on the robot
39
39
  """
40
- resource_name = ResourceName(namespace="rdk", type="service", subtype=cls.SUBTYPE.resource_subtype, name=name)
40
+ resource_name = ResourceName(namespace="rdk", type="service", subtype=cls.API.resource_subtype, name=name)
41
41
  if resource_name not in robot.resource_names:
42
42
  raise ResourceNotFoundError(resource_name.subtype, resource_name.name)
43
43
  return cls(name, robot._channel)
@@ -14,4 +14,4 @@ __all__ = [
14
14
  "SLAM",
15
15
  ]
16
16
 
17
- Registry.register_subtype(ResourceRegistration(SLAM, SLAMRPCService, lambda name, channel: SLAMClient(name, channel)))
17
+ Registry.register_api(ResourceRegistration(SLAM, SLAMRPCService, lambda name, channel: SLAMClient(name, channel)))
@@ -32,26 +32,31 @@ class SLAMClient(SLAM, ReconfigurableResourceRPCClientBase):
32
32
  self.client = SLAMServiceStub(channel)
33
33
  super().__init__(name)
34
34
 
35
- async def get_position(self, *, timeout: Optional[float] = None) -> Pose:
35
+ async def get_position(self, *, timeout: Optional[float] = None, **kwargs) -> Pose:
36
+ md = kwargs.get("metadata", self.Metadata()).proto
36
37
  request = GetPositionRequest(name=self.name)
37
- response: GetPositionResponse = await self.client.GetPosition(request, timeout=timeout)
38
+ response: GetPositionResponse = await self.client.GetPosition(request, timeout=timeout, metadata=md)
38
39
  return response.pose
39
40
 
40
- async def get_point_cloud_map(self, return_edited_map: bool = False, *, timeout: Optional[float] = None) -> List[bytes]:
41
+ async def get_point_cloud_map(self, return_edited_map: bool = False, *, timeout: Optional[float] = None, **kwargs) -> List[bytes]:
42
+ md = kwargs.get("metadata", self.Metadata()).proto
41
43
  request = GetPointCloudMapRequest(name=self.name, return_edited_map=return_edited_map)
42
- response: List[GetPointCloudMapResponse] = await self.client.GetPointCloudMap(request, timeout=timeout)
44
+ response: List[GetPointCloudMapResponse] = await self.client.GetPointCloudMap(request, timeout=timeout, metadata=md)
43
45
  return [r.point_cloud_pcd_chunk for r in response]
44
46
 
45
- async def get_internal_state(self, *, timeout: Optional[float] = None) -> List[bytes]:
47
+ async def get_internal_state(self, *, timeout: Optional[float] = None, **kwargs) -> List[bytes]:
48
+ md = kwargs.get("metadata", self.Metadata()).proto
46
49
  request = GetInternalStateRequest(name=self.name)
47
- response: List[GetInternalStateResponse] = await self.client.GetInternalState(request, timeout=timeout)
50
+ response: List[GetInternalStateResponse] = await self.client.GetInternalState(request, timeout=timeout, metadata=md)
48
51
  return [r.internal_state_chunk for r in response]
49
52
 
50
- async def get_properties(self, *, timeout: Optional[float] = None) -> SLAM.Properties:
53
+ async def get_properties(self, *, timeout: Optional[float] = None, **kwargs) -> SLAM.Properties:
54
+ md = kwargs.get("metadata", self.Metadata()).proto
51
55
  request = GetPropertiesRequest(name=self.name)
52
- return await self.client.GetProperties(request, timeout=timeout)
56
+ return await self.client.GetProperties(request, timeout=timeout, metadata=md)
53
57
 
54
- async def do_command(self, command: Mapping[str, ValueTypes], *, timeout: Optional[float] = None, **__) -> Mapping[str, ValueTypes]:
58
+ async def do_command(self, command: Mapping[str, ValueTypes], *, timeout: Optional[float] = None, **kwargs) -> Mapping[str, ValueTypes]:
59
+ md = kwargs.get("metadata", self.Metadata()).proto
55
60
  request = DoCommandRequest(name=self.name, command=dict_to_struct(command))
56
- response: DoCommandResponse = await self.client.DoCommand(request, timeout=timeout)
61
+ response: DoCommandResponse = await self.client.DoCommand(request, timeout=timeout, metadata=md)
57
62
  return struct_to_dict(response.result)
@@ -3,7 +3,7 @@ import sys
3
3
  from typing import Final, List, Optional
4
4
 
5
5
  from viam.proto.service.slam import GetPropertiesResponse
6
- from viam.resource.types import RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_SERVICE, Subtype
6
+ from viam.resource.types import API, RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_SERVICE
7
7
 
8
8
  from ..service_base import ServiceBase
9
9
  from . import Pose
@@ -22,10 +22,10 @@ class SLAM(ServiceBase):
22
22
  arm implementations. This cannot be used on its own. If the ``__init__()`` function is
23
23
  overridden, it must call the ``super().__init__()`` function.
24
24
 
25
- For more information, see `SLAM service <https://docs.viam.com/services/slam/>`_.
25
+ For more information, see `SLAM service <https://docs.viam.com/dev/reference/apis/services/slam/>`_.
26
26
  """
27
27
 
28
- SUBTYPE: Final = Subtype(RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_SERVICE, "slam") # pyright: ignore [reportIncompatibleVariableOverride]
28
+ API: Final = API(RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_SERVICE, "slam") # pyright: ignore [reportIncompatibleVariableOverride]
29
29
 
30
30
  Properties: "TypeAlias" = GetPropertiesResponse
31
31
 
@@ -36,7 +36,7 @@ class SLAM(ServiceBase):
36
36
 
37
37
  ::
38
38
 
39
- slam = SLAMClient.from_robot(robot=robot, name="my_slam_service")
39
+ slam = SLAMClient.from_robot(robot=machine, name="my_slam_service")
40
40
 
41
41
  # Get the internal state of the SLAM algorithm required to continue mapping/localization.
42
42
  internal_state = await slam.get_internal_state()
@@ -44,7 +44,7 @@ class SLAM(ServiceBase):
44
44
  Returns:
45
45
  List[GetInternalStateResponse]: Chunks of the internal state of the SLAM algorithm
46
46
 
47
- For more information, see `SLAM service <https://docs.viam.com/services/slam/>`_.
47
+ For more information, see `SLAM service <https://docs.viam.com/dev/reference/apis/services/slam/#getinternalstate>`_.
48
48
  """
49
49
  ...
50
50
 
@@ -55,7 +55,7 @@ class SLAM(ServiceBase):
55
55
 
56
56
  ::
57
57
 
58
- slam_svc = SLAMClient.from_robot(robot=robot, name="my_slam_service")
58
+ slam_svc = SLAMClient.from_robot(robot=machine, name="my_slam_service")
59
59
 
60
60
  # Get the point cloud map in standard PCD format.
61
61
  pcd_map = await slam_svc.get_point_cloud_map()
@@ -68,7 +68,7 @@ class SLAM(ServiceBase):
68
68
  List[GetPointCloudMapResponse]: Complete pointcloud in standard PCD format. Chunks of the PointCloud, concatenating all
69
69
  GetPointCloudMapResponse.point_cloud_pcd_chunk values.
70
70
 
71
- For more information, see `SLAM service <https://docs.viam.com/services/slam/>`_.
71
+ For more information, see `SLAM service <https://docs.viam.com/dev/reference/apis/services/slam/#getpointcloudmap>`_.
72
72
  """
73
73
  ...
74
74
 
@@ -79,7 +79,7 @@ class SLAM(ServiceBase):
79
79
 
80
80
  ::
81
81
 
82
- slam_svc = SLAMClient.from_robot(robot=robot, name="my_slam_service")
82
+ slam_svc = SLAMClient.from_robot(robot=machine, name="my_slam_service")
83
83
 
84
84
  # Get the current position of the specified source component in the SLAM map as a Pose.
85
85
  pose = await slam.get_position()
@@ -87,7 +87,7 @@ class SLAM(ServiceBase):
87
87
  Returns:
88
88
  Pose: The current position of the specified component
89
89
 
90
- For more information, see `SLAM service <https://docs.viam.com/services/slam/>`_.
90
+ For more information, see `SLAM service <https://docs.viam.com/dev/reference/apis/services/slam/#getposition>`_.
91
91
  """
92
92
  ...
93
93
 
@@ -98,7 +98,7 @@ class SLAM(ServiceBase):
98
98
 
99
99
  ::
100
100
 
101
- slam_svc = SLAMClient.from_robot(robot=robot, name="my_slam_service")
101
+ slam_svc = SLAMClient.from_robot(robot=machine, name="my_slam_service")
102
102
 
103
103
  # Get the properties of your current SLAM session.
104
104
  slam_properties = await slam_svc.get_properties()
@@ -106,6 +106,6 @@ class SLAM(ServiceBase):
106
106
  Returns:
107
107
  Properties: The properties of SLAM
108
108
 
109
- For more information, see `SLAM service <https://docs.viam.com/services/slam/>`_.
109
+ For more information, see `SLAM service <https://docs.viam.com/dev/reference/apis/services/slam/#getproperties>`_.
110
110
  """
111
111
  ...
@@ -12,4 +12,4 @@ __all__ = [
12
12
  "Vision",
13
13
  ]
14
14
 
15
- Registry.register_subtype(ResourceRegistration(Vision, VisionRPCService, lambda name, channel: VisionClient(name, channel)))
15
+ Registry.register_api(ResourceRegistration(Vision, VisionRPCService, lambda name, channel: VisionClient(name, channel)))