Read Automatic labeling (russian). Semi-automatic I would say. The idea is to use Grounding DINO model to detect objects of interest and set bounding boxes. Grounding DINO model detects object by their text prompts. Then human in CVAT should manually set a label for each detected box. The post was inspired by Grounding DINO: SOTA Zero-Shot Object Detection and tutorial in format of Jupyter notebook. Provided docker image requires nvidia video card with 3GB RAM. The whole flow in opensource on GitHub. I don’t see the reason why the last step, which essentially object classification, cannot be automated as well.

Was puzzled to come across asterisk before parameter in Python which looked like pointer deaddressing in C:


Understanding the asterisk(*) of Python.

Interesting that asterisk (*) and forward slash () could be used in Python instead of parameter in function call. It’s absolutely crazy as for my taste. These two divide positional and keyword parameters. What Are Python Asterisk and Slash Special Parameters For?.

Read great series My Greatest Engineering Accomplishment: The Scout Flight Controller.

I started the project on April 29, 2023. 70 days and 1,194 code commits later, on July 7, 2023, Scout achieved its first successful flight.

How I Developed the Scout Flight Controller, Part 1: Quadcopter Flight Dynamics.

How I Developed the Scout Flight Controller, Part 2: Capturing Telemetry with the Gyroscope

To rectify this issue, we must account for gyroscope bias with a calibration. The calibration process is conceptually simple: upon system boot-up, we dedicate a few seconds to monitor the raw gyroscope readings while the quadcopter remains perfectly stationary. We then calculate the average of these observed values across all three axes. In all subsequent gyroscope readings, we will subtract each axis’ respective calibration reading (the average we calculated) to get the “calibrated” reading; essentially, we are subtracting the bias out of the raw reading. This adjustment effectively eliminates the bias from the raw readings, providing us with a “clean” reading that can be utilized within our flight controller code.

How I Developed the Scout Flight Controller, Part 3: Receiving Control Inputs via an RC Receiver

Following idea I will borrow along with provided normalize function.

Instead of working with these values that range from 1,000 to 2,000, I preferred to normalize each within the range of -1.0 to 1.0 for the roll, pitch, and yaw, and between 0.0 and 1.0 for the throttle. This makes the values easier to understand and work with. I wrote the following simple function in Python to handle the normalization process:

def normalize(value:float, original_min:float, original_max:float, new_min:float, new_max:float) -> float:
    """ Normalizes (scales) a value to within a specific range. """
    return new_min + ((new_max - new_min) * ((value - original_min) / (original_max - original_min)))

How I Developed the Scout Flight Controller, Part 4: Stabilizing Flight with PID Controllers. It’s described here how 3 PID controllers for pitch, roll, yaw work together to calculate thrust for 4 drone motors.

# calculate throttle values
t1:float = adj_throttle + pid_pitch + pid_roll - pid_yaw
t2:float = adj_throttle + pid_pitch - pid_roll + pid_yaw
t3:float = adj_throttle - pid_pitch + pid_roll + pid_yaw
t4:float = adj_throttle - pid_pitch - pid_roll - pid_yaw

Beside of above snippet, article contain full PID controller implementation.

How I Developed the Scout Flight Controller, Part 5: Controlling Brushless Motors with ESC’s and PWM.

How I Developed the Scout Flight Controller, Part 6: Hardware.

TIL that a circuit to convert DC current to lower voltage is called battery eliminator circuit (BEC). BEC to 5V is integrated in some ESC.

The BEC, a separate circuit within the ESC, provides power to other 5V components on the quadcopter. Instead of needing to install a secondary 5V battery, we can tap into the BEC of one of the ESCs. It handles the conversion from the LiPo’s 16.8V to a stable 5V, which we can utilize to power these devices.

Please note that not every ESC includes a BEC.

How I Developed the Scout Flight Controller, Part 7: Full Flight Controller Code. This contain full code. I am surprised how minimalistic this code is. Create work!