Detection

Warning

The AI Accelerator requires ROS 2 Humble, so PolyScope X 10.12.1 is the latest compatible release. PolyScope X 10.13 and later use ROS 2 Jazzy and are not currently supported.

This demo trains a 2D object detector, finds part bounding boxes in the camera view, and drives a simple pick-style motion from PolyScope X. For full 6DOF picking, use Pose Estimation instead.

What you need

  • SDK installed and running

  • Training data from Auto Annotation (preferred). Manual Annotation is deprecated.

  • Example program: ~/aia_sdk/polyscope/programs/aia_example_detect.urpx

Steps

Step 1 — Enter the SDK container

cd ~/aia_sdk/ros
./scripts/run_sdk_setup.sh

Step 2 — Create the dataset and train

  1. Follow Auto Annotation (R → annotate → PTrain model).

  2. Or, if a dataset already exists, launch detection and train from the Console UI:

./scripts/run_example_detection.sh

Then click Train model. Training can take several minutes depending on image count.

Step 3 — Load the model

  1. Click Load model in the Console UI.

  2. The UI loads the highest-numbered folder under ros/data/models/rtdetr_active (for example checkpoint-2350).

  3. If you need an older checkpoint, rename higher-numbered folders (for example prefix with ignore_).

Step 4 — Test detection

  1. Keep ./scripts/run_example_detection.sh running (or restart it).

  2. Load the model in the rtdetr_active column of the Console UI.

  3. On the robot, open the AI Accelerator Dashboard and select the detection2d view.

  4. Place a part in camera view and click Detect.

  5. A green bounding box should appear on recognized parts.

Step 5 — Run the PolyScope program

Warning

This program stores a specific robot position. Before executing it, check that the robot can freely move to detect_wp and that the motion poses no risks.

  1. Set program speed to 10%.

  2. Select detect_wpMove Here and confirm a clear path. Freedrive and re-save if needed.

  3. Adjust table height in the program script node labeled local pose ... (default: table 2.5 cm below robot base).

  4. Adjust part height in ./launch/run_example_detection.launch.py (env_manager_node; default 4.5 cm).

  5. Add an active TCP before setting waypoints so poses use the correct reference.

  6. Open aia_example_detect from ~/aia_sdk/polyscope/programs/.

  7. Place objects in view and run the program.

  8. The robot moves to detect_wp, captures an image, and uses ark_infer_detection() for a planar pose. It then moves ~150 mm above a recognized object (random choice if several are found).