Skip to content

Commit 06308c5

Browse files
committed
rebuild metasim and roboverse seperate page on wiki
1 parent 0d93d29 commit 06308c5

7 files changed

Lines changed: 175 additions & 87 deletions

File tree

docs/source/_static/tea.jpg

294 KB
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{# Override pydata_sphinx_theme's navbar-nav: render ONLY ``external_links``,
2+
not the top-level toctree entries. We use the left sidebar (configured via
3+
html_sidebars = {"**": ["globaltoc.html"]}) for in-site navigation, so the
4+
top bar is reserved for the two cross-subsite links (MetaSim ↔ RoboVerse). #}
5+
<nav>
6+
<ul class="bd-navbar-elements navbar-nav">
7+
{%- for external_link in theme_external_links %}
8+
<li class="nav-item">
9+
<a class="nav-link nav-external" href="{{ external_link.url }}">
10+
{{ external_link.name }}
11+
</a>
12+
</li>
13+
{%- endfor %}
14+
</ul>
15+
</nav>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{# Renders the full captioned toctree in the left sidebar on EVERY page,
2+
including the homepage. Equivalent to pydata's built-in
3+
``sidebar-nav-bs.html`` but with ``startdepth=0`` so the root page also
4+
gets a populated sidebar (pydata's default suppresses the toctree on
5+
the root page because ``_get_ancestor_pagename`` returns None there).
6+
7+
We deliberately use a different filename so that layout.html's
8+
``sidebars | reject('in', 'sidebar-nav-bs.html')`` rule does not strip
9+
this template out on pages it considers ancestor-less. #}
10+
<nav class="bd-docs-nav bd-links"
11+
aria-label="{{ _('Section Navigation') }}">
12+
<p class="bd-links__title" role="heading" aria-level="1">{{ _("Section Navigation") }}</p>
13+
<div class="bd-toc-item navbar-nav">
14+
{{- generate_toctree_html(
15+
"sidebar",
16+
startdepth=0,
17+
show_nav_level=theme_show_nav_level | int,
18+
maxdepth=theme_navigation_depth | int,
19+
collapse=theme_collapse_navigation | tobool,
20+
includehidden=True,
21+
titles_only=True
22+
)
23+
-}}
24+
</div>
25+
</nav>

docs/source/conf.py

Lines changed: 17 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import re
32
import subprocess
43
import sys
54

@@ -76,7 +75,15 @@
7675
"logo": {
7776
"image_dark": "_static/RoboVerse86.22.svg",
7877
},
78+
# Top navbar shows only the two cross-subsite links (MetaSim ↔ RoboVerse)
79+
# via ``external_links`` (rendered through our overridden navbar-nav
80+
# template). All in-site navigation lives in the left sidebar.
7981
"navbar_center": ["version-switcher", "navbar-nav"],
82+
"external_links": [
83+
{"name": "MetaSim", "url": "/metasim/"},
84+
{"name": "RoboVerse", "url": "/roboverse/"},
85+
{"name": "FAQ", "url": "/FAQ/"},
86+
],
8087
"show_version_warning_banner": False,
8188
"switcher": {
8289
"json_url": json_url,
@@ -100,6 +107,15 @@
100107
html_show_sphinx = False
101108
html_static_path = ["_static"]
102109

110+
# Homepage shows only the body content (hero-style intro, no left rail);
111+
# every other page renders our custom sidebar-section-nav template, which
112+
# shows the captioned global toctree with ``startdepth=0 + includehidden=True``
113+
# so even root-of-section pages get a populated sidebar.
114+
html_sidebars = {
115+
"index": [],
116+
"**": ["sidebar-section-nav.html"],
117+
}
118+
103119
### Autodoc configurations ###
104120
autoclass_content = "class"
105121
autodoc_typehints = "signature"
@@ -229,85 +245,6 @@ def generate_task_markdown(app):
229245
)
230246

231247

232-
_NAVBAR_LABELS = {
233-
"dataset_benchmark": {"short": "Dataset", "full": "Dataset and Benchmark"},
234-
"roboverse_learn": {"short": "Learn", "full": "RoboVerse Learn"},
235-
"FAQ": {"short": "FAQ", "full": "Frequently Asked Questions"},
236-
}
237-
238-
239-
def _active_navbar_section(pagename):
240-
section = pagename.split("/", 1)[0]
241-
return section if section in _NAVBAR_LABELS else None
242-
243-
244-
def _navbar_section_from_href(href, active_section):
245-
if href == "#":
246-
return active_section
247-
for section in _NAVBAR_LABELS:
248-
if href.endswith(f"{section}/index.html"):
249-
return section
250-
return None
251-
252-
253-
def _replace_navbar_item_label(match, active_section):
254-
item_html = match.group(0)
255-
href_match = re.search(r'href="([^"]+)"', item_html)
256-
if href_match is None:
257-
return item_html
258-
259-
section = _navbar_section_from_href(href_match.group(1), active_section)
260-
if section is None:
261-
return item_html
262-
263-
label_kind = "full" if section == active_section else "short"
264-
label = _NAVBAR_LABELS[section][label_kind]
265-
return re.sub(r"(>)[^<>]+(</a>)", rf"\1{label}\2", item_html, count=1)
266-
267-
268-
def _rewrite_navbar_labels(html, pagename):
269-
active_section = _active_navbar_section(pagename)
270-
271-
def rewrite_navbar(match):
272-
navbar_html = match.group(0)
273-
return re.sub(
274-
r'<li class="nav-item[^"]*">.*?</li>',
275-
lambda item_match: _replace_navbar_item_label(item_match, active_section),
276-
navbar_html,
277-
flags=re.DOTALL,
278-
)
279-
280-
return re.sub(
281-
r'<ul class="bd-navbar-elements navbar-nav">.*?</ul>',
282-
rewrite_navbar,
283-
html,
284-
flags=re.DOTALL,
285-
)
286-
287-
288-
def normalize_navbar_labels(app, exception):
289-
if exception is not None or app.builder.name != "html":
290-
return
291-
292-
outdir = os.path.abspath(app.outdir)
293-
for section in ("", *[f"{section}/" for section in _NAVBAR_LABELS]):
294-
html_path = os.path.join(outdir, section, "index.html")
295-
if not os.path.exists(html_path):
296-
continue
297-
298-
pagename = "index" if section == "" else f"{section.rstrip('/')}/index"
299-
with open(html_path, encoding="utf-8") as f:
300-
html = f.read()
301-
302-
rewritten = _rewrite_navbar_labels(html, pagename)
303-
if rewritten == html:
304-
continue
305-
306-
with open(html_path, "w", encoding="utf-8") as f:
307-
f.write(rewritten)
308-
309-
310248
def setup(app):
311249
app.connect("autodoc-skip-member", skip_member)
312250
app.connect("builder-inited", generate_task_markdown)
313-
app.connect("build-finished", normalize_navbar_labels)

docs/source/index.md

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# RoboVerse Documentation
1+
# RoboVerse
22

3-
![RoboVerse](./_static/Robo.png)
3+
![RoboVerse](./_static/tea.jpg)
44

55
<p align="center">
66
<a href="https://roboverseorg.github.io"><img src="https://img.shields.io/badge/project-page-brightgreen" alt="Project Page"></a>
@@ -136,10 +136,58 @@ If you find this work useful in your research, please consider citing:
136136
```
137137

138138
```{toctree}
139+
:caption: Dataset & Benchmark
140+
:maxdepth: 2
141+
:titlesonly:
142+
:hidden:
143+
144+
Overview <dataset_benchmark/index>
145+
Tasks Overview <dataset_benchmark/tasks/overview>
146+
Task Descriptions <dataset_benchmark/tasks/descriptions>
147+
Task Groups <dataset_benchmark/tasks/task_groups>
148+
Robots <dataset_benchmark/dataset/robots>
149+
Objects <dataset_benchmark/dataset/objects>
150+
Scenes <dataset_benchmark/dataset/scenes>
151+
Benchmark Overview <dataset_benchmark/benchmark/overview>
152+
Benchmark Results <dataset_benchmark/benchmark/results>
153+
Benchmark Usage <dataset_benchmark/benchmark/usage>
154+
```
155+
156+
```{toctree}
157+
:caption: Imitation Learning
158+
:maxdepth: 2
159+
:titlesonly:
160+
:hidden:
161+
162+
Overview <roboverse_learn/index>
163+
Diffusion Policy <roboverse_learn/imitation_learning/diffusion_policy>
164+
ACT <roboverse_learn/imitation_learning/ACT>
165+
OpenVLA <roboverse_learn/imitation_learning/openvla>
166+
SmolVLA <roboverse_learn/imitation_learning/smolvla>
167+
RDT <roboverse_learn/imitation_learning/rdt>
168+
Octo <roboverse_learn/imitation_learning/octo>
169+
Contributing <roboverse_learn/imitation_learning/contributing>
170+
```
171+
172+
```{toctree}
173+
:caption: Reinforcement Learning
174+
:maxdepth: 2
175+
:titlesonly:
139176
:hidden:
177+
178+
PPO <roboverse_learn/reinforcement_learning/ppo>
179+
FastTD3 <roboverse_learn/reinforcement_learning/fast_td3>
180+
SAC <roboverse_learn/reinforcement_learning/sac>
181+
TD3 <roboverse_learn/reinforcement_learning/td3>
182+
SkillBlender <roboverse_learn/reinforcement_learning/skillblender_rl>
183+
Humanoid <roboverse_learn/reinforcement_learning/humanoid>
184+
```
185+
186+
```{toctree}
187+
:caption: FAQ
188+
:maxdepth: 2
140189
:titlesonly:
190+
:hidden:
141191
142-
Dataset <dataset_benchmark/index>
143-
Learn <roboverse_learn/index>
144-
FAQ <FAQ/index>
192+
FAQ/index
145193
```

docs/source/roboverse/index.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
orphan: true
3+
---
4+
5+
# RoboVerse
6+
7+
**RoboVerse** is the dataset, benchmark, task-pack, and learning layer that sits on
8+
top of the [MetaSim](https://roboverse.wiki/metasim/) simulator framework. This
9+
section brings together the task inventory, asset descriptions, benchmark protocol,
10+
and the imitation- and reinforcement-learning workflows.
11+
12+
---
13+
14+
## Quick Navigation
15+
16+
::::{grid} 2
17+
:gutter: 3
18+
19+
:::{grid-item-card} Tasks Overview
20+
:link: /dataset_benchmark/tasks/overview
21+
:link-type: doc
22+
23+
Browse the full task inventory across every benchmark namespace.
24+
:::
25+
26+
:::{grid-item-card} Robots, Objects, Scenes
27+
:link: /dataset_benchmark/dataset/robots
28+
:link-type: doc
29+
30+
Robot configurations, object assets, and scene definitions used by tasks.
31+
:::
32+
33+
:::{grid-item-card} Imitation Learning
34+
:link: /roboverse_learn/imitation_learning/diffusion_policy
35+
:link-type: doc
36+
37+
Diffusion Policy, ACT, OpenVLA, SmolVLA, RDT, Octo and how to add your own.
38+
:::
39+
40+
:::{grid-item-card} Reinforcement Learning
41+
:link: /roboverse_learn/reinforcement_learning/ppo
42+
:link-type: doc
43+
44+
PPO, FastTD3, SAC, TD3, SkillBlender, humanoid locomotion stacks.
45+
:::
46+
47+
:::{grid-item-card} Benchmark Protocol & Results
48+
:link: /dataset_benchmark/benchmark/overview
49+
:link-type: doc
50+
51+
Standard evaluation protocols and the latest benchmark results.
52+
:::
53+
54+
:::{grid-item-card} MetaSim docs ↗
55+
:link: /metasim/
56+
:link-type: url
57+
58+
Simulator core: concepts, handlers, API reference, troubleshooting.
59+
:::
60+
61+
::::

scripts/docs/build_roboverse_wiki.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ fi
3636
rm -rf "$output_dir"
3737
mkdir -p "$output_dir"
3838

39-
cp -a "$repo_root/docs/landing/." "$output_dir/"
40-
"$python_bin" -m sphinx -b html "$repo_root/docs/source" "$output_dir/roboverse"
39+
# RoboVerse docs are the homepage — built directly at the site root so
40+
# visiting roboverse.wiki/ lands on the Sphinx RoboVerse intro, matching
41+
# the pre-#764 deployment layout. MetaSim docs live under /metasim/.
42+
"$python_bin" -m sphinx -b html "$repo_root/docs/source" "$output_dir"
4143
"$python_bin" -m sphinx -b html "$metasim_dir/docs/source" "$output_dir/metasim"
4244

4345
if [[ -f "$metasim_dir/docs/source/images/tea.jpg" ]]; then

0 commit comments

Comments
 (0)