|
|
import gradio as gr |
|
|
from pathlib import Path |
|
|
|
|
|
TITLE = "JuggleRL: Mastering Ball Juggling with a Quadrotor via Deep Reinforcement Learning" |
|
|
PAPER_URL = "https://arxiv.org/abs/2509.24892" |
|
|
GITHUBS = [ |
|
|
("Training", "https://github.com/thu-uav/JuggleRL_train"), |
|
|
("ROS Pack", "https://github.com/thu-uav/JuggleRL_rospack"), |
|
|
("NatNet SDK", "https://github.com/thu-uav/JuggleRL_NatNetSDK"), |
|
|
] |
|
|
|
|
|
ASSETS = Path("assets") |
|
|
videos = [p for p in (ASSETS).glob("*.mp4")] + [p for p in (ASSETS).glob("*.mov")] |
|
|
images = [p for p in (ASSETS).glob("*.png")] + [p for p in (ASSETS).glob("*.jpg")] |
|
|
|
|
|
def homepage(): |
|
|
md = f""" |
|
|
# {TITLE} |
|
|
|
|
|
**Paper**: [{PAPER_URL}]({PAPER_URL}) |
|
|
**Code**: {", ".join([f"[{name}]({url})" for name, url in GITHUBS])} |
|
|
|
|
|
**Highlights** |
|
|
- Zero-shot sim-to-real deployment |
|
|
- Calibrated dynamics + domain randomization |
|
|
- Lightweight Communication Protocol (LCP) |
|
|
- Real-world juggling up to 462 hits |
|
|
|
|
|
--- |
|
|
""" |
|
|
return md |
|
|
|
|
|
with gr.Blocks(title="JuggleRL") as demo: |
|
|
gr.Markdown(homepage()) |
|
|
|
|
|
with gr.Tab("System Diagram"): |
|
|
if images: |
|
|
gr.Gallery(images, label="Figures", columns=3, height=400, preview=True) |
|
|
else: |
|
|
gr.Markdown("> Upload system figures to `assets/` as PNG/JPG.") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with gr.Tab("Real-world Videos"): |
|
|
gr.Markdown("### Full Demo on Bilibili") |
|
|
gr.HTML(''' |
|
|
<div style="position:relative;padding-top:56.25%;"> |
|
|
<iframe src="https://player.bilibili.com/player.html?bvid=BV1hKxDzrEw5&autoplay=0" |
|
|
scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" |
|
|
style="position:absolute;top:0;left:0;width:100%;height:100%;"> |
|
|
</iframe> |
|
|
</div> |
|
|
''') |
|
|
|
|
|
|
|
|
with gr.Tab("Links"): |
|
|
gr.Markdown( |
|
|
"\n".join([ |
|
|
f"- **Paper**: [{PAPER_URL}]({PAPER_URL})", |
|
|
*[f"- **{name}**: {url}" for name, url in GITHUBS], |
|
|
]) |
|
|
) |
|
|
|
|
|
demo.launch() |
|
|
|