Skip to content

🧩 KER Configuration and Third-party Robot Adaptation

The KER package keeps conversion from exoskeleton data to robot-controller commands in YAML. To adapt a robot from another vendor, copy config/demo.yaml and edit the configuration; Python source changes are normally unnecessary.

The robot must provide one of the ROS 2 controller interfaces supported below. If the vendor provides only a proprietary SDK, write an interface bridge first. When the robot has different kinematics, per-joint linear mapping is not the same as end-effector pose retargeting.

🚀 Launch a custom configuration

ros2 launch openarmx_teleop_ker teleop_ker.launch.py \
  config_file:=/absolute/path/my_robot.yaml connection:=usb

config_file takes precedence over robot. You can also place the file in the package's config/ directory and use its filename without the .yaml suffix as robot. Rebuild and source the workspace after editing.

🧱 Configuration example

This single-joint example shows the structure. In a real adapter, add every joint required by the controller and replace the ranges with values from the robot specification.

schema_version: 2
robot_info: {name: MyRobot, model: v1}
source: {type: ker, packet_field: angles, unit: degree, expected_length: 16}
source_channels:
  right_j1: 0
  right_trigger: 7
outputs:
  - name: right_arm
    type: forward_position
    topic: /right_arm_controller/commands
    joints:
      - name: robot_joint1
        source: right_j1
        transform:
          input_range: [-90, 90]
          output_range: [-1.57, 1.57]
          input_unit: degree
          output_unit: rad
          clamp_input: true
          clamp_output: true
          min: -1.57
          max: 1.57

🔧 Configuration points

  1. Keep schema_version: 2; source.expected_length is normally 16.
  2. source_channels values are zero-based indices in the KER packet. Every joint source must reference a defined channel.
  3. Each output maps to one ROS controller and supports forward_position, joint_trajectory, or gripper_action.
  4. The number, names, and order of joints must exactly match the controller. topic or action must be the real endpoint.
  5. input_range is the exoskeleton range and output_range is the robot range. Reverse a direction by swapping the two output_range values; do not add an invert field.
  6. Angles normally use degree input and rad output. Linear grippers use output_unit: m and explicit min/max safety limits.
  7. Enable startup.ramp_sec, then tune safety.max_step for the robot speed. Use jump_reject for occasional encoder spikes.

The transform order is: unit conversion → input clamp → range mapping → scale → offset → output min/max clamp → publish.

✅ Validate the adapter

Start with use_fake_hardware:=true, check direction, zero position, range, and gripper travel joint by joint, then run:

ros2 topic echo /right_arm_controller/commands
ros2 topic echo /joint_states

If the controller uses a gripper action, use the corresponding ROS 2 action tool to inspect target values. Connect a real robot only after command count and order are correct.

For the complete field reference, see 配置文件说明_CN.md in the ROS 2 package.