
Productive Robotics
CAN Bus Motor Control System
Built a real-time CAN bus motor control stack in C++ for industrial servo motor controllers — from low-level Linux socket I/O through ROS service integration. This is the lowest-level interface between software and physical actuators — ground-up motor control work of the same class done at top robotics companies.
A custom gantry platform required motor control over CAN bus. Built the CAN integration in C++ and wired it into the existing real-time control loop, with thread-safe access between the real-time control thread and asynchronous ROS service callers. The design handles concurrent access to a shared bus from multiple producers, with a dedicated receive thread parsing incoming frames and routing them to per-motor handlers.
Implemented the standard motor-control modes — position, torque, and velocity — with unit conversions from SI to the controller's native counts/amps/RPM scaling. Each motor is driven from the real-time control loop, with bandwidth management to avoid saturating the shared bus.

Built fault tolerance and recovery features: heartbeat monitoring for motor presence, power-cycle detection with automatic PID parameter restoration, and fault decoding into human-readable categories for the operator dashboard. After every motion command, multi-data feedback returns the joint's temperature, current, speed, and position in a single response.
Implemented async request/response patterns to layer blocking ROS service calls on top of the inherently asynchronous CAN bus, used wherever a caller needs hardware confirmation before proceeding (gripper actuation, parameter writes, etc.). Built a custom CAN protocol for an industrial gripper with sensor feedback.