Skip to content

Commit 34a3a46

Browse files
committed
Docs CI: install gymnasium_robotics + scipy; mock rostopic
The strict-warnings sphinx-build enabled in the previous commit surfaced real autodoc-import failures: multiros / realros import gymnasium_robotics for goal-env support; rl_environments imports scipy and rostopic. Without these the autodoc pages were silently empty (warnings, but not errors in the old non-strict build). Two fixes: - docs/requirements.txt: add gymnasium-robotics and scipy as pip deps so the imports actually succeed. Also pin gymnasium explicitly to 0.29.1 to match the tests-CI pin and the supported runtime. - docs/conf.py autodoc_mock_imports: add 'rostopic' (a ROS-only package, not pip-installable, so we mock it). Other already- mocked rospy ecosystem packages stay as is.
1 parent d172bbf commit 34a3a46

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
# Mock them so autodoc can introspect docstrings without crashing on
137137
# unresolved imports.
138138
autodoc_mock_imports = [
139-
"rospy", "rosparam", "rospkg", "xacro",
139+
"rospy", "rosparam", "rospkg", "rostopic", "xacro",
140140
"rospy.service",
141141
"visualization_msgs", "geometry_msgs", "std_msgs",
142142
"sensor_msgs", "controller_manager_msgs",

docs/requirements.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ sphinx-rtd-theme>=2.0
66
sphinx-copybutton>=0.5
77
myst-parser>=2.0
88

9-
# autodoc imports the four packages to read their docstrings, so they
9+
# autodoc imports the six packages to read their docstrings, so they
1010
# need to be importable from PYTHONPATH. conf.py already adds the
1111
# src/ trees to sys.path; this lists only the pure-Python deps the
1212
# packages actually pull in at import time once ROS modules are mocked.
13-
gymnasium>=0.29
13+
# Pin gymnasium to match the supported runtime (1.x removed the
14+
# wrapper attribute passthrough that the proxy depends on).
15+
gymnasium==0.29.1
16+
gymnasium-robotics==1.2.4
1417
numpy>=1.21
18+
scipy>=1.7

0 commit comments

Comments
 (0)