From 50791f405d39854d3121fff57a656b5bcc1f8c14 Mon Sep 17 00:00:00 2001 From: Vishwa GW <136871744+vishwagw@users.noreply.github.com> Date: Thu, 15 Oct 2026 13:58:26 +0530 Subject: [PATCH 1/6] examples: fix camera example for camera_angle_degrees --- examples/core/04_camera.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/core/04_camera.py b/examples/core/04_camera.py index 60740a97..56d79093 100644 --- a/examples/core/04_camera.py +++ b/examples/core/04_camera.py @@ -17,7 +17,7 @@ drone_type="quadx", drone_options=dict( use_camera=True, - camera_angle=30, + camera_angle_degrees=30, camera_FOV_degrees=110, camera_fps=30, # by default, camera_fps=control_hz, @@ -29,7 +29,7 @@ # set to velocity control env.set_mode(6) -# simulate for 1000 steps (1000/120 ~= 8 seconds) +# simulate for 100 steps (100/120 ~= 1 second) for i in range(100): env.step() @@ -38,9 +38,12 @@ DEPTH_img = env.drones[0].depthImg SEG_img = env.drones[0].segImg -plt.imshow(RGBA_img) -# plt.show() -plt.imshow(DEPTH_img) -# plt.show() -plt.imshow(SEG_img) +# show the three images side by side +fig, axes = plt.subplots(1, 3) +for ax, img, title in zip( + axes, [RGBA_img, DEPTH_img, SEG_img], ["RGBA", "Depth", "Segmentation"] +): + ax.imshow(img) + ax.set_title(title) + ax.axis("off") plt.show() From 57a355b98b43c9c0efde5add558d22188ec9455c Mon Sep 17 00:00:00 2001 From: Vishwa GW <136871744+vishwagw@users.noreply.github.com> Date: Thu, 15 Oct 2026 14:00:11 +0530 Subject: [PATCH 2/6] docs: document np_random as an np.random.Generator on the drone page --- docs_source/documentation/core/abstractions/base_drone.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_source/documentation/core/abstractions/base_drone.md b/docs_source/documentation/core/abstractions/base_drone.md index 804773cd..23904990 100644 --- a/docs_source/documentation/core/abstractions/base_drone.md +++ b/docs_source/documentation/core/abstractions/base_drone.md @@ -13,7 +13,7 @@ ```{eval-rst} .. property:: PyFlyt.core.abstractions.DroneClass.np_random - **dtype** - `np.random.RandomState` + **dtype** - `np.random.Generator` .. property:: PyFlyt.core.abstractions.DroneClass.physics_period From 803ea9a4b9054f74435a3acc75392db2facce539 Mon Sep 17 00:00:00 2001 From: Vishwa GW <136871744+vishwagw@users.noreply.github.com> Date: Thu, 15 Oct 2026 14:01:06 +0530 Subject: [PATCH 3/6] Add files via upload --- examples/core/10_custom_wind.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/core/10_custom_wind.py b/examples/core/10_custom_wind.py index ce2997b9..ec6b1ba4 100644 --- a/examples/core/10_custom_wind.py +++ b/examples/core/10_custom_wind.py @@ -31,7 +31,7 @@ def __call__(self, time: float, position: np.ndarray): """ wind = np.zeros_like(position) wind[:, -1] = np.exp(position[:, -1]) * self.strength - wind += self.np_random.randn(*wind.shape) + wind += self.np_random.standard_normal(wind.shape) return wind From 0da611c18b60040fb7411665c9d7f0287fa934fc Mon Sep 17 00:00:00 2001 From: Vishwa GW <136871744+vishwagw@users.noreply.github.com> Date: Thu, 15 Oct 2026 14:01:49 +0530 Subject: [PATCH 4/6] examples: fix custom wind example for np.random.Generator From 9e8113b5956fb8bd28e94f76138b05fc5a5e5397 Mon Sep 17 00:00:00 2001 From: Vishwa GW <136871744+vishwagw@users.noreply.github.com> Date: Thu, 15 Oct 2026 14:03:06 +0530 Subject: [PATCH 5/6] docs: document np_random as an np.random.Generator --- docs_source/documentation/core/wind.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_source/documentation/core/wind.md b/docs_source/documentation/core/wind.md index bda3e19b..ea83037b 100644 --- a/docs_source/documentation/core/wind.md +++ b/docs_source/documentation/core/wind.md @@ -39,7 +39,7 @@ To define custom wind models, refer the the example provided by the `WindFieldCl ```{eval-rst} .. property:: PyFlyt.core.abstractions.WindFieldClass.np_random - **dtype** - `np.random.RandomState` + **dtype** - `np.random.Generator` ``` ### Required Methods From f6886a979a63836b0080518717363693d2ad4790 Mon Sep 17 00:00:00 2001 From: Vishwa GW <136871744+vishwagw@users.noreply.github.com> Date: Thu, 15 Oct 2026 14:03:55 +0530 Subject: [PATCH 6/6] core: use standard_normal in the WindFieldClass docstring example --- PyFlyt/core/abstractions/base_wind_field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyFlyt/core/abstractions/base_wind_field.py b/PyFlyt/core/abstractions/base_wind_field.py index 1ccefd72..388a161b 100644 --- a/PyFlyt/core/abstractions/base_wind_field.py +++ b/PyFlyt/core/abstractions/base_wind_field.py @@ -28,7 +28,7 @@ class WindFieldClass(ABC): >>> wind[:, -1] = np.log(position[:, -1]) * self.strength >>> >>> # plus some noise, - >>> wind += self.np_random.randn(*wind.shape) + >>> wind += self.np_random.standard_normal(wind.shape) >>> >>> return wind >>>