This project involves a robotic car that is outfitted with Infineon's 60 GHz radar sensors, which aid in detecting platform edges. These sensors also serve to demonstrate the capabilities of the newly released BGT60UTR11AIP, such as accurate distance measurement, swift response times, low power consumption, and compact size. These features make it ideally suited for applications like vacuum cleaners and similar devices.
To give a brief overview of the radar device: The BGT60UTR11AIP is equipped with an ultra-wide bandwidth of 5.6 GHz, enabling FMCW (Frequency Modulated Continuous Wave) operations that can achieve extremely high resolution. This device is not only capable of detecting sub-millimeter movements, ensuring highly sensitive presence and motion detection up to a range of 15 meters, but it also facilitates millimeter-precise range measurements and the recognition of 1D gestures.
Project Block DiagramThe BGT60UTR11AIP boasts a wide Field of View (FoV) with a range of 60°. However, for this particular project, our aim is to measure distances directly beneath the radar, and as such, it becomes necessary to narrow this FoV to avoid false detections. A radome lens is employed to reduce the radar's FoV to approximately 8°. It is mounted onto the radar board as shown here:
The picture presents a bottom-view image of the robot, highlighting the placement of the radars that are fitted with radome lenses. Notably, the cylindrical elements visible in white within the image are the radome lenses themselves.
The core concept of the system involves continuously measuring the distance from both radars installed on the robot. As the robot nears an edge, the radars will extend over this edge, consequently registering a greater distance (denoted as X2) in comparison to the measurement taken when the robot is on a flat surface (represented as X1).
The Python script utilized for this project is an adaptation of the sample code included with the Radar Development Kit (v3.5.1) which is originally intended for measuring static distances. The two radars are interfaced with a Raspberry Pi. This connection is established using a 'connect by UUID' command, which uniquely identifies each radar device and facilitates secure communication.
Before proceeding with the script execution, it is crucial to install the Python wheels that are provided within the Radar Development Kit.Once the radars are connected, they are configured according to the project’s defined metrics. The distances are then measured at a rate of 60 fps. This high frequency of measurement is essential to detect the presence of an edge accurately.
To facilitate the replication or adaptation of this project, the complete code has been attached.
Before we start with the actual script, we define some helper functions to wrap the radar commands.
This function takes a radar frame and calculates the distance peak from it:
def getRadarDistancePeak( frame ):
frame_data = frame[0]
antenna_samples = frame_data[i_ant, :, :]
distance_peak, _ = algo.compute_distance(antenna_samples)
return distance_peak
And this one lets the robot reverse and turn a bit. We will do this when a table corner is detected:
def reverseAndTurn():
stopAll()
goBack(0.5)
turnClk(0.15)
Connecting the two devices, identified by UUID:
device1 = DeviceFmcw(uuid="00313853-314c-4c35-3135-303039303137")
device2 = DeviceFmcw(uuid="00313853-3959-3434-3034-303331303335")
UUID can be got by using the “DeviceFmcw.get_list()” command.
Configuring the radar chips:
device1.set_acquisition_sequence(sequence)
device2.set_acquisition_sequence(sequence)
algo = DistanceAlgo(chirp, chirp_loop.loop.num_repetitions)
print("Program started")
Loop through getting distances from radar chips and check for table corner:
while(1):
# Move robot forward
goFront(0)
# Get distance data from radar sensor 1
frame_contents = device1.get_next_frame()
distance_peak = getRadarDistancePeak( frame_contents )
print("Distance 1:" + format(distance_peak, "^05.3f") + "m")
# Reverse and turn the robot if table corner is detected
if(distance_peak > 0.25):
reverseAndTurn()
device1.stop_acquisition()
device2.stop_acquisition()
# Get distance data from radar sensor 2
frame_contents = device2.get_next_frame()
distance_peak = getRadarDistancePeak( frame_contents )
print("Distance 2:" + format(distance_peak, "^05.3f") + "m")
# Reverse and turn the robot if table corner is detected
if(distance_peak > 0.25):
reverseAndTurn()
device1.stop_acquisition()
device2.stop_acquisition()
print("Still Running")
Working DemoAnd with that, you are well-equipped to embark on your exploration of Infineon radar technology.
Should you have any further inquiries or require deeper insights into the operation and applications of radar sensors, do not hesitate to reach out. We encourage you to create a query on the radar sensor forum page.
Happy experimenting, and we look forward to seeing the innovative ways you will utilize Infineon radars in your projects!
Comments