Skip to content

Commit 42334ff

Browse files
committed
Add docstring to environment entrypoint.
1 parent 33b994e commit 42334ff

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

smarts/env/gymnasium/bubble_env.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
22-
from textwrap import dedent
23-
from typing import Optional
24-
2522
import gymnasium as gym
2623

2724

@@ -34,7 +31,27 @@ def checked_bubble_env_v0(
3431
seed: int = 42,
3532
**kwargs,
3633
):
34+
"""Imports and generates the `bubble_env` environment which converts nearby replay
35+
traffic (non-reactive) into model based traffic (reactive). This uses the NGSIM i80
36+
dataset as a basis.
37+
38+
Args:
39+
traffic_mode (Literal["traffic_A"]): The version of bubble traffic to use.
40+
action_space (ActionSpaceType): The action space the agent should use.
41+
img_meters (float): The square side dimensions of the surface the top-down rgb image
42+
portrays. This affects resolution.
43+
img_pixels (float): The total number of pixels in the top-down rgb image. This affects
44+
resolution.
45+
headless (bool): If the environment should display sumo-gui.
46+
seed (int): The seed of the environment.
47+
48+
49+
Returns:
50+
(gymnasium.Env): The bubble_env environment.
3751
52+
Raises:
53+
ImportError: If `bubble_env` is not installed.
54+
"""
3855
try:
3956
import bubble_env_contrib
4057
except ImportError as err:

0 commit comments

Comments
 (0)