Skip to content

Support HX5-D20 XM335 devices on Humble#114

Open
HS-P wants to merge 1 commit into
ROBOTIS-GIT:humblefrom
HS-P:codex/hx5-d20-humble-support
Open

Support HX5-D20 XM335 devices on Humble#114
HS-P wants to merge 1 commit into
ROBOTIS-GIT:humblefrom
HS-P:codex/hx5-d20-humble-support

Conversation

@HS-P

@HS-P HS-P commented Jun 10, 2026

Copy link
Copy Markdown

Summary

This adds the missing HX5-D20 XM335 model metadata needed by the ROS 2 Humble branch and adjusts the read path used during HX5-D20 bringup.

  • Add model table entries for XM335-T332 and XM335-T323.
  • Add xm335_t332.model and xm335_t323.model control table definitions.
  • Avoid grouped sync-read handling for one-device read transactions by using direct readTxRx.
  • Disable fast read by default for this Humble path.

Why

While bringing up an HX5-D20 right hand on ROS 2 Humble, the Dynamixel hardware interface failed against the actual hardware even though DYNAMIXEL Wizard detected and controlled the full device chain correctly.

The observed device layout was:

  • ID 110: HX5-D20-MRT
  • IDs 111-114, 116-119, 121-124, 126-129, 131-134: XM335-T323
  • IDs 115, 120, 125, 130, 135: HX-SENSOR-TIP

The Humble model list did not include model number 1710, so the interface reported:

Cannot find the DXL model from file list (model_num: 1710, model_name: unknown)

After adding the model definition, bringup progressed further but the HX5-D20-MRT read transaction still failed when the read group contained only ID 110:

FastSyncRead Rx Fail [Dxl Size : 1] [Error code : -3001]
Dynamixel Read Fail
Dynamixel Write Fail

For the single-device MRT read case, direct protocol read succeeds and avoids requiring fast/group sync-read support from that one target.

Impact

This allows the Humble branch to recognize the XM335-T323 devices used in HX5-D20 and avoids a bringup-time read failure on the HX5-D20-MRT controller path.

The existing grouped sync-read path remains used for multi-device reads.

Validation

Built locally on ROS 2 Humble:

colcon build --symlink-install --packages-select dynamixel_hardware_interface robotis_hand_bringup robotis_hand_description robotis_hand_pressure_broadcaster --allow-overriding dynamixel_hardware_interface

Validated against an HX5-D20 right hand at 4 Mbps on /dev/ttyUSB0; the model table now resolves model 1710 as xm335_t323.model, and the bringup no longer stops at the missing-model or single-device fast sync read failure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request disables the fast read protocol by default, adds model definitions for Dynamixel xm335_t332 and xm335_t323, and optimizes GetDxlValueFromSyncRead by implementing a direct read path when only a single item is being read. Feedback on the implementation suggests capturing the read data item by const reference rather than copying it by value to prevent unnecessary memory allocations in a real-time control loop.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

DxlError Dynamixel::GetDxlValueFromSyncRead(double period_ms)
{
if (read_data_list_.size() == 1) {
auto it_read_data = read_data_list_.front();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The RWItemList struct contains several std::vector and std::string members. Copying it by value here introduces unnecessary memory allocations and overhead, which is particularly undesirable in a real-time controller loop. Consider capturing it by const reference instead.

    const auto & it_read_data = read_data_list_.front();

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