0
0
EV Technologyknowledge~30 mins

Sensor suite (LiDAR, radar, camera) in EV Technology - Mini Project: Build & Apply

Choose your learning style9 modes available
Sensor suite (LiDAR, radar, camera)
📖 Scenario: You are working on an electric vehicle (EV) project that uses a sensor suite to detect obstacles and navigate safely. The sensor suite includes LiDAR, radar, and camera sensors. Each sensor has specific properties like range, resolution, and type.
🎯 Goal: Build a simple data structure to represent the sensor suite, configure a threshold for detection range, filter sensors that meet the threshold, and finalize the sensor list for the EV system.
📋 What You'll Learn
Create a dictionary named sensor_suite with three sensors: LiDAR, Radar, and Camera.
Each sensor entry must be a dictionary with keys: type, range_meters, and resolution.
Add a variable min_range to set the minimum detection range threshold.
Use a dictionary comprehension to create a new dictionary active_sensors with sensors having range_meters greater than or equal to min_range.
Add a final key status with value "active" to each sensor in active_sensors.
💡 Why This Matters
🌍 Real World
Electric vehicles use sensor suites like LiDAR, radar, and cameras to detect obstacles and navigate safely.
💼 Career
Understanding how to organize and filter sensor data is important for roles in automotive engineering, robotics, and autonomous systems.
Progress0 / 4 steps
1
Create the sensor suite dictionary
Create a dictionary called sensor_suite with these exact entries: 'LiDAR', 'Radar', and 'Camera'. Each sensor should be a dictionary with keys and values exactly as follows: type: 'distance', range_meters: 100 for LiDAR, 200 for Radar, 50 for Camera, and resolution: 'high' for LiDAR, 'medium' for Radar, 'low' for Camera.
EV Technology
Need a hint?

Use a dictionary with keys as sensor names and values as dictionaries with the specified keys and values.

2
Set the minimum detection range threshold
Add a variable called min_range and set it to the integer value 100 to represent the minimum detection range in meters.
EV Technology
Need a hint?

Just create a variable named min_range and assign it the value 100.

3
Filter sensors by minimum range
Use a dictionary comprehension to create a new dictionary called active_sensors that includes only sensors from sensor_suite where the range_meters value is greater than or equal to min_range.
EV Technology
Need a hint?

Use a dictionary comprehension with for name, details in sensor_suite.items() and filter by details['range_meters'] >= min_range.

4
Add status to active sensors
Add a key 'status' with the value 'active' to each sensor dictionary inside active_sensors.
EV Technology
Need a hint?

Use a for loop over active_sensors.values() and add the key 'status' with value 'active' to each sensor dictionary.