Abstract
This paper presents a ROS 2-based intelligent control architecture for high-precision autonomous marking. The system integrates model predictive control (MPC) with dual- camera visual servoing to achieve submillimeter accuracy. A layered control stack combines global perception from an overhead camera with local correction from a tool-mounted camera, enabling accurate six-DoF pose estimation through fiducial markers and hand-eye calibration. Trajectory planning is formulated as a constrained optimization in CasADi, supporting real-time motion generation under workspace and actuator limits. Implemented on a 6-DOF collaborative arm with STM32-based RS-485 motor controllers, the system achieves final errors of 0.7 mm and closed-loop frequencies near 8 Hz. Results demonstrate the viability of combining vision and optimal control in a modular ROS 2 framework for industrial automation