POMDPPlanners.tests.test_environments.test_carla_pomdp package
Tests for the CARLA POMDP world environment.
Subpackages
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_generative_models package
- Submodules
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_generative_models.test_cardreamer_world_model module
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_generative_models.test_carla_dreamer_model_pomdp module
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_generative_models.test_carla_kinematic_model_pomdp module
test_batch_transition_matches_single_sample()test_brake_from_rest_keeps_ego_stationary()test_is_terminal_false_for_agent_behind_or_far_or_beside()test_is_terminal_false_when_slot_absent()test_is_terminal_true_for_agent_directly_ahead()test_moving_ego_decelerates_under_brake()test_multiple_samples_return_stacked_copies()test_reward_applies_collision_penalty_on_predicted_collision()test_throttle_from_rest_produces_forward_velocity()
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_generative_models.test_carla_kinematic_vectorized_model module
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_generative_models.test_carla_model_pomdp module
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception package
- Subpackages
- 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
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_gnss_models module
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_observation_models.test_registry module
- 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_carla_pipeline module
test_alpha_beta_tracker_spawns_track_from_detection()test_detections_dataclass_carries_single_frame_fields()test_lidar_camera_model_channel_source_reads_traffic_light_key()test_lidar_camera_model_detects_vehicle_and_clear_light()test_lidar_camera_model_infers_red_light_from_camera()test_oracle_model_reads_present_agents_as_positions()test_pipeline_coasts_briefly_occluded_vehicle()test_pipeline_detects_object_type_from_model()test_pipeline_does_not_duplicate_a_tracked_obstacle()test_pipeline_folds_lidar_obstacle_into_empty_agent_slot()test_pipeline_is_immutable_across_process()test_pipeline_process_produces_agent_block_and_successor()test_pipeline_reports_no_obstacle_when_disabled_and_clear()test_pipeline_reports_red_light_as_forward_obstacle()
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_carla_sensors module
test_camera_looming_cue_high_for_dark_near_object()test_camera_looming_cue_none_is_zero()test_fuse_prefers_lidar_when_it_detects()test_fuse_uses_camera_only_when_lidar_clear()test_lidar_clearance_empty_or_none_is_clear()test_lidar_clearance_ignores_ground_and_out_of_corridor_returns()test_lidar_clearance_returns_nearest_forward_return()test_lidar_detection_ignores_ground_and_none()test_lidar_detection_rejects_wall_sized_clusters()test_lidar_detects_separate_vehicle_clusters_in_ego_frame()test_traffic_light_from_camera_detects_amber_bulb_as_stop()test_traffic_light_from_camera_detects_red_bulb_as_stop()test_traffic_light_from_camera_ignores_green_and_missing_frame()test_traffic_light_from_camera_larger_bulb_reads_nearer()test_traffic_light_from_camera_rejects_sub_threshold_noise()test_traffic_light_stop_distance_reports_red_light_gap()
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_perception.test_carla_tracking module
- Subpackages
Submodules
POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief module
Tests for the perceived-agents CARLA particle belief.
Covers PerceivedAgentsBelief stamping the observation’s agents block onto every
particle: perceived agents are written into the slots (with jitter), empty slots are cleared,
the ego block is preserved, and the returned belief is itself a PerceivedAgentsBelief
so the stamping repeats each step. Perception itself lives in the world’s observation model, so
these tests feed a perceived agents block directly. All tests run on hand-built states.
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief.test_reinvigorate_clears_slots_when_nothing_perceived()[source]
An observation with no perceived agents clears the stamped agent block.
Purpose: Validates stamping overwrites (does not accumulate) stale slots.
Given: Particles pre-seeded with a present slot and an observation with no agents When: reinvigorate stamps the empty perceived block Then: Every particle’s agent slots are cleared to empty
Test type: unit
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief.test_reinvigorate_marks_perceived_agent_present()[source]
A perceived agent turns on the matching particle slot on every particle.
Purpose: Validates stamping acquires traffic the particles were not seeded with.
Given: A belief of empty-agent particles and an observation with one perceived agent When: reinvigorate stamps the observation’s agent block onto the particles Then: Every particle’s first slot is marked present (== 1.0)
Test type: unit
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief.test_reinvigorate_places_agent_near_perceived_pose()[source]
Stamped agents cluster around the perceived pose.
Purpose: Validates the perceived pose (not zero) is written into the slot.
Given: A belief and an observation with an agent 8 m ahead, 1 m to the left When: reinvigorate stamps the agent block over many particles Then: The mean stamped slot position is close to the perceived position
Test type: unit
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief.test_reinvigorate_preserves_ego_block()[source]
Stamping leaves the ego state block untouched.
Purpose: Validates only agent slots are overwritten, not the filtered ego estimate.
Given: Particles with distinct non-zero ego blocks and an observation with an agent When: reinvigorate stamps the agent block Then: The ego block of every particle is unchanged
Test type: unit
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief.test_reinvigorate_returns_same_type_for_persistent_stamping()[source]
Reinvigorate returns a PerceivedAgentsBelief so stamping repeats across steps.
Purpose: Validates the belief type persists (not downgraded to base).
Given: A PerceivedAgentsBelief and any observation When: reinvigorate produces the next belief Then: The result is a PerceivedAgentsBelief carrying the same config
Test type: unit
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief.test_stamped_agents_have_particle_diversity()[source]
Per-particle jitter keeps stamped agent poses diverse.
Purpose: Validates the filter can still discriminate agent poses after stamping.
Given: A belief and an observation with one perceived agent, non-zero jitter When: reinvigorate stamps the agent block Then: The stamped slot poses are not all identical across particles
Test type: unit
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief.test_update_persists_stamping_through_full_filter_step()[source]
A full belief.update stamps the perceived agents and stays a PerceivedAgentsBelief.
Purpose: Validates the reinvigoration hook fires through the whole PF update path.
Given: A belief of empty-agent particles and a kinematic model as the transition/obs POMDP When: update is called with an observation carrying a perceived agent Then: The updated belief is a PerceivedAgentsBelief whose particles carry that agent
Test type: integration
- POMDPPlanners.tests.test_environments.test_carla_pomdp.test_carla_belief.test_zero_jitter_stamps_identical_blocks()[source]
With jitter disabled every particle receives the exact perceived block.
Purpose: Validates the jitter guard so a study can stamp the perceived estimate verbatim.
Given: A zero-jitter belief and an observation with one perceived agent When: reinvigorate stamps the agent block Then: Every particle’s agent block is identical
Test type: unit