pyrobosim.core.robot.Robot.detect_objects

Robot.detect_objects(target_object: str | None = None) ExecutionResult

Detects all objects at the robot’s current location.

If the robot has any field-of-view (FOV) sensors, objects are instead detected inside those sensors’ fields of view, regardless of the robot’s location.

Parameters:

target_object – The name of a target object or category. If None, the action succeeds regardless of which object is found. Otherwise, the action succeeds only if the target object is found.

Returns:

An object describing the execution result.