-
Notifications
You must be signed in to change notification settings - Fork 358
Closed
Description
I tried to modify the position of the vehicle in the scene and set the receiver and transmitter to face the vehicle, but after looping through 60 different positions, I got the following error:
正在仿真: 2%|▏ | 1/60 [00:00<00:39, 1.50it/s]
进程已结束,退出代码为 -1073740791 (0xC0000409)
my code:
car_metal=scene.get("car-itu_metal")
car_glass=scene.get("car-itu_glass")
print("car_glass_position:",car_glass.position.numpy())
print("car_metal_position:",car_metal.position.numpy())
tx_position=[46.25,1.7,10.28]
rx_position=tx_position
scene.add(Transmitter("tx", position=tx_position, look_at=car_glass.position.numpy() , power_dbm=30, color=[0.8, 0.1, 0.1]))
scene.tx_array = PlanarArray(1, 1, 0.5, 0.5, "iso", "V")
#------------------------------------------------------
scene.add(Receiver("rx", position=rx_position,look_at=car_glass.position.numpy()))
scene.rx_array =PlanarArray(1, 1, 0.5, 0.5, "iso", "V")
scene.synthetic_array = True
Gr_gain=compute_gain(iso_pattern)
print("gain:",Gr_gain)
clear_directory(r'.\Figure')
#----------------------------------------------
scene.add(Camera("cam", position=[1,1,1], look_at=tx_position))
displaycement_vec=[0.5,0,0]
#===============
print(f" start:Time= {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
start_time = time.time()
for snapid in tqdm(range(60), desc="prograssing"):
paths = scene.compute_paths(
max_depth=3,
num_samples=1e5,
los=True,
reflection=True,
diffraction=True,
scattering=True
)
scene.get("car-itu_metal").position +=displaycement_vec
scene.get("car-itu_glass").position +=displaycement_vec
paths.normalize_delays = False
H_rt = np.squeeze(cir_to_ofdm_channel(frequencies, *paths.cir(), normalize=False))
h_rt = np.squeeze(cir_to_time_channel(bandwidth, *paths.cir(), 0, 1023, normalize=False))
H_rt_list.append(H_rt)
h_rt_list.append(h_rt)
rt_paths['a'][snapid] = tf.squeeze(paths.a).numpy()
rt_paths['tau'][snapid] = tf.squeeze(paths.tau).numpy() * 1e9 # ns
rt_paths['theta_t'][snapid] = tf.squeeze(paths.theta_t).numpy()
rt_paths['phi_t'][snapid] = tf.squeeze(paths.phi_t).numpy()
rt_paths['theta_r'][snapid] = tf.squeeze(paths.theta_r).numpy()
rt_paths['phi_r'][snapid] = tf.squeeze(paths.phi_r).numpy()
rt_paths['source_coordinates'][snapid] = tf.squeeze(paths.sources).numpy()
rt_paths['target_coordinates'][snapid] = tf.squeeze(paths.targets).numpy()
rt_paths['Transmitter_coordinates'][snapid] = list(scene.transmitters.values())[0].position.numpy()
rt_paths['Receiver_coordinates'][snapid] = list(scene.receivers.values())[0].position.numpy()
rt_paths['mask'][snapid] = tf.squeeze(paths.mask).numpy()
rt_paths['objects'][snapid] = tf.squeeze(paths.objects).numpy()
rt_paths['types'][snapid] = tf.squeeze(paths.types).numpy()
rt_paths['vertices'][snapid] = tf.squeeze(paths.vertices).numpy()
end_time = time.time()
print(f" end:Time= {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
print(f"cost: {end_time - start_time} seconds")Metadata
Metadata
Assignees
Labels
No labels