Closed alialsahlany closed 2 months ago
Hello @alialsahlany,
.ply
files representing the meshes? If you only copy over the XML file to Colab, the meshes will be missing.Hello @merlinND Thank you for your help. I have organized and uploaded the files as shown in the image. However, I still cannot display the scene. Although the scene works fine locally.
Hello @alialsahlany,
I still cannot display the scene
After organizing and uploading the files as shown in the image, do you still encounter the same error as before? Without knowing precisely what error message or what is being displayed, it is difficult to help.
If you encounter new symptoms, please have a look at this existing discussion about the Preview renderer on Colab: https://github.com/NVlabs/sionna/discussions/452
I have looked at #452 discussion about the Preview renderer on Colab but did not get a new result. I still cannot preview the scene. This is the scene [mecca.rar] used; can you check it?
Hello @alialsahlany,
As I said before, without knowing precisely what error message or what is being displayed, it is difficult to help. Please give a full description of what you are trying, what you are seeing, what is printed to the dev console, etc.
################################################### !pip install --upgrade tensorflow #################################################### !pip install --upgrade mitsuba ####################################################### !pip install --upgrade drjit ######################################################### !pip install --upgrade sionna ###############################################################################
import os from importlib_resources import files import numpy as np import matplotlib import matplotlib.pyplot as plt import time import drjit as dr import mitsuba as mi mi.set_variant('scalar_rgb') os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0' print("Current working directory:", os.getcwd()) import tensorflow as tf import sionna ##########################################################
from sionna.rt import load_scene, RadioMaterial, Transmitter, Receiver, PlanarArray, Camera from sionna.channel import cir_to_ofdm_channel, subcarrier_frequencies, OFDMChannel, ApplyOFDMChannel, CIRDataset from sionna.nr import PUSCHConfig, PUSCHTransmitter, PUSCHReceiver from sionna.utils import compute_ber, ebnodb2no, PlotBER from sionna.ofdm import KBestDetector, LinearDetector from sionna.mimo import StreamManagement ############################################################################### file_path = "/content/mecca.xml" if os.path.exists(file_path): print("File exists.") else: print(f"File not found: {file_path}") ################################################################################ scene = sionna.rt.load_scene('/content/mecca.xml') scene.preview() ###############################################
scene = sionna.rt.load_scene('/content/mecca.xml')
scene.add(Camera("cam-0", position=[50,0,130], look_at=[10,0,0]))
if colab_compat:
scene.render(camera="cam-0", num_samples=256);
center = np.array([0.0, 0.0, 10.206510543823242]) # Replace with the actual center coordinates
scene.preview(look_at=center)
#scene.preview()
Thanks for posting this workaround @alialsahlany. In principle the instructions in https://github.com/NVlabs/sionna/discussions/452#discussioncomment-9616921 should also fix the issue, but your version is certainly simpler.
I've created a 3D scene using Blender and exported it as an XML file. I want to load this scene and run a simulation or preview a Google Colab environment.
However, I encountered the following error: