Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,12 @@ def plot_trajectory(trajectory):
|
|
77 |
x_obs = obstacle_position[0] + obstacle_radius * np.cos(u) * np.sin(v)
|
78 |
y_obs = obstacle_position[1] + obstacle_radius * np.sin(u) * np.sin(v)
|
79 |
z_obs = obstacle_position[2] + obstacle_radius * np.cos(v)
|
80 |
-
ax.plot_wireframe(x_obs, y_obs, z_obs, color='orange', alpha=0.5
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
ax.set_xlabel("X")
|
83 |
ax.set_ylabel("Y")
|
|
|
77 |
x_obs = obstacle_position[0] + obstacle_radius * np.cos(u) * np.sin(v)
|
78 |
y_obs = obstacle_position[1] + obstacle_radius * np.sin(u) * np.sin(v)
|
79 |
z_obs = obstacle_position[2] + obstacle_radius * np.cos(v)
|
80 |
+
ax.plot_wireframe(x_obs, y_obs, z_obs, color='orange', alpha=0.5)
|
81 |
+
|
82 |
+
# Add label only once for legend clarity
|
83 |
+
if obstacle is obstacles[0]:
|
84 |
+
ax.plot([], [], [], color='orange', alpha=0.5, label="Obstacle")
|
85 |
+
|
86 |
|
87 |
ax.set_xlabel("X")
|
88 |
ax.set_ylabel("Y")
|