Skip to content

Conversation

@nepyope
Copy link
Collaborator

@nepyope nepyope commented Nov 4, 2025

Custom Teleoperator is a configuration-driven wrapper that lets you compose multiple existing teleoperators (e.g. HomunculusArm, SO100Leader…) and define how each robot joint is driven by which device, entirely from JSON. It supports running multiple physical devices at once (like left + right hand on two separate Homunculus gloves), lets you map individual joints to teleop values or hold them at fixed neutral values, and handles normalization + degree conversion internally using calibration data when available.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a custom teleoperator wrapper that dynamically instantiates and manages multiple base teleoperator instances based on JSON configuration. This enables flexible control of multiple teleoperator devices with configurable joint mappings.

  • Adds a Custom teleoperator class that wraps multiple base teleoperator instances
  • Implements JSON-based configuration for specifying teleoperator devices and their joint mappings
  • Supports neutral value assignments and joint value transformations (inversion, normalization)

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
custom_config.json Configuration file defining right and left arm teleoperators with joint mappings
custom.py Main implementation of the Custom teleoperator wrapper with dynamic class loading and joint mapping logic
config_custom.py Configuration dataclass for the Custom teleoperator specifying required config_path parameter
init.py Module initialization exporting CustomConfig and Custom classes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

for device_name, teleop in self.base_teleops.items():
# Read joint positions from this teleoperator
# These are in the teleoperator's normalization mode (e.g., -100 to 100)
joint_positions = teleop._read()
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Calling a private method _read() from another class violates encapsulation. Consider using the public get_action() method instead, or document why direct access to _read() is necessary.

Suggested change
joint_positions = teleop._read()
joint_positions = teleop.get_action()

Copilot uses AI. Check for mistakes.
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