A little curiosity. A whole lot of making.Robotics, CNC & connected ideas
robodatech.
← Learning library
Control

Connect perception, planning, and control.

See how ROS 2 nodes, hardware interfaces, and local motor loops fit together in a robot you can inspect and debug.

Close the loopTargetControlMotorMeasured feedbackMeasure the result. Correct the error.
Concept illustration. Check the component datasheet before wiring.
Try it yourself

Change an input.
See what follows.

A simplified learning model. Values describe the model, not a connected robot.

Give each layer a clear responsibility.

A perception node turns sensor data into useful estimates. A planner selects a route or a joint trajectory. A controller converts the target into commands for the hardware. Local motor electronics enforce electrical limits and execute fast loops. Keep timestamps and coordinate frames explicit across those boundaries.

A practical system architecture

LayerInput → outputExample check
PerceptionRange/image samples → obstacles and poseReject stale samples and record calibration.
PlannerGoal + estimated state → path/trajectoryRespect geometry, reach, and collision constraints.
ros2_controlState interfaces → controller update → command interfacesVerify interface types, units, and controller lifecycle.
Hardware / MCUSetpoints → timed driver outputWatchdog timeout disables motion.
FeedbackEncoder/current data → measured stateCheck sign, scaling, timestamps, and error flags.

Why the read–update–write cycle matters

The ros2_control controller manager coordinates reading hardware state, updating active controllers, and writing commands. Its timing depends on the configured system and hardware; merely installing ROS 2 does not create a hard real-time or safety-rated machine. Start with simulation and verify the same interfaces against a restrained physical mechanism.

Build in four observable stages

  1. Publish a synthetic sensor value with units and timestamps.
  2. Run a simulated differential-drive or joint controller and inspect target versus measured state.
  3. Connect one hardware interface with conservative limits and verify direction.
  4. Test loss of messages, node shutdown, and stale commands before adding autonomous planning.

The proportional-response experiment above explains one local feedback concept. It does not simulate ROS scheduling or a complete navigation stack.

Go to the source

Manufacturer and project documentation. Reviewed 20 September 2026; check your exact board revision and software release.

Keep building

Good ideas start here.

Free robotics lessons, CNC build notes and product updates. Confirm your email to join. Unsubscribe anytime.