Grounding Object-to-Object Hazard Reasoning into 3D Risk Fields for Task-Conditioned Safety

Mariana Sosa Guzmán1,* Yide Song2 Amin Abyaneh2 Gregory Dudek1 Hsiu-Chin Lin1,2

1Department of Computer Science  ·  2Department of Electrical and Computer Engineering

McGill University

* Corresponding author

Overview

Safety is not only geometric — it depends on the task.

Carrying coffee over a laptop is risky, but the hazard disappears if the robot routes the cup around it. Placing a metal cup in a microwave is dangerous no matter how the robot moves. We present a framework built around a vision-language model (VLM) that infers these task- and scene-dependent safety constraints from an RGB-D observation and a natural-language instruction, and turns them into continuous 3D risk fields that a reactive controller can enforce.

Full abstract

Safety in robotics does not solely depend on geometric constraints, but also on semantics: the given task, environment properties, and interactions between objects in the scene. We present a framework based on vision-language models (VLMs) to infer task- and scene-dependent safety constraints for robot manipulation. We provide the VLM a structured safety tool based on an RGB-D observation and a natural-language task instruction that first decides whether the task should be rejected since its execution may result in a non-recoverable hazardous outcome. Otherwise, it identifies preventable object-pair hazards and specifies the spatial relations that must be avoided. Open-vocabulary segmentation and depth information are then used to ground the detected objects in 3D and construct continuous risk fields that represent the corresponding hazardous regions. These fields are integrated with an obstacle avoidance module that corrects nominal robot motions during execution while accounting for the risk field. We evaluate the framework on preventable hazards, tasks requiring rejection, and safe variants in simulation and the real world.

Reject or proceed

A structured VLM toolset first decides whether a task leads to a non-recoverable hazard and should be refused.

Ground in 3D

Object-pair hazards become non-convex risk fields via SAM-3 segmentation and depth, with no shape primitives.

Correct the motion

Obstacle modulation keeps the manipulated object's bounding box outside the risk field during execution.

Method

From hazard reasoning to safe trajectories

Given a task instruction and a scene image, the framework either rejects the task or identifies object-pair hazards that are grounded into a 3D risk field, which then guides safe execution.

Framework overview: user input, hazard detection with a VLM, risk field construction with SAM3 and depth, and risk field enforcement through trajectory correction.
Framework overview. Top: a task such as placing a metal cup in a microwave is rejected. Bottom: for “move the cup of coffee next to the laptop”, the VLM outputs an avoid_above hazard, which is grounded into a risk field over the laptop and enforced during execution.
1

Hazard detection

The VLM calls schema-based safety functions instead of answering in free text: one function for task rejection, and a set of functions for preventable object-pair hazards with a spatial relation to avoid.

2

Risk field construction

SAM-3 masks and registered depth are back-projected into a point cloud, extruded according to the relation (e.g. a pillar for avoid_above), voxelized and Gaussian-smoothed into a continuous field.

3

Risk field enforcement

The field is converted into a distance function Γ and fed to obstacle modulation, evaluated on the corners and face centers of the held object's bounding box.

Hazards as structured tool calls

Each hazard is a tuple (a, b, c, r): the manipulated object, the anchor hazard object, a description, and a spatial relation from avoid_above avoid_below avoid_inside avoid_between avoid_collision.

"obj_a": "cup",
"obj_b": "laptop",
"hazard": "spill_hazard",
"relation": "avoid_above"
3D risk field generated above the laptop
Smoothed hazard density ρ (left) and the resulting Γ (right) for the risk field generated on the laptop from segmentation and depth.
Bounding box of a mug with corner points, face centers and center evaluated against a risk field
Γ is evaluated at the corners, face centers and center of the mug's bounding box to detect whether any part of the object enters the risk field.

From density to a modulation-ready field

Obstacle modulation needs Γ > 1 outside, Γ = 1 on the surface and Γ < 1 inside the hazard. We set a reference surface density from the median density of the hazard points and define

Γ(x) = 1 + ln(ρref / ρ(x)) / κ

so the boundary condition holds wherever ρ(x) = ρref, and κ controls the field's range of influence. Because the held object has volume, we take the minimum Γ over its bounding-box points as its proximity to the hazard.

Evaluation

Three kinds of scenarios

Tabletop tasks with a Franka Emika Panda, viewed by a single frontal RGB-D camera. The scenarios test whether a method avoids hazards, refuses tasks that cannot be made safe, and stays out of the way when there is nothing to avoid.

A hazard occurs unless the robot takes corrective action while performing the task.

Laptop-Cup scene
Laptop-Cup

“Move the coffee cup next to the laptop.”

Drawer-Plant scene
Drawer-Plant

“Open the top drawer of the cabinet.”

Steak-Dripping scene
Steak-Dripping

“Transfer the raw steak to the cutting board for preparation.”

Results

Safer execution without over-protection

Simulation results in CoppeliaSim averaged over preventable-hazard and safe-variant scenes (10 randomizations per scene, 3 runs each). GPT-4o is the VLM backbone.

81.4%
Safe success rate
vs. 51.7% for the best baseline
4.4%
Trajectory in a hazard region
vs. 6.5–15.2% for baselines
0
False rejections
on preventable-hazard and safe-variant scenes
MethodSuccess rate ↑Safe success rate ↑Violation ↓
No context70.645.6
6.5
Text only60.134.5
7.3
Simple OA90.051.7
15.2
VLM (ours)89.481.4
4.4

Averages (%) over all six recoverable scenes. Without hazard reasoning, baselines that complete the task usually do so by passing through the hazard region; text-only and no-context reasoning also become over-protective on safe scenes.

Real World

Consistent from simulation to the real robot

With a RealSense D435i in a front view, our method identified the correct hazards in every real-world scene, had no violations, and achieved the highest safe success rate among the methods compared.

Real-world Laptop-Cup scene
Laptop-Cup
Real-world Steak-Dripping scene
Steak-Dripping
Real-world Fork-Toaster scene
Fork-Toaster
Comparison of simple obstacle modulation and VLM trajectories for the steak task
Steak-Dripping, real robot. Simple obstacle modulation (top) carries the raw steak over the bread; our method (bottom) builds avoid_above risk fields over the bread and cheese and routes around them.

Citation

BibTeX