test_scenario_logging Namespace
Definition
Functions Index
| scenario_logging.RobotSnapshotInputs | make_inputs (**overrides) |
| make_scene_message () | |
| test_robot_snapshot_inputs_optional_yaml_defaults_to_none () | |
| test_ensure_robot_snapshot_returns_snapshot_path (tmp_path) | |
| test_ensure_robot_snapshot_failure_raises_message_error (tmp_path) | |
| test_scenario_writer_writes_scenario_and_snapshot (tmp_path) | |
| test_scenario_writer_accepts_str_root (tmp_path) | |
| test_scenario_writer_rejects_malformed_request_json (tmp_path) | |
| test_scenario_writer_rejects_diff_scene (tmp_path) | |
| test_scenario_input_json_round_trip () | |
| test_scenario_output_json_round_trip () | |
| test_trajectory_summary_is_copied_on_access () | |
| test_from_json_string_malformed_raises_message_error (record) | |
Variables Index
| str | FIXTURES = Path(__file__).parent / "fixtures" |
| str | URDF = FIXTURES / "scenario_logging.urdf" |
| str | SRDF = FIXTURES / "scenario_logging.srdf" |
Description
Tests for the scenario_logging bindings and the pro_rrt scenario request/result bindings.
The C++ tests in `src/planners/scenario_logging/test/` cover the on-disk format, hashing, and quota eviction, and
`src/planners/pro_rrt/test/test_scenario_interface.cpp` covers the JSON shape. These tests cover what the bindings
add: argument marshaling, defaults, `pathlib.Path` conversion, and that `tl::expected` errors raise `MessageError`.
The fixture robot is mesh-free on purpose: `ensure_robot_snapshot` copies every mesh the URDF references, so the
`lab_sim` fixture would make each writer test resolve and copy mesh files through `ament_index`.
Functions
make_inputs()
|
Snapshot inputs for the mesh-free fixture robot.
Definition at line 29 of file test_scenario_logging.py.
make_scene_message()
|
Definition at line 36 of file test_scenario_logging.py.
test_ensure_robot_snapshot_failure_raises_message_error()
|
A snapshot that cannot be written raises `MessageError` with the C++ message.
Definition at line 67 of file test_scenario_logging.py.
test_ensure_robot_snapshot_returns_snapshot_path()
|
A `pathlib.Path` root is accepted and the snapshot directory comes back as a `pathlib.Path`.
Definition at line 51 of file test_scenario_logging.py.
test_from_json_string_malformed_raises_message_error()
|
Malformed JSON raises `MessageError` for both record types.
Definition at line 230 of file test_scenario_logging.py.
test_robot_snapshot_inputs_optional_yaml_defaults_to_none()
|
The two YAML overrides default to None and accept text by keyword.
Definition at line 40 of file test_scenario_logging.py.
test_scenario_input_json_round_trip()
|
Every `ScenarioInput` field survives `to_json_string` / `from_json_string`.
Definition at line 155 of file test_scenario_logging.py.
test_scenario_output_json_round_trip()
|
`ScenarioOutput` with a summary survives the JSON round trip.
Definition at line 192 of file test_scenario_logging.py.
test_scenario_writer_accepts_str_root()
|
The root may be passed as `str`.
Definition at line 113 of file test_scenario_logging.py.
test_scenario_writer_rejects_diff_scene()
|
A diff scene raises `MessageError`, since replay would plan in an incomplete world.
Definition at line 139 of file test_scenario_logging.py.
test_scenario_writer_rejects_malformed_request_json()
|
A malformed `request_json` raises `MessageError` naming the problem.
Definition at line 126 of file test_scenario_logging.py.
test_scenario_writer_writes_scenario_and_snapshot()
|
`write` returns the scenario directory as a `pathlib.Path` and leaves the envelope it was given unchanged.
Definition at line 81 of file test_scenario_logging.py.
test_trajectory_summary_is_copied_on_access()
|
Reading `trajectory_summary` returns a copy, so mutating it or resetting the field cannot alias freed storage.
Definition at line 213 of file test_scenario_logging.py.
Variables
FIXTURES
|
Definition at line 24 of file test_scenario_logging.py.
SRDF
|
Definition at line 26 of file test_scenario_logging.py.
URDF
|
Definition at line 25 of file test_scenario_logging.py.
The documentation for this namespace was generated from the following file:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.