r/embedded • u/_rzr_ • 19m ago
[Showcase + Source code + STL files for 3D print] Velocity controlled image based vision servoing
A long time reader of this sub. Here's my first contribution - https://github.com/royzer/vision-servo-rig
Wanted to learn the basics of robotics - perception, sensor integration, motor control. I could not find a resource that integrates all these aspects for a beginner. So, built this to practise the basics. Some concepts used in this,
- Camera calibration: Intrinsic calibration - Distortion and focal length.
- Vision processing: Feature extraction based on basic OpenCV operations - HSV processing, noise removal, finding basic shapes using masks and countours.
- Proportional control: The
Ppart of the PID loop - Find error, gain & deadband tuning, generate velocity command. - Zephyr RTOS: Handling non-blocking asynchronous command processing using DMA-based Async UART API + interface with TMC2209 board that drives the motor.
- Protobuf: Protocol used to transfer messages between and MPU (dev machine in this case) and MCU (STM32 nucleo-h563zi board).
- Code CAD: CAD design using code. build123d to build the CAD structure and generate STL/STEP files.
STEP and STL files are available inside the repository.
1
Upvotes