Skip to content

Bump 1.5.0#95

Merged
robotpilot merged 27 commits intojazzyfrom
main
Nov 26, 2025
Merged

Bump 1.5.0#95
robotpilot merged 27 commits intojazzyfrom
main

Conversation

@Woojin-Crive
Copy link
Member

No description provided.

…ling

- Modified data structures to use pairs of communication ID and device ID for torque states and enabled IDs.
- Updated methods in Dynamixel and DynamixelInfo classes to accommodate the new communication ID parameter.
- Enhanced model file reading functions to include communication ID for better organization and access.
- Added new model files for hand controllers and fingers, including control tables and unit information for pressure sensors.
…smission matrices in Dynamixel hardware interface
…dentation in Dynamixel hardware interface and implementation files
Major Update for Dynamixel Hardware Interface
@Woojin-Crive Woojin-Crive added the bump Increase the version number to release label Nov 26, 2025
@github-project-automation github-project-automation bot moved this to 🌱 Todo in Platform Nov 26, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Woojin-Crive, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly upgrades the 'dynamixel_hardware_interface' by introducing a more sophisticated device identification scheme using 'comm_id' and 'id' pairs, enhancing the flexibility for managing multiple devices on a single bus. It also refactors the unit conversion logic into a unified system with offset support, improving data interpretation. The initialization process has been made more robust with sequential steps and better error handling. Furthermore, memory management for internal matrices has been modernized, and new Python tools have been added to streamline the generation of Dynamixel model files, expanding support for a wider range of devices and configurations.

Highlights

  • Enhanced Dynamixel Identification: Introduced a 'comm_id/id' concept for virtual and physical Dynamixel devices, allowing for more flexible and robust communication management, especially for devices sharing a communication bus.
  • Unified Unit Conversion System: Implemented a new unit information system that refactors type-info-based unit conversion to a more unified and flexible unit-info-based logic, including support for offset values.
  • Improved Initialization Logic: Refactored the device initialization process to be sequential and more resilient, including retries for port opening and individual device pings, and better error reporting for hardware issues.
  • Memory Management Improvement: Replaced raw 'double**' matrices with 'std::vector<std::vector>' for transmission matrices, eliminating potential memory leaks and improving safety.
  • New Model Generation Tools: Added Python scripts ('hx_synctable_model_generator.py' and 'xml_to_model_parser.py') to automate the creation and management of Dynamixel model files, particularly for complex virtual hand configurations.
  • Expanded Dynamixel Model Support: Updated existing Dynamixel model files and added new ones, including support for 'hx5_d20_rr', 'hx5_d20_rl', 'xc335_t332', and a series of 'hx5_d20_r_synctable_X_device_Y' virtual models.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

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

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 introduces significant and valuable changes, including the comm_id/id concept for virtual devices, a unified unit conversion system, and sequential initialization logic. The refactoring to use std::vector for matrices is a great improvement that fixes a memory leak. The addition of scripts for model file generation is also very helpful. My review focuses on ensuring the new comm_id logic is applied consistently and that all functionalities, like device reset, are fully updated. I've found a few areas that need attention to ensure the robustness and correctness of the new features.

DxlError WriteItem(uint8_t id, uint16_t addr, uint8_t size, uint32_t data);
DxlError WriteItem(uint8_t comm_id, uint8_t id, std::string item_name, uint32_t data);
DxlError WriteItem(uint8_t comm_id, uint8_t id, uint16_t addr, uint8_t size, uint32_t data);
DxlError InsertWriteItemBuf(uint8_t id, std::string item_name, uint32_t data);
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The signature for InsertWriteItemBuf should include comm_id to properly support virtual devices, where comm_id can be different from id. The current implementation assumes comm_id == id, which is incorrect for virtual devices accessed via services.

  DxlError InsertWriteItemBuf(uint8_t comm_id, uint8_t id, std::string item_name, uint32_t data);

// DXL Item Read
DxlError ReadItem(uint8_t id, std::string item_name, uint32_t & data);
DxlError ReadItem(uint8_t comm_id, uint8_t id, std::string item_name, uint32_t & data);
DxlError InsertReadItemBuf(uint8_t id, std::string item_name);
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The signature for InsertReadItemBuf should include comm_id to properly support virtual devices. The current implementation assumes comm_id == id, which is incorrect for virtual devices accessed via services.

  DxlError InsertReadItemBuf(uint8_t comm_id, uint8_t id, std::string item_name);

DxlError ReadItem(uint8_t comm_id, uint8_t id, std::string item_name, uint32_t & data);
DxlError InsertReadItemBuf(uint8_t id, std::string item_name);
DxlError ReadItemBuf();
bool CheckReadItemBuf(uint8_t id, std::string item_name);
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The signature for CheckReadItemBuf should include comm_id to correctly identify the device, especially when multiple devices might share the same id but have different comm_ids (e.g., virtual devices). The current implementation could lead to ambiguity.

  bool CheckReadItemBuf(uint8_t comm_id, uint8_t id, std::string item_name);

DxlError InsertReadItemBuf(uint8_t id, std::string item_name);
DxlError ReadItemBuf();
bool CheckReadItemBuf(uint8_t id, std::string item_name);
uint32_t GetReadItemDataBuf(uint8_t id, std::string item_name);
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The signature for GetReadItemDataBuf should include comm_id to correctly identify the device and retrieve its data. The current implementation could return data from the wrong device if multiple devices share an id.

  uint32_t GetReadItemDataBuf(uint8_t comm_id, uint8_t id, std::string item_name);

Comment on lines +84 to +87
bool GetDxlControlItem(
uint8_t comm_id, uint8_t id, std::string item_name, uint16_t & addr,
uint8_t & size);
bool CheckDxlControlItem(uint8_t comm_id, uint8_t id, std::string item_name);
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For improved performance and to adhere to C++ best practices, std::string parameters should be passed by const std::string& to avoid unnecessary copies. This applies to GetDxlControlItem, CheckDxlControlItem, and other methods in this class like GetDxlUnitValue, ConvertValueToUnit, etc.

  bool GetDxlControlItem(
    uint8_t comm_id, uint8_t id, const std::string & item_name, uint16_t & addr,
    uint8_t & size);
  bool CheckDxlControlItem(uint8_t comm_id, uint8_t id, const std::string & item_name);

[unit info]
Data Name value unit Sign Type
Data Name value unit Sign Type Offset
Present Velocity 0.0010471976 rad/s signed
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This line is missing the Offset value, which is inconsistent with the new format and other entries in this file. It should have an offset of 0.0 to match the other velocity entries.

Present Velocity	0.0010471976	rad/s	signed	0.0

@robotpilot robotpilot merged commit 31b7fbb into jazzy Nov 26, 2025
25 checks passed
@github-project-automation github-project-automation bot moved this from 🌱 Todo to 🚩Done in Platform Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump Increase the version number to release

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants