Skip to content

Conversation

hexbabe
Copy link
Member

@hexbabe hexbabe commented Aug 27, 2025

RSDK-11706

Update TypeScript SDK with new GetImages signature

@hexbabe hexbabe requested a review from a team as a code owner August 27, 2025 18:45
@hexbabe
Copy link
Member Author

hexbabe commented Aug 27, 2025

@stuqdog @micheal-parks @lia-viam Any ideas on how I can easily manually test this change? e.g. perhaps spin up a TS client pinned to my local feature branch ver of the SDK. I tried using the node example in this repo and failed miserably on the npm install step and am looking for easier alternatives.

@hexbabe
Copy link
Member Author

hexbabe commented Aug 28, 2025

@stuqdog @micheal-parks @lia-viam Any ideas on how I can easily manually test this change? e.g. perhaps spin up a TS client pinned to my local feature branch ver of the SDK. I tried using the node example in this repo and failed miserably on the npm install step and am looking for easier alternatives.

ok I added a package.json bump for the dep that was making my npm i fail. I added


  const cameraName = 'realsense-1'; // Replace with your camera's name
  const camera = new VIAM.CameraClient(client, cameraName);

  // Now you can use the camera client
  // ignore my ai code
  const images = await camera.getImages(['color']);
  console.log('Got images!');
  console.log(images);

to main.ts

and saw

Got images!
{
  images: [
    {
      sourceName: 'color',
      image: [Uint8Array],
      mimeType: 'image/jpeg'
    }
  ],
  metadata: { capturedAt: S { seconds: 1756394253n, nanos: 328000000 } }
}

And when I got rid of the filter, it returned all images

Got images!
{
  images: [
    {
      sourceName: 'color',
      image: [Uint8Array],
      mimeType: 'image/jpeg'
    },
    {
      sourceName: 'depth',
      image: [Uint8Array],
      mimeType: 'image/vnd.viam.dep'
    }
  ],
  metadata: { capturedAt: S { seconds: 1756394364n, nanos: 375000000 } }
}

@hexbabe hexbabe requested a review from micheal-parks August 28, 2025 15:20
Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@hexbabe hexbabe merged commit d7b732e into viamrobotics:main Aug 29, 2025
3 checks passed
@hexbabe hexbabe deleted the RSDK-11706 branch August 29, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants