Skip to content

refactor: generated CDR movement mux and TF pose - #4679

Closed
TomCC7 wants to merge 2 commits into
cc/feat/cdr-replanning-plannerfrom
cc/feat/cdr-movement-mux
Closed

TomCC7 wants to merge 2 commits into
cc/feat/cdr-replanning-plannerfrom
cc/feat/cdr-movement-mux

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 20, 2026

Copy link
Copy Markdown
Member

MovementManager relays generated PointStamped/Twist/Bool values. Existing click limits, per-axis scaling, teleop priority/cooldown and NaN cancellation fallback remain intact. Cancellation Headers use wall-clock integer nanoseconds. TfPose reads the already-generated TF buffer, preserves the exact Header and measures stamp progress in integer nanoseconds while retaining the existing local monotonic age/backoff contract.

Parent: #4678. Project: https://linear.app/dimensional/project/message-encoding-refactor-05a3ddb4af3e/overview

Category Files Change
Movement/TF consumers 2 Generated nested values and exact source timestamps
Tests 2 Port existing behaviors, remove fixed sleep/default-network setup, add exact metadata and real CDR mux acceptance
CI 1 Installed-wheel provenance and scoped checks

After installing this commit, run this offline TF example:

from dimos.messages.geometry_msgs.msg import Transform, TransformStamped, Vector3, Quaternion
from dimos.messages.std_msgs.msg import Header
from dimos.msgs.time import time_from_nanoseconds
from dimos.navigation.tf_pose import TfPose
from dimos.protocol.tf.tf import MultiTBuffer

header = Header(frame_id="odom", stamp=time_from_nanoseconds(1700000000123456789))
buffer = MultiTBuffer()
buffer.receive_transform(TransformStamped(
    header=header, child_frame_id="base_link",
    transform=Transform(translation=Vector3(x=1, y=0, z=0), rotation=Quaternion(x=0, y=0, z=0, w=1)),
))
pose = TfPose(buffer, "base_link", max_age_s=2.5).get("odom")
assert pose is not None and pose.header == header and pose.pose.position.x == 1

For the actual movement Module pub/sub acceptance, from the dev checkout run:

python -m pytest --noconftest --import-mode=importlib -o addopts='' -q \
  dimos/navigation/movement_manager/test_movement_manager.py \
  -k actual_cdr_movement_ports

It uses real CdrTransport/MemoryRPC memq ports: teleop command → stop Bool + cancellation PointStamped + scaled command; nav stays suppressed during cooldown and resumes exactly at the boundary. All resources are owned and cleaned; no robot or fixed sleeps.

Validation: 23 source and 23 installed-wheel checks, strict typing of two production files, applicable hooks, normal main wheel build, full runtime pip check (198 packages). Exact Python example above passes against the installed main wheel. Tests include zero/negative/epoch stamps and epoch+1ns progress in the actual TF buffer. No hardware, benchmark or GitHub CI result is claimed. Other followers/native/robot consumers, default cutover and legacy retirement remain subsequent work.

@TomCC7 TomCC7 closed this Oct 20, 2026
@TomCC7
TomCC7 deleted the cc/feat/cdr-movement-mux branch October 20, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant