From fbf6096a3b16172b0b326b244fb9b291e21eea05 Mon Sep 17 00:00:00 2001 From: Evgeni Dobranov Date: Fri, 16 Oct 2026 16:32:37 -0400 Subject: [PATCH] APP-18179 Fix code samples for audio, motion and pose tracker Drop the audio entry. The SDK has never had a viam.components.audio module and no resource has an audio subtype: audio input was audio_input, since replaced by audio_in and audio_out, which have their own entries. The entry could only ever generate a failing import. Give motion's get_pose and the pose tracker's get_poses the arguments they require. Motion asks for the world frame's pose in the world frame, which succeeds on any machine; the pose tracker passes an empty body list, which returns every body. Also indent the audio_in and audio_out entries like the rest of the file. Co-Authored-By: Claude Opus 5.5 --- examples/apis.json | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/apis.json b/examples/apis.json index a90c362ad7..827b49a44c 100644 --- a/examples/apis.json +++ b/examples/apis.json @@ -68,12 +68,9 @@ "packageName": "input", "importName": "Controller" }, - "audio": { - "func": "get_properties", - "packagePath": "viam.components" - }, "pose_tracker": { "func": "get_poses", + "args": ["body_names=[]"], "packagePath": "viam.components" }, "power_sensor": { @@ -82,6 +79,8 @@ }, "motion": { "func": "get_pose", + "comment": "Note that this gets the pose of the world frame itself, which is always zero. Change the component name from \"world\" to one of your components to get its pose.", + "args": ["component_name=\"world\"", "destination_frame=\"world\""], "packagePath": "viam.services", "importName": "MotionClient" }, @@ -108,11 +107,11 @@ "importName": "SLAMClient" }, "audio_in": { - "func": "get_properties", - "packagePath": "viam.components" + "func": "get_properties", + "packagePath": "viam.components" }, "audio_out": { - "func": "get_properties", - "packagePath": "viam.components" + "func": "get_properties", + "packagePath": "viam.components" } }