Detect objects ============== Grab a camera frame, ask the platform's cloud model where the named objects are via ``client.platform.ai``, then turn each box into a 3D point with the aligned depth image when the robot has one; RGB-only robots get 2D boxes. Edit ``TARGET`` to name what to find, for example "fire extinguishers" or "open cabinet doors". :doc:`ai` covers cost and how this differs from on-robot models. Boxes come from a general-purpose model, not a trained detector: they are approximate, labels are free text, and ``score`` is always 1.0. The 3D point is the median depth over the box, so it lands on the object's visible surface rather than its centre. Expect it to be pulled towards the background for see-through objects (chair frames), objects partly out of frame, or objects behind something nearer; narrow the region or use a mask for those. .. tab-set:: :sync-group: sdk-language .. tab-item:: Python :sync: python .. literalinclude:: scripts/ai-detect-objects.py :language: python .. tab-item:: TypeScript :sync: typescript .. literalinclude:: scripts/ai-detect-objects.ts :language: typescript