Skip to content

Create generalized proxy tool to forward messages - #448

Merged
bhers4 merged 3 commits into
masterfrom
p1-proxy-tool
Oct 29, 2026
Merged

bhers4 merged 3 commits into
masterfrom
p1-proxy-tool

Conversation

@bhers4

@bhers4 bhers4 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

New Features

  • Added p1_proxy, which forwards raw wheel speed, vehicle speed, IMU, and pose output from a source device to one or more targets as the matching input messages.
  • Added TCPBroadcastServerTransport, an output-only TCP server transport that sends to any number of connected clients. Clients can connect and disconnect at any time.
  • A tcp://:<port> target in p1_proxy accepts any number of clients, and all of them receive the data.

Changes

  • Moved the pose transform helpers out of the pose_relay.py example into utils/pose_relay.py so other tools can share them.
  • Removed the proxy_wheel_speed.py example, which p1_proxy replaces.
  • create_transport() now returns the new multi-client server transport for tcp://:<port> in output mode.

bhers4 and others added 3 commits October 29, 2026 09:34
Added TCPBroadcastServerTransport, an output-only tcp://:PORT listener that sends to any number of simultaneously connected clients, dropping clients that disconnect or cannot keep up. create_transport() now returns it for tcp://:PORT when mode='output'.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Moved transform_pose_to_target() and transformed_pose_to_external_pose_input() out of the pose_relay.py example so they can be shared with other tools, and added unit tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
p1_proxy forwards raw wheel speed, vehicle speed, IMU, and pose output from a source device to one or more targets as the corresponding input messages. Pose is transformed for the target's lever arm and mounting, and optionally resets the target's position on the first pose (--reset-target-position). Targets that are unreachable or disconnect are retried without stopping the proxy, and tcp://:<port> targets accept any number of clients.

Replaces the proxy_wheel_speed.py example.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bhers4
bhers4 requested a review from adamshapiro0 October 29, 2026 16:37
@bhers4 bhers4 self-assigned this Oct 29, 2026
try:
assert not isinstance(t, TCPBroadcastServerTransport)
finally:
t.close()
import sys
import threading
import time
from typing import Callable, Dict, List, Optional, Set, Tuple, Type
from import_utils import enable_relative_imports
__package__ = enable_relative_imports(__name__, __file__)

from ..messages import *
from ..utils.pose_relay import transform_pose_to_target, transformed_pose_to_external_pose_input
from ..utils.time_provider import TimeProvider
from ..utils.trace import BrokenPipeStreamHandler, HighlightFormatter
from ..utils.transport_utils import *
from fusion_engine_client.utils.transport_utils import *
from fusion_engine_client.utils.bin_utils import bytes_to_hex
from fusion_engine_client.utils.pose_relay import transform_pose_to_target, transformed_pose_to_external_pose_input
from fusion_engine_client.utils.transport_utils import *

@adamshapiro0 adamshapiro0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bhers4
bhers4 merged commit fc8b4e8 into master Oct 29, 2026
27 checks passed
@bhers4
bhers4 deleted the p1-proxy-tool branch October 29, 2026 16:59
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.

2 participants