-
❗ PathSolver Fails in Minimal LOS Scenario Using XML + Python Hybrid SceneHello Sionna Team, I'm encountering a persistent issue where 🎯 ObjectiveI'm working on creating a digital twin of an indoor factory (20×20×5 m). The scene combines:
🐛 ProblemEven after:
…the call to 🧪 Minimal Reproducible ExampleThis example uses two files: scene.xml<scene version="3.0.0">
<integrator type="path"/>
<bsdf type="itu-radio-material" id="concrete_material">
<string name="type" value="concrete"/>
</bsdf>
<shape type="cube" id="walls">
<transform name="to_world">
<scale x="20" y="20" z="5"/>
<translate x="10" y="10" z="2.5"/>
</transform>
<boolean name="flip_normals" value="true"/>
<ref id="concrete_material"/>
</shape>
</scene>main.pyimport mitsuba as mi
import sionna.rt as rt
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
mi.set_variant("llvm_ad_mono_polarized")
# Load static walls
scene = rt.load_scene("scene.xml", merge_shapes=False)
# TX and RX setup
scene.tx_array = rt.PlanarArray(num_rows=4, num_cols=4, vertical_spacing=0.5, pattern="tr38901", polarization="V")
scene.rx_array = rt.PlanarArray(num_rows=1, num_cols=1, pattern="iso", polarization="V")
scene.add(rt.Transmitter("bs", position=[10, 10, 4.8], orientation=(0, -90, 0)))
scene.add(rt.Receiver("agv_0", position=[10, 10, 0.5]))
# Path computation
print("Attempting to compute paths in a simple LOS scenario...")
solver = rt.PathSolver()
solver.max_depth = 5
paths = solver(scene)
# CIR extraction
cir_h, cir_tau = paths.cir()
# Check result
if isinstance(cir_h, (list, tuple)):
print("\n--- FAILURE ---")
print("No paths were found.")
print("Opening scene preview for inspection...")
scene.preview()
else:
print("\n--- SUCCESS ---")
print(f"Successfully found {cir_h.shape[-1]} paths.")❌ Observed Behavior
✅ Expected BehaviorIn this setup, 🛠️ System Info
❓ QuestionIs there a known issue or hidden requirement when mixing:
…that might cause This appears to be a critical blocker for hybrid scene construction in digital twin setups. Any insights or guidance would be greatly appreciated. Thank you for your time and support. Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
|
Hi @natanzi , Your code has several issues that explain what you are observing. Here is a fixed version: import mitsuba as mi
import sionna.rt as rt
import os
# mi.set_variant("llvm_ad_mono_polarized") --> Not needed as Sionna RT sets the variant
# Load static walls
scene = rt.load_scene("scene_946.xml", merge_shapes=False)
# TX and RX setup
scene.tx_array = rt.PlanarArray(num_rows=4, num_cols=4, vertical_spacing=0.5, pattern="tr38901", polarization="V")
scene.rx_array = rt.PlanarArray(num_rows=1, num_cols=1, pattern="iso", polarization="V")
scene.add(rt.Transmitter("bs", position=[10, 10, 4.8], orientation=(0, -90, 0)))
scene.add(rt.Receiver("agv_0", position=[10, 10, 0.5]))
# Path computation
print("Attempting to compute paths in a simple LOS scenario...")
solver = rt.PathSolver()
# solver.max_depth = 5 --> Wrong use of the API.
# max_depth is a parameter of the PathSolver call method
paths = solver(scene, max_depth=5)
# CIR extraction
cir_h, cir_tau = paths.cir()
# if isinstance(cir_h, (list, tuple)): --> Wrong use of the API
# cir_h returns by default a 2-tuple containing the real and imaginary parts
# of the channel coefficients
h_real, h_imag = cir_h
if h_real.shape[-2] == 0: # The second to last dimension is the number of paths
print("\n--- FAILURE ---")
print("No paths were found.")
print("Opening scene preview for inspection...")
scene.preview()
else:
print("\n--- SUCCESS ---")
print(f"Successfully found {h_real.shape[-2]} paths.") # Fixed: cir_h.shape[-1] --> h_real.shape[-2]Output: Please check out the API documentation and tutorials. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @faycalaa, Thanks for your previous guidance. I'm facing a new issue as we're encountering a persistent problem with This is my unit_cube.obj: 🧩 Problem DescriptionThe I have carefully followed the Sionna RT API documentation and reviewed previous GitHub issues to avoid common pitfalls. Specifically, our implementation already includes:
Despite these measures, the solver finds no paths and Drjit error, and we are currently blocked in our development. ❓ Questions
📎 Reproducible CodeBelow is the code that reliably reproduces the issue. # -*- coding: utf-8 -*-
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import sionna.rt as rt
import drjit as dr
dr.set_flag(dr.JitFlag.Debug, True)
import numpy as np
# Set seeds for reproducibility
np.random.seed(42)
# Create a minimal scene
scene = rt.Scene()
scene.frequency = 28e9 # 28 GHz
scene.tx_array = rt.PlanarArray(num_rows=1, num_cols=1, pattern="iso", polarization="V")
scene.rx_array = rt.PlanarArray(num_rows=1, num_cols=1, pattern="iso", polarization="V")
# Add transmitter
bs = rt.Transmitter(name="bs", position=[10, 10, 4.8])
scene.add(bs)
# Add receiver
rx = rt.Receiver(name="agv_0", position=[2, 3, 0.5])
scene.add(rx)
# Update scene geometry
scene.scene_geometry_updated()
print("Scene initialized with 1 TX at [10, 10, 4.8] and 1 RX at [2, 3, 0.5]. No obstacles.")
# Test PathSolver with default settings
print("\nTesting PathSolver with default settings...")
solver = rt.PathSolver()
try:
paths = solver(scene)
h_real, h_imag = paths.cir()
if isinstance(h_real, list):
print("LOS paths: 0 (empty list returned)")
else:
print(f"LOS paths: {h_real.shape[-2]}")
except Exception as e:
print(f"Error with default settings: {e}")
# Test PathSolver with documented parameters
print("\nTesting PathSolver with documented parameters...")
try:
paths = solver(scene, max_depth=0, max_num_paths_per_src=1000000, samples_per_src=1000000, seed=42)
h_real, h_imag = paths.cir()
if isinstance(h_real, list):
print("LOS paths: 0 (empty list returned)")
else:
print(f"LOS paths: {h_real.shape[-2]}")
except Exception as e:
print(f"Error with documented parameters: {e}")🪵 Execution Output & Error Log🖥️ System Information
Thank you for your time and assistance. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @natanzi, You cannot expect us to go through large code examples and find bugs in your code which are most likely due to hallucinating LLMs (as for example seen by the wrong use of the Sionna API above). For future issues, please provide a minimal (!) reproducer code snippet that identifies clearly a bug or unexpected behavior. Also refrain from using LLMs for the issue generation as they are generally far too verbose. Hope for your understanding. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @jhoydis, Just to clarify: I didn’t expect anyone to "go through large code examples and find bugs" in my code. I included the full snippet because the issue seemed complex and context-dependent, and I wanted to avoid omitting details that might later be considered critical. I do take your point about minimal reproducible snippets noted and already adjusted. Technical feedback is always appreciated. But so is tone. Best regards, |
Beta Was this translation helpful? Give feedback.

Hi @natanzi ,
Your code has several issues that explain what you are observing.
Here is a fixed version: