Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -189,10 +189,15 @@ with gr.Blocks() as demo:
|
|
| 189 |
auto = gr.Button("🤖 Toggle Auto")
|
| 190 |
|
| 191 |
# Corrected button input passing
|
| 192 |
-
w.click(fn=
|
| 193 |
-
a.click(fn=
|
| 194 |
-
s.click(fn=
|
| 195 |
-
d.click(fn=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
|
| 197 |
reset.click(fn=reset_sim, inputs=[obstacle_slider], outputs=[env_plot, slam_plot, status_text])
|
| 198 |
toggle.click(fn=lambda: (None, None, toggle_noise()), outputs=[env_plot, slam_plot, status_text])
|
|
|
|
| 189 |
auto = gr.Button("🤖 Toggle Auto")
|
| 190 |
|
| 191 |
# Corrected button input passing
|
| 192 |
+
w.click(fn=lambda: move_robot("W"), outputs=[env_plot, slam_plot, status_text])
|
| 193 |
+
a.click(fn=lambda: move_robot("A"), outputs=[env_plot, slam_plot, status_text])
|
| 194 |
+
s.click(fn=lambda: move_robot("S"), outputs=[env_plot, slam_plot, status_text])
|
| 195 |
+
d.click(fn=lambda: move_robot("D"), outputs=[env_plot, slam_plot, status_text])
|
| 196 |
+
|
| 197 |
+
#w.click(fn=move_robot, inputs=gr.Text(value="W"), outputs=[env_plot, slam_plot, status_text])
|
| 198 |
+
#a.click(fn=move_robot, inputs=gr.Text(value="A"), outputs=[env_plot, slam_plot, status_text])
|
| 199 |
+
#s.click(fn=move_robot, inputs=gr.Text(value="S"), outputs=[env_plot, slam_plot, status_text])
|
| 200 |
+
#d.click(fn=move_robot, inputs=gr.Text(value="D"), outputs=[env_plot, slam_plot, status_text])
|
| 201 |
|
| 202 |
reset.click(fn=reset_sim, inputs=[obstacle_slider], outputs=[env_plot, slam_plot, status_text])
|
| 203 |
toggle.click(fn=lambda: (None, None, toggle_noise()), outputs=[env_plot, slam_plot, status_text])
|