Environments¶
Base Environment¶
BaseEnv
¶
PyBullet Environment¶
pybullet_env
¶
PyBulletEnv(config: RobotConfig, visualize: bool = True, viz_urdf_path: str | None = None)
¶
Bases: BaseEnv
Source code in nav_planning/envs/pybullet_env.py
set_configuration(config: np.ndarray)
¶
Apply a full 5-DOF config (base x, y, theta, pan, tilt).
The base is on the URDF's virtual planar joints, so this is a joint-state update.
get_localization() -> np.ndarray
¶
wait_key(key: str | int, message: str = '') -> None
¶
Block until key is pressed in the PyBullet GUI.
Prints message to stdout, then polls keyboard events until the
requested key is triggered. Accepts either a single character
("n") or a raw PyBullet key code (e.g. pb.B3G_RIGHT_ARROW).
Returns early if the GUI window is closed.
Source code in nav_planning/envs/pybullet_env.py
wait_for_close() -> None
¶
Block until the user closes the PyBullet GUI window.
animate_path(path: np.ndarray, fps: float = 60.0, next_key: str | int | None = None) -> bool
¶
Interactively play back a full-DOF path, VAMP-style.
Each row of path is handed to :meth:set_configuration. The
method blocks on the PyBullet GUI with these controls:
SPACE— toggle auto-play (loops end → start)← / →— step one waypoint back / forward (while paused)next_key(opt.) — exit and returnTrue— useful when the caller wants to drive a sequence of demos
Exits when the user closes the GUI window (returns False) or
presses next_key if one is provided (returns True). The
animation starts paused so the caller can read the banner before
anything moves.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
ndarray
|
|
required |
fps
|
float
|
playback frame rate while auto-playing. |
60.0
|
next_key
|
str | int | None
|
optional single-character string or raw PyBullet key code; pressing it exits the viewer. |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
|