Skip to content

Commit

Permalink
Allow properly building docs even with mussing ROS2 installation
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdivo committed Jan 4, 2025
1 parent cd3f151 commit 60278e6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,25 @@
# -- Setup -------------------------------------------------------------------

import re
import sys
from pathlib import Path
from unittest.mock import Mock

# -- Mock ROS2 ---------------------------------------------------------------

try:
import rclpy
except ImportError:
sys.modules["rclpy"] = Mock()
else:
del rclpy

try:
import action_msgs
except ImportError:
sys.modules["action_msgs"] = Mock()
else:
del action_msgs

# -- Project information -----------------------------------------------------

Expand Down

0 comments on commit 60278e6

Please sign in to comment.