-
Notifications
You must be signed in to change notification settings - Fork 12
Bump 1.4.0 #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump 1.4.0 #20
Conversation
- Added new models: xh540_w150 and xc330_t288. - Introduced torque constant parameter in relevant functions.
…al Current' interface. Ensured proper checks for interface names before accumulating values for transmission commands.
- Introduced 'torque_constant' to xc330_t181.model, xc330_t288.model, and xh540_w150.model.
Support Current Control
Signed-off-by: Pyo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (10)
- CHANGELOG.rst: Language not supported
- include/dynamixel_hardware_interface/dynamixel/dynamixel_info.hpp: Language not supported
- include/dynamixel_hardware_interface/dynamixel_hardware_interface.hpp: Language not supported
- package.xml: Language not supported
- param/dxl_model/xc330_t181.model: Language not supported
- param/dxl_model/xc330_t288.model: Language not supported
- param/dxl_model/xh540_w150.model: Language not supported
- src/dynamixel/dynamixel.cpp: Language not supported
- src/dynamixel/dynamixel_info.cpp: Language not supported
- src/dynamixel_hardware_interface.cpp: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @robotpilot, 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!
Summary of Changes
This pull request bumps the version of the dynamixel_hardware_interface package to 1.4.0. It introduces a torque constant parameter to the DXL model files, enhances transmission command calculation, unifies the initialization structure, and adds support for goal current control. The changes include modifications to the CHANGELOG, DXL model files, and source code to incorporate these new features and improvements.
Highlights
- Version Bump: The package version is bumped from 1.3.0 to 1.4.0.
- Torque Constant Parameter: A torque constant parameter is added to the DXL model files (xc330_t181.model, xc330_t288.model, xh540_w150.model).
- Goal Current Control: Support for goal current control is added, including modifications to the hardware interface and transmission command calculation.
- Transmission Command Calculation: Enhanced transmission command calculation to account for goal current control.
- Unified Initialization Structure: The initialization structure is unified for better consistency.
Changelog
Click here to see the changelog
- CHANGELOG.rst
- Added version 1.4.0 with release date 2025-03-20.
- Added Torque Constant Parameter to DXL Model Files.
- Enhanced Transmission Command Calculation.
- Unified Initialization Structure.
- Support for Goal Current Control.
- Added Woojin Wie to contributors.
- include/dynamixel_hardware_interface/dynamixel/dynamixel_info.hpp
- Added
torque_constantto theGetDxlTypeInfomethod parameters.
- Added
- include/dynamixel_hardware_interface/dynamixel_hardware_interface.hpp
- Added definition for
GOAL_CURRENT_INDEX.
- Added definition for
- package.xml
- Updated package version to 1.4.0.
- param/dxl_model/xc330_t181.model
- Added
torque_constantparameter with value0.0006709470296015791.
- Added
- param/dxl_model/xc330_t288.model
- Added
torque_constantparameter with value0.0009674796739867748.
- Added
- param/dxl_model/xh540_w150.model
- Added
torque_constantparameter with value0.0045.
- Added
- src/dynamixel/dynamixel.cpp
- Modified
GetDxlValueFromSyncReadandGetDxlValueFromBulkReadto convert current to effort usingdxl_info_.ConvertCurrentToEffort.
- Modified
- src/dynamixel/dynamixel_info.cpp
- Modified
GetDxlTypeInfoto retrieve and set thetorque_constantvalue.
- Modified
- src/dynamixel_hardware_interface.cpp
- Modified
InitDxlWriteItemsto include 'Goal Position' and 'Goal Current' interfaces. - Modified
CalcJointToTransmissionto calculate and set 'Goal Position' and 'Goal Current' values for transmissions.
- Modified
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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 is currently in preview and 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 to provide feedback.
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.
The gears they mesh, the motors hum,
A constant torque, precisely spun.
From model files, parameters gleam,
A roboticist's electric dream.
Footnotes
-
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. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request bumps the version to 1.4.0 and introduces several new features and improvements, including torque constant parameter, enhanced transmission command calculation, unified initialization structure, and goal current control. The changes seem well-structured and address relevant aspects of the dynamixel hardware interface. However, some areas could benefit from further clarification and potential optimization.
Summary of Findings
- Missing Goal Velocity Implementation: The
GOAL_VELOCITY_INDEXis defined but commented out with aTODO. This indicates an incomplete feature that should be addressed or removed if not planned for immediate implementation. - Potential Redundancy in
InitDxlWriteItems: TheInitDxlWriteItemsfunction adds "Goal Position" and potentially "Goal Current" interfaces. It might be beneficial to ensure that these interfaces are not added multiple times or unnecessarily. - Inconsistent use of
GOAL_CURRENT_INDEX: TheGOAL_CURRENT_INDEXis used inCalcJointToTransmissionwith multiple nested conditional statements. This could be simplified for better readability and efficiency.
Merge Readiness
The pull request introduces valuable new features and improvements. However, the TODO in dynamixel_hardware_interface.hpp and the potential redundancy in InitDxlWriteItems should be addressed before merging. Additionally, the nested conditional statements in CalcJointToTransmission could be simplified. I am unable to approve this pull request, and recommend that another reviewer does so before merging. I recommend that the pull request not be merged until the high severity issues are addressed (at a minimum).
| #define PRESENT_EFFORT_INDEX 2 | ||
|
|
||
| #define GOAL_POSITION_INDEX 0 | ||
| // #define GOAL_VELOCITY_INDEX 1 // TODO: to be implemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| HandlerVarType temp_write; | ||
| temp_write.id = id; | ||
| temp_write.name = gpio.name; | ||
|
|
||
| temp_write.interface_name_vec.push_back("Goal Position"); | ||
| temp_write.value_ptr_vec.push_back(std::make_shared<double>(0.0)); | ||
|
|
||
| temp_write.interface_name_vec.push_back(it.name); | ||
| temp_write.value_ptr_vec.push_back(std::make_shared<double>(0.0)); | ||
| hdl_trans_commands_.push_back(temp_write); | ||
| for (auto it : gpio.command_interfaces) { | ||
| if (it.name == "Goal Current") { | ||
| temp_write.interface_name_vec.push_back("Goal Current"); | ||
| temp_write.value_ptr_vec.push_back(std::make_shared<double>(0.0)); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| for (size_t i = 0; i < num_of_transmissions_; i++) { | ||
| if (hdl_trans_commands_.at(i).interface_name_vec.size() > GOAL_CURRENT_INDEX && | ||
| hdl_trans_commands_.at(i).interface_name_vec.at(GOAL_CURRENT_INDEX) == "Goal Current") | ||
| { | ||
| for (size_t j = 0; j < hdl_joint_commands_.size(); j++) { | ||
| if (hdl_joint_commands_.at(j).interface_name_vec.size() > GOAL_CURRENT_INDEX && | ||
| hdl_joint_commands_.at(j).interface_name_vec.at(GOAL_CURRENT_INDEX) == | ||
| hardware_interface::HW_IF_EFFORT) | ||
| { | ||
| double value = 0.0; | ||
| for (size_t k = 0; k < num_of_joints_; k++) { | ||
| value += joint_to_transmission_matrix_[i][k] * | ||
| (*hdl_joint_commands_.at(k).value_ptr_vec.at(GOAL_CURRENT_INDEX)); | ||
| } | ||
| *hdl_trans_commands_.at(i).value_ptr_vec.at(GOAL_CURRENT_INDEX) = value; | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.