What this guide proves
A team can describe and test the complete control contract: ROS command units, host-to-controller protocol, four motor outputs, four encoder feedback channels, watchdog behavior and odometry output.
Hardware and scope boundary
The Mecanum base supplies the drivetrain, not a preconfigured ROS 2 control stack. COG-RRC-LITE has relevant motor, encoder and USB capabilities, but the delivered firmware, motor pinout and hardware interface must be verified before any ros2_control configuration is treated as correct.
Prepare before applying power
Start with the encoder/IMU odometry baseline, a raised or restrained chassis and the firmware record. Collect actual port names, motor map, encoder resolution, gear ratio, wheel parameters, current limits and command-timeout behavior.
Procedure
- Write the interface table before code: for each wheel state, define command unit, feedback unit, expected sign, update rate and failure behavior.
- Implement or select a hardware interface that maps only the verified controller protocol. Validate read-only feedback first, then command one wheel at a time under mechanical protection.
- Expose velocity command and position/velocity feedback interfaces with units that are explicit in source and configuration. Do not hide a conversion in an undocumented launch file.
- Use ros2_control inspection tools to confirm that expected hardware interfaces become available, then start a controller only after its parameters match the four-wheel Mecanum geometry.
- Test watchdog timeout, node restart and USB reconnect behavior. A lost host connection must result in the verified controller-side safe state, not a continuing stale command.
Pass criteria and record
The build record contains an interface table, firmware version, controller configuration, unit tests or observed wheel tests, timeout behavior and a rollback copy of a known-good image.
Do not proceed when
Stop if motor output can be enabled before feedback/sign checks, if a command scale is unknown, if controller firmware is not identified, or if loss of host communication has not been proven safe.
Continue from here
Once closed-loop motion is repeatable, publish the validated odometry and integrate transforms, perception and navigation one layer at a time.
