Skip to content

Commit 14d9441

Browse files
authored
Fix typo (#89)
1 parent ede15d7 commit 14d9441

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

docs/custom/custom_task.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To define your own task, you need to inherit from :py:class:`Task<panda_gym.envs
1616
- ``reset()``: how the task is reset; you must define `self.goal` in this function
1717
- ``get_obs()``: returns the observation
1818
- ``get_achieved_goal()``: returns the achieved goal
19-
- ``is_success(achieved_goal, desired_goal, info)``: returns whether the task is successfull
19+
- ``is_success(achieved_goal, desired_goal, info)``: returns whether the task is successful
2020
- ``compute_reward(achieved_goal, desired_goal, info)``: returns the reward
2121

2222
For the purpose of the example, let's consider here a very simple task, consisting in moving a cube toward a target position. The goal position is sampled within a volume of 10 m x 10 m x 10 m.
@@ -51,14 +51,14 @@ For the purpose of the example, let's consider here a very simple task, consisti
5151
achieved_goal = self.sim.get_base_position("object")
5252
return achieved_goal
5353
54-
def is_success(self, achieved_goal, desired_goal, info={}): # info is here for consistancy
54+
def is_success(self, achieved_goal, desired_goal, info={}): # info is here for consistency
5555
# compute the distance between the goal position and the current object position
5656
d = distance(achieved_goal, desired_goal)
5757
# return True if the distance is < 1.0, and False otherwise
5858
return np.array(d < 1.0, dtype=bool)
5959
60-
def compute_reward(self, achieved_goal, desired_goal, info={}): # info is here for consistancy
61-
# for this example, reward = 1.0 if the task is successfull, 0.0 otherwise
60+
def compute_reward(self, achieved_goal, desired_goal, info={}): # info is here for consistency
61+
# for this example, reward = 1.0 if the task is successful, 0.0 otherwise
6262
return self.is_success(achieved_goal, desired_goal, info).astype(np.float32)
6363
6464

docs/usage/advanced_rendering.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ You can render from a different point of view than the default. For this, the fo
4141

4242
- ``render_width`` (int, optional): Image width. Defaults to 720.
4343
- ``render_height`` (int, optional): Image height. Defaults to 480.
44-
- ``render_target_position`` (np.ndarray, optional): Camera targetting this postion, as (x, y, z). Defaults to [0., 0., 0.].
44+
- ``render_target_position`` (np.ndarray, optional): Camera targeting this position, as (x, y, z). Defaults to [0., 0., 0.].
4545
- ``render_distance`` (float, optional): Distance of the camera. Defaults to 1.4.
4646
- ``render_yaw`` (float, optional): Yaw of the camera. Defaults to 45.
4747
- ``render_pitch`` (float, optional): Pitch of the camera. Defaults to -30.
48-
- ``render_roll`` (int, optional): Rool of the camera. Defaults to 0.
48+
- ``render_roll`` (int, optional): Roll of the camera. Defaults to 0.
4949

5050
Example
5151
~~~~~~~

docs/usage/environments.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Environments
2424
By default, the reward is sparse and the control mode is the end-effector displacement.
2525
The complete set of environments present in the package is presented in the following list.
2626

27-
Sparce reward, end-effector control (default setting)
27+
Sparse reward, end-effector control (default setting)
2828
-----------------------------------------------------
2929

3030
* ``PandaReach-v3``
@@ -44,7 +44,7 @@ Dense reward, end-effector control
4444
* ``PandaStackDense-v3``
4545
* ``PandaFlipDense-v3``
4646

47-
Sparce reward, joints control
47+
Sparse reward, joints control
4848
-----------------------------
4949

5050
* ``PandaReachJoints-v3``

docs/usage/train_with_sb3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Bonus: Train with RL Baselines3 Zoo
3737
-----------------------------------
3838

3939
`RL Baselines3 Zoo <https://stable-baselines3.readthedocs.io/en/master/guide/rl_zoo.html>`_ is the training framework associated with SB3.
40-
It provides scripts for training, evaluating agents, setting hyperparameters, plotting results and recording video. It also contains already optimized hypermeters, including for some ``panda-gym`` environments.
40+
It provides scripts for training, evaluating agents, setting hyperparameters, plotting results and recording video. It also contains already optimized hyperparameters, including for some ``panda-gym`` environments.
4141

4242
.. warning::
4343
The current version of RL Baselines3 Zoo provides hyperparameters for version 1 of ``panda-gym``, but not for version 2. Before training with RL Baselines3 Zoo, you will have to set your own hyperparameters by editing ``hyperparameters/<ALGO>.yml``. For more information, please read the `README of RL Baselines3 Zoo <https://github.com/DLR-RM/rl-baselines3-zoo#readme>`_.

panda_gym/envs/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ class RobotTaskEnv(gym.Env):
202202
task (Task): The task.
203203
render_width (int, optional): Image width. Defaults to 720.
204204
render_height (int, optional): Image height. Defaults to 480.
205-
render_target_position (np.ndarray, optional): Camera targetting this postion, as (x, y, z).
205+
render_target_position (np.ndarray, optional): Camera targeting this position, as (x, y, z).
206206
Defaults to [0., 0., 0.].
207207
render_distance (float, optional): Distance of the camera. Defaults to 1.4.
208208
render_yaw (float, optional): Yaw of the camera. Defaults to 45.
209209
render_pitch (float, optional): Pitch of the camera. Defaults to -30.
210-
render_roll (int, optional): Rool of the camera. Defaults to 0.
210+
render_roll (int, optional): Roll of the camera. Defaults to 0.
211211
"""
212212

213213
metadata = {"render_modes": ["human", "rgb_array"]}
@@ -286,7 +286,7 @@ def reset(
286286
return observation, info
287287

288288
def save_state(self) -> int:
289-
"""Save the current state of the envrionment. Restore with `restore_state`.
289+
"""Save the current state of the environment. Restore with `restore_state`.
290290
291291
Returns:
292292
int: State unique identifier.
@@ -296,7 +296,7 @@ def save_state(self) -> int:
296296
return state_id
297297

298298
def restore_state(self, state_id: int) -> None:
299-
"""Resotre the state associated with the unique identifier.
299+
"""Restore the state associated with the unique identifier.
300300
301301
Args:
302302
state_id (int): State unique identifier.

panda_gym/envs/panda_tasks.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ class PandaFlipEnv(RobotTaskEnv):
2525
and "OpenGL" if render mode is "rgb_array". Only "OpenGL" is available for human render mode.
2626
render_width (int, optional): Image width. Defaults to 720.
2727
render_height (int, optional): Image height. Defaults to 480.
28-
render_target_position (np.ndarray, optional): Camera targetting this postion, as (x, y, z).
28+
render_target_position (np.ndarray, optional): Camera targeting this position, as (x, y, z).
2929
Defaults to [0., 0., 0.].
3030
render_distance (float, optional): Distance of the camera. Defaults to 1.4.
3131
render_yaw (float, optional): Yaw of the camera. Defaults to 45.
3232
render_pitch (float, optional): Pitch of the camera. Defaults to -30.
33-
render_roll (int, optional): Rool of the camera. Defaults to 0.
33+
render_roll (int, optional): Roll of the camera. Defaults to 0.
3434
3535
"""
3636

@@ -76,12 +76,12 @@ class PandaPickAndPlaceEnv(RobotTaskEnv):
7676
and "OpenGL" if render mode is "rgb_array". Only "OpenGL" is available for human render mode.
7777
render_width (int, optional): Image width. Defaults to 720.
7878
render_height (int, optional): Image height. Defaults to 480.
79-
render_target_position (np.ndarray, optional): Camera targetting this postion, as (x, y, z).
79+
render_target_position (np.ndarray, optional): Camera targeting this position, as (x, y, z).
8080
Defaults to [0., 0., 0.].
8181
render_distance (float, optional): Distance of the camera. Defaults to 1.4.
8282
render_yaw (float, optional): Yaw of the camera. Defaults to 45.
8383
render_pitch (float, optional): Pitch of the camera. Defaults to -30.
84-
render_roll (int, optional): Rool of the camera. Defaults to 0.
84+
render_roll (int, optional): Roll of the camera. Defaults to 0.
8585
"""
8686

8787
def __init__(
@@ -126,12 +126,12 @@ class PandaPushEnv(RobotTaskEnv):
126126
and "OpenGL" if render mode is "rgb_array". Only "OpenGL" is available for human render mode.
127127
render_width (int, optional): Image width. Defaults to 720.
128128
render_height (int, optional): Image height. Defaults to 480.
129-
render_target_position (np.ndarray, optional): Camera targetting this postion, as (x, y, z).
129+
render_target_position (np.ndarray, optional): Camera targeting this position, as (x, y, z).
130130
Defaults to [0., 0., 0.].
131131
render_distance (float, optional): Distance of the camera. Defaults to 1.4.
132132
render_yaw (float, optional): Yaw of the camera. Defaults to 45.
133133
render_pitch (float, optional): Pitch of the camera. Defaults to -30.
134-
render_roll (int, optional): Rool of the camera. Defaults to 0.
134+
render_roll (int, optional): Roll of the camera. Defaults to 0.
135135
"""
136136

137137
def __init__(
@@ -176,12 +176,12 @@ class PandaReachEnv(RobotTaskEnv):
176176
and "OpenGL" if render mode is "rgb_array". Only "OpenGL" is available for human render mode.
177177
render_width (int, optional): Image width. Defaults to 720.
178178
render_height (int, optional): Image height. Defaults to 480.
179-
render_target_position (np.ndarray, optional): Camera targetting this postion, as (x, y, z).
179+
render_target_position (np.ndarray, optional): Camera targeting this position, as (x, y, z).
180180
Defaults to [0., 0., 0.].
181181
render_distance (float, optional): Distance of the camera. Defaults to 1.4.
182182
render_yaw (float, optional): Yaw of the camera. Defaults to 45.
183183
render_pitch (float, optional): Pitch of the camera. Defaults to -30.
184-
render_roll (int, optional): Rool of the camera. Defaults to 0.
184+
render_roll (int, optional): Roll of the camera. Defaults to 0.
185185
"""
186186

187187
def __init__(
@@ -226,12 +226,12 @@ class PandaSlideEnv(RobotTaskEnv):
226226
and "OpenGL" if render mode is "rgb_array". Only "OpenGL" is available for human render mode.
227227
render_width (int, optional): Image width. Defaults to 720.
228228
render_height (int, optional): Image height. Defaults to 480.
229-
render_target_position (np.ndarray, optional): Camera targetting this postion, as (x, y, z).
229+
render_target_position (np.ndarray, optional): Camera targeting this position, as (x, y, z).
230230
Defaults to [0., 0., 0.].
231231
render_distance (float, optional): Distance of the camera. Defaults to 1.4.
232232
render_yaw (float, optional): Yaw of the camera. Defaults to 45.
233233
render_pitch (float, optional): Pitch of the camera. Defaults to -30.
234-
render_roll (int, optional): Rool of the camera. Defaults to 0.
234+
render_roll (int, optional): Roll of the camera. Defaults to 0.
235235
"""
236236

237237
def __init__(
@@ -276,12 +276,12 @@ class PandaStackEnv(RobotTaskEnv):
276276
and "OpenGL" if render mode is "rgb_array". Only "OpenGL" is available for human render mode.
277277
render_width (int, optional): Image width. Defaults to 720.
278278
render_height (int, optional): Image height. Defaults to 480.
279-
render_target_position (np.ndarray, optional): Camera targetting this postion, as (x, y, z).
279+
render_target_position (np.ndarray, optional): Camera targeting this position, as (x, y, z).
280280
Defaults to [0., 0., 0.].
281281
render_distance (float, optional): Distance of the camera. Defaults to 1.4.
282282
render_yaw (float, optional): Yaw of the camera. Defaults to 45.
283283
render_pitch (float, optional): Pitch of the camera. Defaults to -30.
284-
render_roll (int, optional): Rool of the camera. Defaults to 0.
284+
render_roll (int, optional): Roll of the camera. Defaults to 0.
285285
"""
286286

287287
def __init__(

panda_gym/envs/robots/panda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Panda(PyBulletRobot):
1313
Args:
1414
sim (PyBullet): Simulation instance.
1515
block_gripper (bool, optional): Whether the gripper is blocked. Defaults to False.
16-
base_position (np.ndarray, optionnal): Position of the base base of the robot, as (x, y, z). Defaults to (0, 0, 0).
16+
base_position (np.ndarray, optional): Position of the base base of the robot, as (x, y, z). Defaults to (0, 0, 0).
1717
control_type (str, optional): "ee" to control end-effector displacement or "joints" to control joint angles.
1818
Defaults to "ee".
1919
"""

panda_gym/pybullet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ def render(
115115
Args:
116116
width (int, optional): Image width. Defaults to 720.
117117
height (int, optional): Image height. Defaults to 480.
118-
target_position (np.ndarray, optional): Camera targetting this postion, as (x, y, z).
118+
target_position (np.ndarray, optional): Camera targeting this position, as (x, y, z).
119119
Defaults to [0., 0., 0.].
120120
distance (float, optional): Distance of the camera. Defaults to 1.4.
121121
yaw (float, optional): Yaw of the camera. Defaults to 45.
122122
pitch (float, optional): Pitch of the camera. Defaults to -30.
123-
roll (int, optional): Rool of the camera. Defaults to 0.
123+
roll (int, optional): Roll of the camera. Defaults to 0.
124124
mode (str, optional): Deprecated: This argument is deprecated and will be removed in a future
125125
version. Use the render_mode argument of the constructor instead.
126126
@@ -623,7 +623,7 @@ def create_table(
623623
length (float): The length of the table (x direction).
624624
width (float): The width of the table (y direction)
625625
height (float): The height of the table.
626-
x_offset (float, optional): The offet in the x direction.
626+
x_offset (float, optional): The offset in the x direction.
627627
lateral_friction (float or None, optional): Lateral friction. If None, use the default pybullet
628628
value. Defaults to None.
629629
spinning_friction (float or None, optional): Spinning friction. If None, use the default pybullet

test/pybullet_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def test_inverse_kinematics():
266266
pybullet.close()
267267

268268

269-
def test_place_visalizer():
269+
def test_place_visualizer():
270270
from panda_gym.pybullet import PyBullet
271271

272272
pybullet = PyBullet()

0 commit comments

Comments
 (0)