Skip to content

Commit 4d5165d

Browse files
fix: no more deadlock
the problem was that np defautls to flaot64 and I use float32 everywhere else so when concatenating it with the other vectors, the whole thing becomes np.float64. This would create a 4 bytes offset for each element of the vector at each reset. This would destroy the order of elements and fill the pipe up until it reaches the max size.
1 parent 62e2fec commit 4d5165d

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/simulation/src/webots/controllers/controller_vehicle_driver/controller_vehicle_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def observe(self) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
9898

9999
if c.camera_horizontal_resolution == 0:
100100
# empty array
101-
camera_data = np.zeros([0])
101+
camera_data = np.zeros([0], dtype=np.float32)
102102
else:
103103
camera_data = np.array(self.camera.getImageArray(), dtype=np.float32)
104104
# shape = (camera_horizontal_resolution, 1, 3)

uv.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)