Use one camera workflow across devices and robots

Inspect USB, network, and ROS 2 camera sources before connecting them to inference.

Exercise brief·Intermediate·3 min read
Requirements and learning goals

Before you start

  • A Wendy target with a supported camera source
  • A deployed app for the optional OpenCV exercise

You will be able to

  • Identify the camera transport and actual available format
  • Separate frame delivery problems from inference problems

The project brief below assumes the listed prerequisites and gives you a task and checks to perform. Need a guided first project?

A camera stream is a sequence of images delivered to your app. The camera may plug into the device, send video over a network, or publish images through . Wendy gives supported sources a common inventory and preview workflow, so you can check the input before blaming the AI model.

Prove the camera works before debugging . Wendy inventories supported USB, CSI, paired IP, and ROS 2 camera sources. The common interface does not make their timing, codecs, or calibration identical.

Reuse the inspected frames in the detector exercise, keeping frame identity and capture time beside every prediction.

Inspect and preview

wendy device camera list
wendy device camera view --id CAMERA_ID

Use an inventory ID. Move a target and check for changing frames, delay, and exposure problems. Pair authorized IP cameras through wendy device pair when credentials are needed.

Read a frame inside an app

Add camera access and redeploy:

wendy project entitlements add camera
wendy run

In an app with OpenCV installed:

import cv2
camera = cv2.VideoCapture("/dev/video0")
try:
    ok, frame = camera.read()
    if not ok:
        raise RuntimeError("No frame received")
    print(frame.shape)
finally:
    camera.release()

Select the actual exposed video path; /dev/video0 is only an example.

Checkpoint 1 of 2

wendy device camera view shows live, changing frames. Your app, reading /dev/video0, raises No frame received. Where do you look first?

Commit to an answer. Every choice explains itself.

Know the transport boundary

Supported ROS 2 streams can be mirrored through v4l2loopback on compatible Linux targets. discovery and module compatibility still matter. A simulator topic does not prove that physical exposes the same camera.

Lite viewing uses advertised channels. Format options select supported modes; they do not resize arbitrary streams.

If preview fails, inspect source and transport. If preview works but the app fails, check its and selected path. If frames work but predictions fail, inspect preprocessing and exposure.

Checkpoint 2 of 2

Your app works with a camera topic published by a simulator. You move to the physical robot. What still has to be shown?

Commit to an answer. Every choice explains itself.

Optional extension: compare one recorded frame and one live frame through the same preprocessing function.

Source: Camera transports and requirements.

Can you do each of these?

  • Identify the camera transport and actual available format
  • Separate frame delivery problems from inference problems

0 of 2 checkpoints solved. Try checkpoint 1

Previous: Pair a SensorLink source
All lessons in this topic
  1. 1. Connect nearby devices with Wendy Net
  2. 2. Publish and discover an application service
  3. 3. Pair a SensorLink source
  4. 4. Use one camera workflow across devices and robots

Ask Wendy

Answers about Wendy and WendyOS

What would you like to know?

Ask about devices, development, and deployment.

Check linked docs for technical details.