From 81154d8192c60d0c60d8599f5e39d21eacd7c2f4 Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Tue, 15 Aug 2023 10:15:31 +0200 Subject: [PATCH] docs: update external links (#292) --- docs/source/conf.py | 4 ++-- docs/source/dev/add_new_envs.rst | 2 +- docs/source/dev/doc_dev.rst | 6 +++--- docs/source/envs/envs.rst | 4 ++-- docs/source/get_started/usage.rst | 4 ++-- docs/source/index.rst | 2 +- stable_gym/envs/classic_control/ex3_ekf/ex3_ekf.py | 10 +++++----- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8c9fec7d..325d6633 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -92,7 +92,7 @@ # -- External links dictionary ----------------------------------------------- # Here you will find some often used global url definitions. extlinks = { - "stable_gym": ("https://github.com/rickstaa/stable-gym/%s", None), + "stable-gym": ("https://github.com/rickstaa/stable-gym/%s", None), "gymnasium": ("https://gymnasium.farama.org/%s", None), "gymnasium-robotics": ("https://robotics.farama.org/%s", None), "PyFlyt": ("https://jjshoots.github.io/PyFlyt/documentation%s", None), @@ -100,7 +100,7 @@ "https://github.com/rickstaa/stable-learning-control/%s", None, ), - "ros_gazebo_gym": ("https://github.com/rickstaa/ros-gazebo-gym/%s", None), + "ros-gazebo-gym": ("https://github.com/rickstaa/ros-gazebo-gym/%s", None), "pybullet": ("https://pybullet.org/%s", None), } diff --git a/docs/source/dev/add_new_envs.rst b/docs/source/dev/add_new_envs.rst index 9bf6fbe7..edf3dacc 100644 --- a/docs/source/dev/add_new_envs.rst +++ b/docs/source/dev/add_new_envs.rst @@ -3,7 +3,7 @@ Add new environments ==================== Please follow the steps provided in the :gymnasium:`gymnasium documentation ` -when creating a new environment. After you create your environment, you can use the :stable_gym:`stable-gym/stable_gym/__init__.py ` +when creating a new environment. After you create your environment, you can use the :stable-gym:`stable-gym/stable_gym/__init__.py ` file to register them to the ``stable_gym`` package. stable_gym/stable_gym/envs/__init__.py diff --git a/docs/source/dev/doc_dev.rst b/docs/source/dev/doc_dev.rst index e1a79945..459111a0 100644 --- a/docs/source/dev/doc_dev.rst +++ b/docs/source/dev/doc_dev.rst @@ -7,7 +7,7 @@ Build the documentation Install requirements -------------------- -Building the :stable_gym:`Stable Gym <>` documentation requires `sphinx`_, +Building the :stable-gym:`Stable Gym <>` documentation requires `sphinx`_, the ``stable_gym`` python package and several plugins. All of the above can be installed using the following `pip`_ command inside the ``./stable_gym`` folder: @@ -21,12 +21,12 @@ installed using the following `pip`_ command inside the ``./stable_gym`` folder: Build the documentation ----------------------- -To build the `HTML`_ documentation, go into the :stable_gym:`docs/ ` directory and run the +To build the `HTML`_ documentation, go into the :stable-gym:`docs/ ` directory and run the ``make html`` command. This command will generate the html documentation inside the ``docs/build/html`` directory. If the documentation is successfully built, you can also use the ``make linkcheck`` command to check for broken links. .. attention:: - Make sure you are in the Conda environment in which you installed the :stable_gym:`stable_gym <>` package + Make sure you are in the Conda environment in which you installed the :stable-gym:`stable_gym <>` package with it's dependencies. .. note:: diff --git a/docs/source/envs/envs.rst b/docs/source/envs/envs.rst index e2e04876..09d77902 100644 --- a/docs/source/envs/envs.rst +++ b/docs/source/envs/envs.rst @@ -4,7 +4,7 @@ Environments ============ -The :stable_gym:`Stable Gym package <>` provides a variety of environments for training and testing +The :stable-gym:`Stable Gym package <>` provides a variety of environments for training and testing :stable_learning_control:`(stable) reinforcement learning (RL) algorithms <>`. Biological environments @@ -67,4 +67,4 @@ Robotics environment .. note:: The ROS robotics environments of the Stable Gym package were moved into a separate package - called :ros_gazebo_gym:`Ros Gazebo Gym <>`. + called :ros-gazebo-gym:`Ros Gazebo Gym <>`. diff --git a/docs/source/get_started/usage.rst b/docs/source/get_started/usage.rst index f70cae1b..2dffb6b8 100644 --- a/docs/source/get_started/usage.rst +++ b/docs/source/get_started/usage.rst @@ -2,11 +2,11 @@ How to use ========== -The environments in the :stable_gym:`Stable Gym <>` package can be imported like any other +The environments in the :stable-gym:`Stable Gym <>` package can be imported like any other :gymnasium:`gymnasium environments <>`. You can then use the :func:`gym.vector.make` function to create an instance of the environment. Here's a bare minimum example of using one of the :ref:`Stable Gym environment `. This will run an instance of the :ref:`Oscillator-v1 ` environment for 1000 timesteps. You should see the observations -being printed to the console. More examples can be found in the :stable_gym:`Stable Gym examples folder `. +being printed to the console. More examples can be found in the :stable-gym:`Stable Gym examples folder `. .. literalinclude:: ../../../examples/use_stable_gym.py :language: python diff --git a/docs/source/index.rst b/docs/source/index.rst index 2bf0e09b..75defdc1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -11,7 +11,7 @@ Welcome to Stable Gym's documentation :width: 80% :align: center -The :stable_gym:`Stable Gym <>` package contains several :gymnasium:`gymnasium environments <>` +The :stable-gym:`Stable Gym <>` package contains several :gymnasium:`gymnasium environments <>` with cost functions compatible with (stable) RL agents. It was initially created for the stable RL algorithms in the :stable_learning_control:`Stable Learning Control <>` package but can be used with any RL agent requiring a **positive definite cost function**. For more information about stable diff --git a/stable_gym/envs/classic_control/ex3_ekf/ex3_ekf.py b/stable_gym/envs/classic_control/ex3_ekf/ex3_ekf.py index ace8ad8e..1bff2496 100644 --- a/stable_gym/envs/classic_control/ex3_ekf/ex3_ekf.py +++ b/stable_gym/envs/classic_control/ex3_ekf/ex3_ekf.py @@ -108,14 +108,14 @@ def __init__( self.sigma = 0 # Displacement limit set to be [-high, high] - high = np.array([10000, 10000, 10000, 10000], dtype=np.float32) + high = np.array([10000, 10000, 10000, 10000], dtype=np.float64) self.action_space = spaces.Box( - low=np.array([-10.0, -10.0], dtype=np.float32), - high=np.array([10.0, 10.0], dtype=np.float32), - dtype=np.float32, + low=np.array([-10.0, -10.0], dtype=np.float64), + high=np.array([10.0, 10.0], dtype=np.float64), + dtype=np.float64, ) - self.observation_space = spaces.Box(-high, high, dtype=np.float32) + self.observation_space = spaces.Box(-high, high, dtype=np.float64) self.reward_range = (0.0, 100.0) self._clipped_action = clipped_action