POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models package

Submodules

POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_agent_models module

Tests for the agent-channel observation model (agent_models.py).

POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_agent_models.test_log_probability_penalizes_seeing_an_occluded_agent()[source]

Reporting an occluded agent is scored as near-impossible.

Purpose: Validates occlusion gating in the agent-channel density

Given: A target occluded by a blocker on the ego->target sight line When: log_probability scores an observation that (wrongly) reports the occluded target

vs one that correctly omits it

Then: The correctly-omitted observation scores far higher

Test type: unit

POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_agent_models.test_perceive_gates_out_of_range_agent()[source]

perceive keeps a near agent and zeroes an out-of-range one.

Purpose: Validates the range gate on the agents channel

Given: A model with a 50 m range and a near + far agent (both present) When: perceive is called on the flat agents block Then: The near slot stays present and the far slot is zeroed

Test type: unit

POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_agent_models.test_render_noiseless_preserves_pose()[source]

render(noisy=False) gates without perturbing a detected pose.

Purpose: Validates the noise-free rendering path used to build clean observations

Given: A model with no range gate and a single detected agent with a nonzero pose When: render is called with noisy=False Then: The agent’s pose is returned unchanged

Test type: unit

POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_gnss_models module

Tests for the GNSS-channel observation model (gnss_models.py).

POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_gnss_models.test_log_probability_prefers_the_truth()[source]

The density scores the true reading above a shifted one.

Purpose: Validates the GNSS Gaussian density ranks the truthful reading higher

Given: A GnssObservationModel and a clean 2-D reading When: log_probability scores the truth vs a 3 m-shifted reading Then: The truthful reading has the higher log-probability

Test type: unit

POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_gnss_models.test_perceive_returns_two_vector()[source]

perceive returns a 2-D GNSS reading.

Purpose: Validates the GNSS sampler shape and channel handling

Given: A GnssObservationModel and a clean 2-D reading When: perceive is called Then: A length-2 array is returned

Test type: unit

POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_registry module