This repository contains an active perception tool, called ActiPercept that enables the control of a camera in order to maximize screw detection confidence.
export WEBOTS_HOME=/usr/local/webotsMake sure this matches your local Webots installation path.
Start Webots and open:
worlds/world.wbt
From the repository root:
$WEBOTS_HOME/webots-controller/ ./demo_keyboard.pyThis launches the keyboard-based demo controller.
repo/
│
├── Controllers/
│ ├── demo_keyboard.py
│ ├── screw_detector_env.py
│ ├── utils_vision.py
│ └── pc_screw_detection.pt
│
├── protos/
│ └── (custom Webots PROTO files and textures)
│
├── worlds/
│ └── world.wbt
│
└── README.md
- YOLO runs on every camera frame (
screw,noscrew, optionallyholder). - Each detection is assigned to one of four corners:
- Top-Right (TR)
- Bottom-Right (BR)
- Top-Left (TL)
- Bottom-Left (BL)
- When a corner is selected (keys 1--4), the controller enters
refine mode:
- Prefer tracking
holderin that corner (short TTL cache). - Otherwise track
screw/noscrew. - Center the detection in the image.
- Move closer until confidence ≥ threshold.
- Return to home pose.
- Prefer tracking
- W / A / S / D → Move in X/Y plane\
- Q / E → Move down / up (Z)
- 1 → Top-Left\
- 2 → Top-Right\
- 3 → Bottom-Right\
- 4 → Bottom-Left
-
conf_threshold(default0.85)
Confidence required to finish refinement. -
center_epsilon_px(default12)
Pixel tolerance used for deciding if the object is centered. -
holder_cache_ttl(default5)
Number of steps to keep a cached holder if it temporarily disappears. -
move_step(default0.01)
Translation step per action. -
workspace_bounds
Safety bounds[minx,maxx,miny,maxy,minz,maxz]for the camera workspace.
The work presented here is supported by the RoboSAPIENS project funded by the European Commission’s Horizon Europe programme under grant agreement number 101133807. This publication reflects the authors’ views only. The European Commission is not responsible for any use that may be made of the information it contains.
Learn more about RoboSAPIENS.

