GubiLabsAcademy

MODULE 34 / TRAIN & EXTEND

Learn to dock

Progress from a simulated beacon to measured camera alignment and supervised walking. Use the offline docking mock to test failure handling, then connect only independently qualified subsystems.

4–6 h software labs; physical milestones separately9 lab steps3 knowledge checks In progress

By the end, you can…

  • Convert a detected tag pose into a dock-relative goal.
  • Test ordered transitions, stale data and latched faults.
  • Define separate success criteria for approach, contact, support and charging.
BRING WITH YOU

Module 33’s dock requirements and support concept.

A repeatable physical walking baseline; Modules 11–15.

DOCKING BENCH / STATE MACHINEArriving is only the first step.
TEACHING SEQUENCE
  1. 1Approach
  2. 2Aligned
  3. 3Supported
  4. 4Drive disabled
  5. 5Contacts confirmed
  6. 6Charging
  7. 7Charge complete
  8. 8Contacts isolated
  9. 9Drive ready
  10. 10Undock
Approach

Observe the docking target and plan a slow approach.

Concept sketch and sequence only; clicking supplies an imaginary confirmation. This does not model physical contact, battery chemistry or charger control. Use the downloadable Python mock to test rejected transitions, then design and verify real interlocks.
01

A supervisor requests a behavior; the gait controller balances

Docking does not need to begin with a new reinforcement-learning policy. A useful first supervisor turns a dock-relative position error into bounded forward/turn requests for the existing evaluated gait. Its responsibility is deciding when to approach, align, stop or abort. The gait controller still produces joint targets and maintains balance within its tested envelope.

Nav2 illustrates staging, perception refinement, contact checks and charging confirmation. Its ROS2 interfaces and default parameters are not a ready-made BDX-R adapter. You can learn the state-machine principles in a small offline program first. Later integration needs explicit command arbitration, frames, timestamps, odometry and robot-specific dock behavior.

02

Turn an image detection into a physical measurement

AprilTag estimates a marker’s pose relative to the camera using calibrated camera intrinsics and the measured tag size. Measure the boundary specified by the detector documentation, not the outer paper edge. A tag printed at the wrong scale can still be detected while producing an incorrect distance estimate.

To obtain a robot goal, combine camera-to-body and tag-to-dock transforms with the detection. If the camera moves with the head, its body transform depends on the measured head pose. Start with a stationary camera/head configuration, compare against tape-measured positions, and only then add motion. Detection identity, pose quality and age all matter.

03

Treat each transition as a claim requiring evidence

The supplied offline mock uses approach → aligned → supported → drive_disabled → contacts_confirmed → charging → charge_complete → contacts_isolated → drive_ready → undock. These names express a teaching contract. Its Boolean events stand in for future physical feedback; passing the mock proves software ordering, not electrical or mechanical qualification.

Reject wrong-order events and let a timeout or invalid condition enter a latched fault. Loss of a tag during approach should end the approach request according to the tested recovery behavior. Loss of perception during charging must not silently restart walking. Separate a deliberate reset from a new sensor sample so a fault cannot clear itself.

04

Progress from a beacon to an actual dock

First use a simulated beacon with known coordinates and no power-transfer model. Then estimate a real stationary marker on a desk. Next test a non-energized dock with the supported robot and established low-speed walking procedure. Introduce the already-qualified charging subsystem only after those stages pass.

Evaluate repeated starts, lateral/heading error, partial occlusion and interrupted telemetry. Choose limits from the measured gait and dock geometry rather than copying another robot’s speed or tolerance. The final success record needs more than arrival: stable support, confirmed drive-disable, charging, isolation and controlled departure must all be observed.

WORDS YOU NOW KNOW

State machine
A program that advances between named states only when specified conditions hold.
Staging pose
A deliberate starting position and orientation for a controlled final approach.
Extrinsic calibration
Measuring the spatial relationship between coordinate frames.
Command arbitration
Deciding which subsystem may request robot motion.

YOUR CALL

Finished with this module?

0 of 9 lab steps checked. 0 of 3 questions answered. You decide when the module is complete. Revisiting or editing it will not change your decision.

You can reopen it later. Checking every box will not automatically complete it.

Go to the source

Primary references for this module. Use the version and hardware revision named in the lesson.

AprilTag pose estimationNav2 docking workflowOffline docking mockBuild files and docking plan